<div dir="ltr">Hello<div><br></div><div>I am trying to use systemd on archlinux to mount a file system on demand. Here is what Ihave done and here are my results.</div><div><br></div><div>Creating a ramdisk image.</div><div>
<br clear="all"><div><div># dd if=/dev/zero of=testyfs.raw bs=4096 count=1000</div><div># mkfs.ext4 -F testyfs.raw</div></div><div><br></div><div>Making a mount point in /mnt</div><div><br></div><div># mkdir /mnt/testyfs</div>
<div><br></div><div>Adding an etnry /etc/fstab with automount systemd params.</div><div><br></div><div># cat /etc/fstab | grep testyfs</div><div><div>/root/testyfs.raw /mnt/testyfs ext4 rw,relatime,data=ordered,noauto,x-systemd.automount 0 2</div>
</div><div><br></div><div>Trying to get systemd to see the new change</div><div><br></div><div># ls /run/systemd/generator | grep testy</div><div><nothing></div><div><br></div><div><div># systemctl daemon-reload</div>
<div># systemctl restart mnt-testyfs<br></div><div>Failed to issue method call: Unit mnt-testyfs.service failed to load: No such file or directory.</div><div>[root@t61p generator]# </div></div><div><div># ls /run/systemd/generator | grep testy</div>
</div><div><div>mnt-testyfs.automount</div><div>mnt-testyfs.mount</div></div><div># mount | grep testyfs</div><div><nothing></div><div><br></div><div>So far this looks good</div><div><div># ls /mnt/testyfs/</div></div>
<div><nothing, hmm, I thought it would automount the file system since I was referring to the directory?></div><div><br></div><div>Reboot to see if mounts the file system</div><div><br></div><div>After reboot, ls /mnt/testyfs</div>
<div># ls /mnt/testyfs</div><div><div>lost+found</div></div><div><br></div><div>Yes, its mounted, but was it mounted at boot or because I requested it?</div><div>Based upon the time in journalctl it looks like it was mounted on boot.</div>
<div><br></div><div>I'm confused. I thought the systemd automount capability was supposed to mount on demand. It appears it does not mount on demand but instead mounts on boot. Have I reconfigured something or do I misunderstand what automount means?</div>
<div><br></div><div><br></div><div><br></div>-- <br><div dir="ltr">John F. Davis<div>6 Kandes Court</div>
<div>Durham, NC 27713</div><div><a href="tel:919-888-8358" value="+19198888358" target="_blank">919-888-8358</a></div><div><br>独树一帜<br><br><br></div></div>
</div></div>