Bugzilla – Bug 326802
Encrypted home not umounted, loop device not deleted
Last modified: 2007-09-26 16:57:40 UTC
This Bug _may_ depend on yast2-users setup failure - see Bug #326794. After logout, the encrypted home remains mounted - reason: esd still running. Logged in again, the encrypted home will be mounted again!!: # mount /dev/sdc1 on / type ext3 (rw,acl,user_xattr) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) udev on /dev type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/mapper/vg0-space on /space type reiserfs (rw,acl,user_xattr) securityfs on /sys/kernel/security type securityfs (rw) /space/users on /home type none (rw,bind) /dev/mapper/_dev_loop0 on /home/mt type ext3 (rw) /dev/mapper/_dev_loop2 on /home/mt type ext3 (rw) # losetup -a /dev/loop0: [fd00]:3763171 (/home/mt.img) /dev/loop1: [000f]:8888 (/dev/loop0) /dev/loop2: [fd00]:3763171 (/home/mt.img) /dev/loop3: [000f]:8901 (/dev/loop2) The reason is: lsof is not installed (due missed rpm dependencies?). Killed all "mt" user processes (esd), umounted /dev/mapper/_dev_loop*, but a manual losetup -d was unable to remove the loop devices.
With installed lsof, it does not look terrible as above. The homes are umounted, just the loop devices are not deleted: /dev/loop0: [fd00]:3763171 (/home/mt.img) A manual losetup -d /dev/loop0 is able to delete it.
When I'm logged in, there are two loop devices involved: xanthos:~ # mount /dev/mapper/_dev_loop0 on /home/mt type ext3 (rw) (why it is mounted without acl,user_xattr options??) xanthos:~ # losetup -a /dev/loop0: [fd00]:3763171 (/home/mt.img) /dev/loop1: [000f]:9103 (/dev/loop0) after logout, the first one is still not deleted: xanthos:~ # losetup -a /dev/loop0: [fd00]:3763171 (/home/mt.img)
I have submitted a fixed pam_mount package which requires now lsof, util-linux and coreutils for a successful run of /sbin/umount.crypt. Cris: would you have a look at the "two devices" problem. Why is one not removed after logout?
I can take a look, but mounting, device ref counting, and unmounting are all handled by pam_mount.
Created attachment 173822 [details] new umount.crypt
Works fine for me now.
Ok, I have submitted the fix to STABLE.
Submit it to upstream...