[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mount weirdness



On Thu, Aug 08, 2019 at 12:09:11PM -0500, David Wright wrote:
> But the 2-1 vote wasn't whether error messages were emitted, but
> whether the system should mount an already-mounted partition onto
> another mount point. I get error messages and the mount fails.
> Others get no error messages (though they haven't demonstrated
> the lack) and a successful mount, so currently I'm in a minority
> of one.

It may very well depend on the version of Debian, the kernel, the mount
package, the type of file system... I don't know.  I was utterly surprised
when I got the result that I got, because I really did expect it to fail
with an error message.  I was in the process of writing an email reply of
the form "you can't do that, you have to use --bind or something".  I
tested it out, so I could paste the results into the email... and... this.

Here's what I get, on buster, amd64, standard 4.19 kernel, standard
mount package, ext4 file system, no encryption, no LVM, no mdraid.

wooledg:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4007532        0   4007532   0% /dev
tmpfs             804828     2432    802396   1% /run
/dev/sda6      187064220 19717412 157821460  12% /
tmpfs            4024136   130088   3894048   4% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            4024136        0   4024136   0% /sys/fs/cgroup
/dev/sda3        2818080    80600   2574616   4% /boot
tmpfs             804824       12    804812   1% /run/user/563
wooledg:~$ sudo mount /dev/sda3 /mnt
[sudo] password for wooledg: 
wooledg:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4007532        0   4007532   0% /dev
tmpfs             804828     2432    802396   1% /run
/dev/sda6      187064220 19717412 157821460  12% /
tmpfs            4024136   130068   3894068   4% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            4024136        0   4024136   0% /sys/fs/cgroup
/dev/sda3        2818080    80600   2574616   4% /mnt
tmpfs             804824       12    804812   1% /run/user/563
wooledg:~$ ls /mnt
config-4.19.0-5-amd64      initrd.img-4.9.0-8-amd64   vmlinuz-4.19.0-5-amd64
config-4.9.0-8-amd64       lost+found                 vmlinuz-4.9.0-8-amd64
grub                       System.map-4.19.0-5-amd64
initrd.img-4.19.0-5-amd64  System.map-4.9.0-8-amd64
wooledg:~$ ls /boot
config-4.19.0-5-amd64      initrd.img-4.9.0-8-amd64   vmlinuz-4.19.0-5-amd64
config-4.9.0-8-amd64       lost+found                 vmlinuz-4.9.0-8-amd64
grub                       System.map-4.19.0-5-amd64
initrd.img-4.19.0-5-amd64  System.map-4.9.0-8-amd64
wooledg:~$ sudo umount /mnt
wooledg:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4007532        0   4007532   0% /dev
tmpfs             804828     2432    802396   1% /run
/dev/sda6      187064220 19717412 157821460  12% /
tmpfs            4024136   130068   3894068   4% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            4024136        0   4024136   0% /sys/fs/cgroup
/dev/sda3        2818080    80600   2574616   4% /boot
tmpfs             804824       12    804812   1% /run/user/563
wooledg:~$ ls /mnt
wooledg:~$ 


Reply to: