FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-19-2011, 10:30 PM
Reindl Harald
 
Default F15: ugly behavior of "df"

what triggers that since F15 every bind-mount is displayed in
"df" with "ext4" and the full volume-szize and additionally
if BIND is running in a chroot FOUR volumes with the size
of the root-fs are shown and a normal user gets "access denied"?

this is way too much for 3 physical volumes!

[root@rh:~]$ /bin/df -hT
Dateisystem Typ Größe Benut Verf Ben%% Eingehängt auf
rootfs rootfs 29G 8,5G 21G 30% /
udev devtmpfs 7,8G 4,0K 7,8G 1% /dev
tmpfs tmpfs 1,0G 0 1,0G 0% /dev/shm
tmpfs tmpfs 7,9G 552K 7,9G 1% /run
/dev/md1 ext4 29G 8,5G 21G 30% /
tmpfs tmpfs 7,9G 0 7,9G 0% /sys/fs/cgroup
tmpfs tmpfs 7,9G 552K 7,9G 1% /var/run
tmpfs tmpfs 7,9G 552K 7,9G 1% /var/lock
tmpfs tmpfs 150M 0 150M 0% /var/www/sessiondata
tmpfs tmpfs 7,9G 0 7,9G 0% /media
/dev/md0 ext4 485M 48M 437M 10% /boot
/dev/md2 ext4 3,6T 474G 3,1T 14% /mnt/data
/dev/md2 ext4 3,6T 474G 3,1T 14% /home
/dev/md2 ext4 3,6T 474G 3,1T 14% /Volumes/dune/www-servers
/dev/md2 ext4 3,6T 474G 3,1T 14% /Volumes/dune/www-servers/phpincludes
/dev/md1 ext4 29G 8,5G 21G 30% /var/named/chroot/etc/named
/dev/md1 ext4 29G 8,5G 21G 30% /var/named/chroot/usr/lib64/bind
/dev/md1 ext4 29G 8,5G 21G 30% /var/named/chroot/etc/named.iscdlv.key
/dev/md1 ext4 29G 8,5G 21G 30% /var/named/chroot/etc/named.root.key

[root@rh:~]$ su - harry

[harry@rh:~]$ /bin/df -hT
Dateisystem Typ Größe Benut Verf Ben%% Eingehängt auf
rootfs rootfs 29G 8,5G 21G 30% /
udev devtmpfs 7,8G 4,0K 7,8G 1% /dev
tmpfs tmpfs 1,0G 0 1,0G 0% /dev/shm
tmpfs tmpfs 7,9G 552K 7,9G 1% /run
/dev/md1 ext4 29G 8,5G 21G 30% /
tmpfs tmpfs 7,9G 0 7,9G 0% /sys/fs/cgroup
tmpfs tmpfs 7,9G 552K 7,9G 1% /var/run
tmpfs tmpfs 7,9G 552K 7,9G 1% /var/lock
tmpfs tmpfs 150M 0 150M 0% /var/www/sessiondata
tmpfs tmpfs 7,9G 0 7,9G 0% /media
/dev/md0 ext4 485M 48M 437M 10% /boot
/dev/md2 ext4 3,6T 474G 3,1T 14% /mnt/data
/dev/md2 ext4 3,6T 474G 3,1T 14% /home
/dev/md2 ext4 3,6T 474G 3,1T 14% /Volumes/dune/www-servers
/dev/md2 ext4 3,6T 474G 3,1T 14% /Volumes/dune/www-servers/phpincludes
/bin/df: „/var/named/chroot/etc/named“: Keine Berechtigung
/bin/df: „/var/named/chroot/usr/lib64/bind“: Keine Berechtigung
/bin/df: „/var/named/chroot/etc/named.iscdlv.key“: Keine Berechtigung
/bin/df: „/var/named/chroot/etc/named.root.key“: Keine Berechtigung

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-20-2011, 12:11 AM
Nicholas Miell
 
Default F15: ugly behavior of "df"

On 06/19/2011 03:30 PM, Reindl Harald wrote:
> what triggers that since F15 every bind-mount is displayed in
> "df" with "ext4" and the full volume-szize and additionally
> if BIND is running in a chroot FOUR volumes with the size
> of the root-fs are shown and a normal user gets "access denied"?
>
> this is way too much for 3 physical volumes!

This is because /proc/mounts doesn't store the fact that they're bind
mounts, and /etc/mtab is now a symlink to /proc/mounts instead of a
regular file maintained by mount and umount.

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-20-2011, 12:16 AM
Reindl Harald
 
Default F15: ugly behavior of "df"

Am 20.06.2011 02:11, schrieb Nicholas Miell:
> On 06/19/2011 03:30 PM, Reindl Harald wrote:
>> what triggers that since F15 every bind-mount is displayed in
>> "df" with "ext4" and the full volume-szize and additionally
>> if BIND is running in a chroot FOUR volumes with the size
>> of the root-fs are shown and a normal user gets "access denied"?
>>
>> this is way too much for 3 physical volumes!
>
> This is because /proc/mounts doesn't store the fact that they're bind
> mounts, and /etc/mtab is now a symlink to /proc/mounts instead of a
> regular file maintained by mount and umount

hm - bad

thinking of chrooted sftp with a hughe count of bind-mounts
for the users this will be really confusing



--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-20-2011, 08:04 AM
Reindl Harald
 
Default F15: ugly behavior of "df"

Am 20.06.2011 02:16, schrieb Reindl Harald:
>
> Am 20.06.2011 02:11, schrieb Nicholas Miell:
>> On 06/19/2011 03:30 PM, Reindl Harald wrote:
>>> what triggers that since F15 every bind-mount is displayed in
>>> "df" with "ext4" and the full volume-szize and additionally
>>> if BIND is running in a chroot FOUR volumes with the size
>>> of the root-fs are shown and a normal user gets "access denied"?
>>>
>>> this is way too much for 3 physical volumes!
>>
>> This is because /proc/mounts doesn't store the fact that they're bind
>> mounts, and /etc/mtab is now a symlink to /proc/mounts instead of a
>> regular file maintained by mount and umount
>
> hm - bad
>
> thinking of chrooted sftp with a hughe count of bind-mounts
> for the users this will be really confusing

and here the first cron-mails because scripts do see things they
have not to see, this is not only ugly, it changes behavior and
should be reverted - not anything waht will be changed in things
worked for nearly 40 years makes them really better!

-------- Original-Nachricht --------
Betreff: Cron <root@srv-rhsoft> nice -n 19 run-parts /etc/cron.daily
Datum: Mon, 20 Jun 2011 04:02:09 +0200 (CEST)
Von: Cron Daemon <root@srv-rhsoft.rhsoft.net>
An: root@srv-rhsoft.rhsoft.net

/etc/cron.daily/linuxcounter.cron:

/bin/df: `/var/named/chroot/etc/named': Permission denied
/bin/df: `/var/named/chroot/usr/lib64/bind': Permission denied
/bin/df: `/var/named/chroot/etc/named.iscdlv.key': Permission denied
/bin/df: `/var/named/chroot/etc/named.root.key': Permission denied

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-20-2011, 07:01 PM
Jeff Spaleta
 
Default F15: ugly behavior of "df"

For context on the change in mtab behavior please read over the
upstream util-linux mailing list discussions concerning /etc/mtab.

I would suggest you start your review of discussion with this thread from 2007:
http://thread.gmane.org/gmane.linux.file-systems/15576/focus=15594


-jef

On Mon, Jun 20, 2011 at 12:04 AM, Reindl Harald <h.reindl@thelounge.net> wrote:
>
>
> Am 20.06.2011 02:16, schrieb Reindl Harald:
>>
>> Am 20.06.2011 02:11, schrieb Nicholas Miell:
>>> On 06/19/2011 03:30 PM, Reindl Harald wrote:
>>>> what triggers that since F15 every bind-mount is displayed in
>>>> "df" with "ext4" and the full volume-szize and additionally
>>>> if BIND is running in a chroot FOUR volumes with the size
>>>> of the root-fs are shown and a normal user gets "access denied"?
>>>>
>>>> this is way too much for 3 physical volumes!
>>>
>>> This is because /proc/mounts doesn't store the fact that they're bind
>>> mounts, and /etc/mtab is now a symlink to /proc/mounts instead of a
>>> regular file maintained by mount and umount
>>
>> hm - bad
>>
>> thinking of chrooted sftp with a hughe count of bind-mounts
>> for the users this will be really confusing
>
> and here the first cron-mails because scripts do see things they
> have not to see, this is not only ugly, it changes behavior and
> should be reverted - not anything waht will be changed in things
> worked for nearly 40 years makes them really better!
>
> -------- Original-Nachricht --------
> Betreff: Cron <root@srv-rhsoft> * * *nice -n 19 run-parts /etc/cron.daily
> Datum: Mon, 20 Jun 2011 04:02:09 +0200 (CEST)
> Von: Cron Daemon <root@srv-rhsoft.rhsoft.net>
> An: root@srv-rhsoft.rhsoft.net
>
> /etc/cron.daily/linuxcounter.cron:
>
> /bin/df: `/var/named/chroot/etc/named': Permission denied
> /bin/df: `/var/named/chroot/usr/lib64/bind': Permission denied
> /bin/df: `/var/named/chroot/etc/named.iscdlv.key': Permission denied
> /bin/df: `/var/named/chroot/etc/named.root.key': Permission denied
>
>
> --
> devel mailing list
> devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
>
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-23-2011, 02:53 PM
Karel Zak
 
Default F15: ugly behavior of "df"

On Mon, Jun 20, 2011 at 12:30:15AM +0200, Reindl Harald wrote:
> what triggers that since F15 every bind-mount is displayed in
> "df" with "ext4" and the full volume-szize and additionally

https://bugzilla.redhat.com/show_bug.cgi?id=709351

The tools (not only df(1)) have to be fixed to de-duplicate the list
of fileststems. It's standard behavior that the same filesystem could
be mounted on more places.

The 'bind' flag is another way how to achieve that the filesystem is
mounted on another place. Nothing other.

# mount /dev/sdb1 /mnt/A
# mount --bind /mnt/A /mnt/B

is the same thing as:

# mount /dev/sdb1 /mnt/A
# mount /dev/sdb1 /mnt/B

there is nothing like 'bind' state of the filesystem. The 'bind' info in
mtab was always broken by design.

http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html

Karel

--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-23-2011, 03:21 PM
Pdraig Brady
 
Default F15: ugly behavior of "df"

On 23/06/11 15:53, Karel Zak wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=709351
>
> The tools (not only df(1)) have to be fixed to de-duplicate the list
> of fileststems. It's standard behavior that the same filesystem could
> be mounted on more places.
>
> The 'bind' flag is another way how to achieve that the filesystem is
> mounted on another place. Nothing other.
>
> # mount /dev/sdb1 /mnt/A
> # mount --bind /mnt/A /mnt/B
>
> is the same thing as:
>
> # mount /dev/sdb1 /mnt/A
> # mount /dev/sdb1 /mnt/B
>
> there is nothing like 'bind' state of the filesystem. The 'bind' info in
> mtab was always broken by design.
>
> http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html

Thanks for that info.

I did a find_bind_mount() function as part of:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ddf6fb86
I also adjusted df to handle bind mounts better with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=0380e4c9
I'll have to revisit these to see if they're still valid.

I'll have a look at fixing up df (I guess I'll reverse the mount list
and have some internal hash to detect dupes?).

I need to see why F15 has started doing this too.
For example on my system there are 2 _identical_ entries
for /home in /proc/mounts.

cheers,
Pdraig.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-23-2011, 09:44 PM
Tomas Mraz
 
Default F15: ugly behavior of "df"

On Thu, 2011-06-23 at 16:21 +0100, Pdraig Brady wrote:
> On 23/06/11 15:53, Karel Zak wrote:
> > https://bugzilla.redhat.com/show_bug.cgi?id=709351
> >
> > The tools (not only df(1)) have to be fixed to de-duplicate the list
> > of fileststems. It's standard behavior that the same filesystem could
> > be mounted on more places.
> >
> > The 'bind' flag is another way how to achieve that the filesystem is
> > mounted on another place. Nothing other.
> >
> > # mount /dev/sdb1 /mnt/A
> > # mount --bind /mnt/A /mnt/B
> >
> > is the same thing as:
> >
> > # mount /dev/sdb1 /mnt/A
> > # mount /dev/sdb1 /mnt/B
> >
> > there is nothing like 'bind' state of the filesystem. The 'bind' info in
> > mtab was always broken by design.
> >
> > http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html
>
> Thanks for that info.
>
> I did a find_bind_mount() function as part of:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ddf6fb86
> I also adjusted df to handle bind mounts better with:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=0380e4c9
> I'll have to revisit these to see if they're still valid.
>
> I'll have a look at fixing up df (I guess I'll reverse the mount list
> and have some internal hash to detect dupes?).
>
> I need to see why F15 has started doing this too.
> For example on my system there are 2 _identical_ entries
> for /home in /proc/mounts.

If you have the sandbox package installed, that is the reason.

--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-24-2011, 07:43 AM
Andreas Schwab
 
Default F15: ugly behavior of "df"

Karel Zak <kzak@redhat.com> writes:

> The 'bind' flag is another way how to achieve that the filesystem is
> mounted on another place. Nothing other.
>
> # mount /dev/sdb1 /mnt/A
> # mount --bind /mnt/A /mnt/B
>
> is the same thing as:
>
> # mount /dev/sdb1 /mnt/A
> # mount /dev/sdb1 /mnt/B

There is a big difference between "mount --bind /mnt/A/B /mnt/B" and
"mount /dev/sdb1 /mnt/B".

Andreas.

--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 06-24-2011, 10:02 AM
Karel Zak
 
Default F15: ugly behavior of "df"

On Fri, Jun 24, 2011 at 09:43:32AM +0200, Andreas Schwab wrote:
> Karel Zak <kzak@redhat.com> writes:
>
> > The 'bind' flag is another way how to achieve that the filesystem is
> > mounted on another place. Nothing other.

Pedantic note, there are some extra features usable with MS_BIND,
like MS_UNBINDABLE, MS_REC, etc.

> > # mount /dev/sdb1 /mnt/A
> > # mount --bind /mnt/A /mnt/B
> >
> > is the same thing as:
> >
> > # mount /dev/sdb1 /mnt/A
> > # mount /dev/sdb1 /mnt/B
>
> There is a big difference between "mount --bind /mnt/A/B /mnt/B" and
> "mount /dev/sdb1 /mnt/B".

Sure. The difference is that the mountpoint is not connected with root
of the filesystem, but with some subdirectory. This information is
stored in /proc/self/mountinfo.

The important is that there is not dependence on the original
mountpoint -- this fact was ignored in mtab, because mtab info about
bind mounts was always based on the paths (e.g. /mnt/A/B) instead on
devices (e.g. /dev/sdb1).

BTW, this is not specific to bind mounts, you can do the same with
btrfs subvolumes.

# mount /dev/sdb1 /mnt/A
# btrfs subvolume create /mnt/A/B
# mount /dev/sdb1 /mnt/B subvol=B

$ df | grep sdb1
/dev/sdb1 1022976 64 892032 1% /mnt/A
/dev/sdb1 1022976 64 892032 1% /mnt/B

$ findmnt /dev/sdb1
TARGET SOURCE FSTYPE OPTIONS
/mnt/A /dev/sdb1 btrfs rw,relatime,ssd
/mnt/B /dev/sdb1[/b] btrfs rw,relatime,ssd


Anyway, let's fix the utils to be usable with Linux VFS independently
on mtab.

Karel

--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 12:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org