LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Filesystem for /dev (https://www.linuxquestions.org/questions/slackware-14/filesystem-for-dev-712632/)

MQMan 03-18-2009 06:16 PM

Filesystem for /dev
 
/dev now uses the tmpfs filesystem. How come it doesn't show up in df:

Code:

eddie@Slacker:~$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/hda2 / xfs rw,attr2,nobarrier,noquota 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda1 /boot ext2 rw,errors=continue 0 0
tmpfs /dev/shm tmpfs rw 0 0

eddie@Slacker:~$ df -h -a
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2            9.6G  2.7G  7.0G  28% /
/proc                    0    0    0  -  /proc
sysfs                    0    0    0  -  /sys
usbfs                    0    0    0  -  /proc/bus/usb
/dev/hda1              15M  6.6M  7.5M  47% /boot
tmpfs                506M    0  506M  0% /dev/shm

Also, a new Slack install of 12.2 has the following in /etc/fstab:

Code:

tmpfs            /dev/shm        tmpfs      defaults        0  0
But that entry is missing in my 12.0 -> 12.1 -> 12.2 system. Should I add it to my "upgraded" system. Or, indeed, is it ever needed at all, as it's mounting a tmpfs filesystem to another tmpfs filesystem.

Cheers.

allanf 03-19-2009 03:56 PM

Quote:

Originally Posted by MQMan (Post 3479969)
/dev now uses the tmpfs filesystem. How come it doesn't show up in df:

Code:

eddie@Slacker:~$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/hda2 / xfs rw,attr2,nobarrier,noquota 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda1 /boot ext2 rw,errors=continue 0 0
tmpfs /dev/shm tmpfs rw 0 0

eddie@Slacker:~$ df -h -a
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2            9.6G  2.7G  7.0G  28% /
/proc                    0    0    0  -  /proc
sysfs                    0    0    0  -  /sys
usbfs                    0    0    0  -  /proc/bus/usb
/dev/hda1              15M  6.6M  7.5M  47% /boot
tmpfs                506M    0  506M  0% /dev/shm

Also, a new Slack install of 12.2 has the following in /etc/fstab:

Code:

tmpfs            /dev/shm        tmpfs      defaults        0  0
But that entry is missing in my 12.0 -> 12.1 -> 12.2 system. Should I add it to my "upgraded" system. Or, indeed, is it ever needed at all, as it's mounting a tmpfs filesystem to another tmpfs filesystem.

Cheers.

The 'df' command walks through the mount point table and reports on "mounted" partitions only. The "/dev" is not mounted as the contents are drivers for the hardware and not storage.

guanx 03-22-2009 11:58 AM

/etc/mtab does not contain all mounted devices but only the ones intended for normal users to see. You can see /proc/mounts for a complete list.

gnashley 03-22-2009 01:49 PM

guanx is correct -when /dev gets mounted on tmpfs the mount command uses the '-n' option which causes it to be mounted without creating an entry in /etc/mtab.


All times are GMT -5. The time now is 04:29 PM.