[systemd-devel] systemd and automount
John Davis
davisjf at gmail.com
Wed Nov 6 09:19:48 PST 2013
Hello
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.
Creating a ramdisk image.
# dd if=/dev/zero of=testyfs.raw bs=4096 count=1000
# mkfs.ext4 -F testyfs.raw
Making a mount point in /mnt
# mkdir /mnt/testyfs
Adding an etnry /etc/fstab with automount systemd params.
# cat /etc/fstab | grep testyfs
/root/testyfs.raw /mnt/testyfs ext4
rw,relatime,data=ordered,noauto,x-systemd.automount 0 2
Trying to get systemd to see the new change
# ls /run/systemd/generator | grep testy
<nothing>
# systemctl daemon-reload
# systemctl restart mnt-testyfs
Failed to issue method call: Unit mnt-testyfs.service failed to load: No
such file or directory.
[root at t61p generator]#
# ls /run/systemd/generator | grep testy
mnt-testyfs.automount
mnt-testyfs.mount
# mount | grep testyfs
<nothing>
So far this looks good
# ls /mnt/testyfs/
<nothing, hmm, I thought it would automount the file system since I was
referring to the directory?>
Reboot to see if mounts the file system
After reboot, ls /mnt/testyfs
# ls /mnt/testyfs
lost+found
Yes, its mounted, but was it mounted at boot or because I requested it?
Based upon the time in journalctl it looks like it was mounted on boot.
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?
--
John F. Davis
6 Kandes Court
Durham, NC 27713
919-888-8358
独树一帜
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131106/21474c57/attachment.html>
More information about the systemd-devel
mailing list