> Anyway I will make /etc/mtab as a regular file and disable > mtab_migrate() shell function in /lib/init/mount-functions.sh on wheezy > since this problem is a show-stopper for me.
I've met another problem of /bin/umount (mount package). But this is specific to the system where /etc/mtab is a regular file. I know the file on wheezy is a symlink, so I stopped registering another new bug. Here are the output and my test script. Unmounting $B, umount(8) writes a broken entry ("none rw,bind 0 0 0 0") in /etc/mtab. (there are very very long pathname in the output, and I omitted them by replacing "...") ---------------------------------------------------------------------- $ sh ./a.sh Linux jrofr 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux -rw-r--r-- 1 root root 1427 Jul 24 17:41 /etc/mtab + egrep -n (/tmp/|bind) /etc/mtab /proc/mounts /etc/mtab:19:/debug /sys/kernel/debug none rw,bind 0 0 /etc/mtab:28:/tmp/2940 /tmp/01234...567892222222.55 none rw,bind 0 0 /etc/mtab:29:/tmp/01234...567892222222.55 /tmp/2940 none rw,bind 0 0 /etc/mtab:30:/tmp/01234...567892222222.55 /tmp/01234...567892222222.4 none rw,bind 0 0 /proc/mounts:29:tmpfs /tmp/01234...567892222222.55 tmpfs rw,relatime 0 0 /proc/mounts:30:tmpfs /tmp/2940 tmpfs rw,relatime 0 0 /proc/mounts:31:tmpfs /tmp/01234...567892222222.4 tmpfs rw,relatime 0 0 + echo * unmount B * unmount B + sudo umount /tmp/01234...567892222222.55 + egrep -n (/tmp/|bind) /etc/mtab /proc/mounts /etc/mtab:19:/debug /sys/kernel/debug none rw,bind 0 0 /etc/mtab:28:/tmp/01234...567892222222.55 /tmp/2940 none rw,bind 0 0 /etc/mtab:29:none rw,bind 0 0 0 0 /proc/mounts:29:tmpfs /tmp/2940 tmpfs rw,relatime 0 0 /proc/mounts:30:tmpfs /tmp/01234...567892222222.4 tmpfs rw,relatime 0 0 ::: ---------------------------------------------------------------------- #!/bin/sh set -eu ten=0123456789 hundred=$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten hundred2=$hundred$hundred n1004=$hundred2/$hundred2/$hundred2/$hundred2/$hundred2 #test $(echo -n $n1004 | wc -c) -eq 1004 n4019=$n1004/$n1004/$n1004/$n1004 base=/tmp/$n4019 # n4080=$base/$ten$ten$ten$ten${ten}00080 # test $(echo -n $n4080 | wc -c) -eq 4080 # tmp=$n4080 n4092=$base/$ten$ten$ten$ten$ten${ten}2222222 test $(echo -n $n4092 | wc -c) -eq 4092 tmp=$n4092 A=/tmp/$$ B=$tmp.55 test $(echo -n $B | wc -c) -eq 4095 C=$tmp.4 test $(echo -n $C | wc -c) -eq 4094 alias f="egrep -n '(/tmp/|bind)' /etc/mtab /proc/mounts" alias msg="echo '*'" #set -x uname -a ls -l /etc/mtab mkdir -p $A $B $C #f sudo mount -t tmpfs tmpfs $A #f sudo mount -o bind $A $B #f sudo umount $A #f sudo mount -o bind $B $A #f sudo mount -o bind $B $C set -x f msg unmount B sudo umount $B f msg unmount A sudo umount $A f msg bind C to A sudo mount -o bind $C $A f msg unmount C sudo umount $C f msg unmount A sudo umount $A || : f set +x rm -r $base ---------------------------------------------------------------------- Because of Bug#717547, I had to keep /etc/mtab as a regular file. But this leads to another problem. Finally I cannot continue my development on wheezy. Ouch!! J. R. Okajima -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org