coreutils
[Top][All Lists]
Advanced

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

Re: df -t fails to filter fs type


From: Pádraig Brady
Subject: Re: df -t fails to filter fs type
Date: Sat, 05 Feb 2011 11:32:57 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 05/02/11 00:50, Dmitry V. Levin wrote:
> On Sat, Feb 05, 2011 at 03:28:01AM +0300, Dmitry V. Levin wrote:
> [...]
>> + df -T -t btrfs -t xfs -t ext4 -t ocfs2 -t gfs2 .
>> df: Warning: cannot read table of mounted file systems
>> Filesystem    Type   1K-blocks      Used Available Use% Mounted on
>> -                -    10485760    793504   9692256   8% /
>>
>> Looks like df agrees on the list of allowed fs types when it fails to find
>> out the fs type of the given filesystem, e.g. when /etc/mtab is a symlink
>> to /proc/mounts where given filesystem is not listed.
> 
> $ ls -log /etc/mtab
> lrwxrwxrwx 1 12 Feb  5 00:22 /etc/mtab -> /proc/mounts
> $ cat /etc/mtab
> proc /proc proc rw,nosuid 0 0
> $ strace -estatfs df -T -t ext4 /
> statfs("/", {f_type=0x1021994, f_bsize=4096, f_blocks=2621440, 
> f_bfree=2280903, f_bavail=2280903, f_files=1048576, f_ffree=999965, 
> f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
> Filesystem    Type   1K-blocks      Used Available Use% Mounted on
> -                -    10485760   1362148   9123612  13% /
> 
> That is, the fs type is 0x1021994 (S_MAGIC_TMPFS) but df fails to
> recognize that and agrees that it meets "ext4" limit.

Thanks for all the info.

df already knows about TMPFS, but since / is not listed in /proc/mounts
it doesn't match it as a type not to print, even though it does
a statfs. Hmm, there probably is a few things df could do differently here.

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]