36

I have following line in /etc/fstab:

UUID=E0FD-F7F5 /mnt/zeno vfat noauto,utf8,user,rw,uid=1000,gid=1000,fmask=0113,dmask=0002 0 0

The partition is freshly created by gnome-disks under the respective user, and spans the whole card.

Now: Running mount /mnt/zeno as user (1000) succeeds, but right after that I find out that it's actually not mounted: following umount /mnt/zeno fails with umount: /mnt/zeno: not mounted. When watching journalctl -f, I can see following messages appear when mounting:

[...] kernel: SELinux: initialized (dev mmcblk0p1, type vfat), uses genfs_contexts
[...] systemd[1]: Unit mnt-zeno.mount is bound to inactive service. Stopping, too.
[...] systemd[1]: Unmounting /mnt/zeno...
[...] systemd[1]: Unmounted /mnt/zeno.

So it seems that systemd indeed keeps unmounting the drive, but I can't find out why. I don't remember creating any custom ".mount" files. I tried to find something in /etc/systemd and in my home folder but did not find anything.

So what is this "mnt-zeno.mount" file and how can I review it? And most importantly, how can I mount the drive?

  • 1
    What is the output of systemctl --all Warning it will be long, but we're looking for the service that mnt-zeno.mount depends on. – eyoung100 Nov 25 '14 at 19:27
  • @eyoung100 is this the right line? dev-disk-by\x2dlabel-zeno.device loaded active plugged /dev/disk/by-label/zeno – Alois Mahdal Nov 25 '14 at 19:43
  • @don_crissti no dupes in fstab. daemon-reload helped, though, could you post it as answer (perhaps with some brief explanation)? – Alois Mahdal Nov 25 '14 at 19:49
41

mnt-zeno.mount was created by systemd-fstab-generator. According to Jonathan de Boyne Pollard's explanation on debian-user mailing list:

[systemd-fstab-generator is] a program that reads /etc/fstab at boot time and generates units that translate fstab records to the systemd way of doing things [.....]

The systemd way of doing things is mount and device units, per the systemd.mount(5) and systemd.device(5) manual pages. In the raw systemd way of doing things, there's a device unit named "dev-sde1.device" which is a base requirement for a mount unit named "media-lumix\x2dphotos.mount".

After altering fstab one should either run systemctl daemon-reload (this makes systemd to reparse /etc/fstab and pick up the changes) or reboot.

2

For people who come here via a google search (like me), the developers have known about this problem for almost 5(!) years as of writing this and still nobody tries to fix it. https://github.com/systemd/systemd/issues/1741

Workaround: Often, restarting the systemd daemon via systemctl daemon-reload solves the problem.

0

systemd: Unmounting /boot

One of the Redhat 7 Linux VM running on Azure platform. recently. i have restored the data from old backup with the help of below mentioned URL Azure KB article.

https://docs.microsoft.com/en-us/azure/backup/backup-azure-restore-files-from-vm

Post restoration activity Azure unmounted the disk automatically from the linux VM.

After that i dont see /boot filesystem on the server and it's unmounted automatically.

below is the error message starting seeing in the /var/log/messages

Dec 14 15:04:00 rhellinuxdbprodserver systemd: Unmounting /boot...
Dec 14 15:04:00 rhellinuxdbprodserver kernel: XFS (sda1): Unmounting Filesystem
Dec 14 15:04:00 rhellinuxdbprodserver systemd: Unmounted /boot.

To fix the issue i just reparse the "systemctl daemon-reload" post that /boot filesystem mounted properly.

Pre-Artifact

[root@rhellinuxdbprodserver boot]# df -Th | grep -v tmpfs
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda2      xfs        64G   51G   14G  79% /
/dev/sdb1      ext4      111G   17G   89G  16% /mnt/resource
[root@rhellinuxdbprodserver boot]# systemctl daemon-reload
[root@rhellinuxdbprodserver boot]# mount -a

Post-Artifact

[root@rhellinuxdbprodserver boot]# df -Th | grep -v tmpfs
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda2      xfs        64G   51G   14G  79% /
/dev/sdb1      ext4      111G   17G   89G  16% /mnt/resource
/dev/sda1      xfs       497M  203M  294M  41% /boot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.