[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
df reports bind mounts creating noisy output
From: |
Bob Proulx |
Subject: |
df reports bind mounts creating noisy output |
Date: |
Sat, 1 Oct 2005 10:56:03 -0600 |
User-agent: |
Mutt/1.5.9i |
In order to develop and compile for a number of different GNU/Linux
system configurations it is typical to use a chroot build system
utilizing Linux kernel bind mounts. Also this allows running 32-bit
applications in a particular configuration on a 64-bit system.
However on these systems running 'df' produces long and redundant
output. This has been annoying me. Here is 'df -T' output.
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 reiserfs 115230652 106305108 8925544 93% /
tmpfs tmpfs 511324 0 511324 0% /dev/shm
/dev/hda5 xfs 18584960 477332 18107628 3% /chroots/oldtesuji
/home none 115230652 106305108 8925544 93% /chroots/rh9/home
/tmp none 115230652 106305108 8925544 93% /chroots/rh9/tmp
/home none 115230652 106305108 8925544 93% /chroots/rh7.3/home
/tmp none 115230652 106305108 8925544 93% /chroots/rh7.3/tmp
/home none 115230652 106305108 8925544 93% /chroots/sid64/home
/tmp none 115230652 106305108 8925544 93% /chroots/sid64/tmp
/home none 115230652 106305108 8925544 93% /chroots/sid32/home
/tmp none 115230652 106305108 8925544 93% /chroots/sid32/tmp
/home none 115230652 106305108 8925544 93% /chroots/woody/home
/tmp none 115230652 106305108 8925544 93% /chroots/woody/tmp
tmpfs tmpfs 10240 748 9492 8% /dev
That is very noisy. I propose that bind mounts of type "none" be
ignored by df when listing filesystem information. The information
only needs to be reported once. Here is this example with that change.
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 115230652 106310032 8920620 93% /
tmpfs 511324 0 511324 0% /dev/shm
/dev/hda5 18584960 477332 18107628 3% /chroots/oldtesuji
tmpfs 10240 748 9492 8% /dev
Here is a proposed patch to implement this behavior.
2005-10-01 Bob Proulx <address@hidden>
* (ME_DUMMY): Add "none" to the list of ignored fs_type
strings. Avoids listing bind mounts multiple times.
Index: mountlist.c
===================================================================
RCS file: /home/bob/src/coreutils-cvsroot/coreutils/lib/mountlist.c,v
retrieving revision 1.55
diff -u -r1.55 mountlist.c
--- mountlist.c 22 Sep 2005 06:05:39 -0000 1.55
+++ mountlist.c 1 Oct 2005 15:40:48 -0000
@@ -144,6 +144,7 @@
# define ME_DUMMY(Fs_name, Fs_type) \
(strcmp (Fs_type, "autofs") == 0 \
|| strcmp (Fs_type, "subfs") == 0 \
+ || strcmp (Fs_type, "none") == 0 \
/* for Irix 6.5 */ \
|| strcmp (Fs_type, "ignore") == 0)
#endif
- df reports bind mounts creating noisy output,
Bob Proulx <=
- Re: df reports bind mounts creating noisy output, Paul Eggert, 2005/10/02
- Re: df shouldn't list mount points that it can't access, Paul Eggert, 2005/10/11
- Re: df shouldn't list mount points that it can't access, n0dalus, 2005/10/11
- Re: df shouldn't list mount points that it can't access, n0dalus, 2005/10/11
- Re: df shouldn't list mount points that it can't access, Paul Eggert, 2005/10/11
- Re: df shouldn't list mount points that it can't access, n0dalus, 2005/10/12
- Re: df shouldn't list mount points that it can't access, Paul Eggert, 2005/10/12
- Re: df shouldn't list mount points that it can't access, n0dalus, 2005/10/12