Dear Maintainer,
* What led up to the situation?
I have a /mnt/boot/ filesystem specified in /etc/fstab that is moutned on
each boot:
/dev/disk/by-id/scsi-20010b9fd080ccf7e-part2 /mnt/boot spadfs defaults 0 2
* What exactly did you do (or not do) that was effective (or
ineffective)?
I tried to unmount the filesystem with this command:
umount /mnt/boot
and spin down the disk with this command:
sdparm -r -C stop /dev/disk/by-id/scsi-20010b9fd080ccf7e
* What was the outcome of this action?
The filesystem disappeared from /mnt/boot, but it was not unmounted; it
was reporting I/O errors because the disk was spun down.
* What outcome did you expect instead?
The umount command should unmount a filesystem.
I was analyzing this problem and it turned out that the /mnt/boot
filesystem was not unmounted because it was still kept mounted in
namespaces of two daemons - rsyslog and virtlogd.
grep boot /proc/*/mountinfo showed:
/proc/1686/mountinfo:508 402 8:50 / /mnt/boot rw,relatime shared:156 - spadfs /dev/sdd2 rw,umask=022,prealloc_part=8,prealloc_min=4096,prealloc_max=1048576,xfer_size=524288,buffer_size=4096,prefetch=524288,sync_time=120,no_checksums,ino64=no
/proc/1686/mountinfo:405 508 8:50 /boot /mnt/boot/boot ro,nosuid,relatime shared:157 - spadfs /dev/sdd2 rw,umask=022,prealloc_part=8,prealloc_min=4096,prealloc_max=1048576,xfer_size=524288,buffer_size=4096,prefetch=524288,sync_time=120,no_checksums,ino64=no
/proc/1694/mountinfo:396 245 8:50 / /mnt/boot rw,relatime shared:195 - spadfs /dev/sdd2 rw,umask=022,prealloc_part=8,prealloc_min=4096,prealloc_max=1048576,xfer_size=524288,buffer_size=4096,prefetch=524288,sync_time=120,no_checksums,ino64=no
/proc/1694/mountinfo:249 396 8:50 /boot /mnt/boot/boot ro,relatime shared:196 - spadfs /dev/sdd2 rw,umask=022,prealloc_part=8,prealloc_min=4096,prealloc_max=1048576,xfer_size=524288,buffer_size=4096,prefetch=524288,sync_time=120,no_checksums,ino64=no
When I restarted the daemons with:
systemctl restart rsyslog
systemctl restart virtlogd
the filesystem was truly unmounted.
I think that systemd shouldn't clone the mount namespace to various
daemons and make filesystems non-unmountable.
This problem started to happen after upgrade to Debian 13. I didn't
observe it with previous releases.
Mikulas