mount command absurdly verbose?

Reindl Harald h.reindl at thelounge.net
Tue Nov 22 15:25:06 UTC 2011



Am 22.11.2011 16:09, schrieb Andras Simon:
> 2011/11/22, Ralf Corsepius <rc040203 at freenet.de>:
>> On 11/22/2011 01:57 PM, Andras Simon wrote:
> 
> [...]
> 
>>> I use df.
>>
>> Not that much better:
>>
>> Real world example:
>>
>> $ df
>> Filesystem      1K-blocks       Used Available Use% Mounted on
>> rootfs           50395844   32372316  15463528  68% /
>> ..
>> tmpfs             3057628      46748   3010880   2% /run
>> /dev/sda3        50395844   32372316  15463528  68% /
>> tmpfs             3057628      46748   3010880   2% /run
>> ...
>> /dev/sdb8       638902480  153233668 453214376  26% /users/user1
>> /dev/sdb8       638902480  153233668 453214376  26% /users/user2
>> /dev/sdb8       638902480  153233668 453214376  26% /users/user3
>> ...
> 
> Hmmm. I wonder why /dev/sdb8 is mounted to 3 different places?
> I see here something like this too:
> 
> /dev/sda1 on / type ext2 (rw,noatime,nodiratime,seclabel,errors=continue)
> /dev/sda1 on /home type ext2 (rw,noatime,nodiratime,seclabel,errors=continue)
> 
> sda1 should only be mounted to / (according to fstab).

you know "bind mounts"?
and that is why the behavior since F15 is a bad joke

you will need them to chroot sftp-users to different phyiscal folders
you will need them to provide a physical path of a production server
in test-environment while symlinks would change the realpath and
a bind mount does not

http://linux.die.net/man/2/mount
MS_BIND (Linux 2.4 onward)
Perform a bind mount, making a file or a directory subtree visible at another point
within a file system. Bind mounts may cross file system boundaries and span chroot(2)
jails. The filesystemtype and data arguments are ignored. Up until Linux 2.6.26,
mountflags was also ignored (the bind mount has the same mount options as the underlying
mount point). Since Linux 2.6.26, the MS_RDONLY flag is honored when making a bind mount.

/mnt/data/home               /home                                   none  bind
/mnt/data/.yum-cache         /var/cache/yum                          none  bind
/mnt/data/.tmp               /tmp                                    none  bind
/mnt/data/www/thelounge.net  /Volumes/dune/www-servers               none  bind
/mnt/data/www/phpincludes    /Volumes/dune/www-servers/phpincludes   none  bind

[root at rh:~]$ /bin/df -hT
Dateisystem   Typ    Größe Benut  Verf Ben%% Eingehängt auf
rootfs      rootfs     29G  8,0G   21G  28% /
udev      devtmpfs    7,8G  4,0K  7,8G   1% /dev
tmpfs        tmpfs    1,0G  196K  1,0G   1% /dev/shm
tmpfs        tmpfs    7,9G  572K  7,9G   1% /run
/dev/md1      ext4     29G  8,0G   21G  28% /
tmpfs        tmpfs    7,9G     0  7,9G   0% /sys/fs/cgroup
tmpfs        tmpfs    7,9G  572K  7,9G   1% /var/lock
tmpfs        tmpfs    7,9G  572K  7,9G   1% /var/run
tmpfs        tmpfs    7,9G     0  7,9G   0% /media
tmpfs        tmpfs    150M   64K  150M   1% /var/www/sessiondata
tmpfs        tmpfs    5,0G  186M  4,9G   4% /var/tmp
/dev/md0      ext4    485M   52M  429M  11% /boot
/dev/md2      ext4    3,6T  627G  3,0T  18% /mnt/data
/dev/md2      ext4    3,6T  627G  3,0T  18% /home
/dev/md2      ext4    3,6T  627G  3,0T  18% /var/cache/yum
/dev/md2      ext4    3,6T  627G  3,0T  18% /tmp
/dev/md2      ext4    3,6T  627G  3,0T  18% /Volumes/dune/www-servers
/dev/md2      ext4    3,6T  627G  3,0T  18% /Volumes/dune/www-servers/phpincludes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20111122/ec27286d/attachment.bin 


More information about the users mailing list