df -x tmpfs fails to exclude udev (/dev)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils |
New
|
Undecided
|
|||
coreutils (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
The command:
$ /bin/df -x tmpfs
should exclude all filesystems of type tmpfs. The udev filesystem mounted at /dev is of this type:
$ stat -f /dev
File: "/dev"
ID: 0 Namelen: 255 Type: tmpfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 4109101 Free: 4109098 Available: 4109098
Inodes: Total: 4109101 Free: 4108501
However, df still displays this filesystem:
$ df -l -x tmpfs
Filesystem 1K-blocks Used Available Use% Mounted on
...
udev 16436404 12 16436392 1% /dev
...
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: coreutils 8.20-3ubuntu5
ProcVersionSign
Uname: Linux 3.8.0-29-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Sun Sep 1 15:05:40 2013
InstallationDate: Installed on 2013-08-31 (0 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Sergio Durigan Junior (community): Approve
- Ubuntu Core Development Team: Pending requested
-
Diff: 62 lines (+40/-0)3 files modifieddebian/changelog (+12/-0)
debian/patches/series (+1/-0)
debian/patches/treat-devtmpfs-and-squashfs-as-dummy-filesystems.patch (+27/-0)
Changed in coreutils (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in coreutils (Ubuntu): | |
status: | Triaged → Fix Committed |
Thank you for opening this bug and helping make Ubuntu better. Indeed 'stat' states /dev is tmpfs.
But 'mount' gives out the type as 'devtmpfs' (!):
hggdh@chatto:~$ mount | grep udev
udev on /dev type devtmpfs (rw,mode=0755)
hggdh@chatto:~$
and, then, 'df -x devtmpfs' works as expected:
hggdh@chatto:~$ df -x devtmpfs
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda 20511356 2518264 16944516 13% /
none 4 0 4 0% /sys/fs/cgroup
tmpfs 50300 232 50068 1% /run
none 5120 0 5120 0% /run/lock
none 251484 52 251432 1% /run/shm
none 102400 0 102400 0% /run/user
hggdh@chatto:~$
But 'info mount', or 'man mount' do not list 'devtmpfs' as a valid system type. But 'devtmpfs' *is* a kernel-supported type...
I am not sure this is a coreutils issue per se; needs more research.