LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fstab entries with none (https://www.linuxquestions.org/questions/linux-newbie-8/fstab-entries-with-none-4175490683/)

adrhc 01-09-2014 07:59 AM

fstab entries with none
 
Hi, I have /etc/fstab:

/dev/ram0 / ext2 defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
none /dev/pts devpts defaults 0 0

What means none ? I expected to be the device name, why is none ?

gengisdave 01-09-2014 08:21 AM

they're all directories containing a virtual(pseudo)-filesystem, they don't use disk space and use a little bit of ram, so, they don't need to have a device associated, another way is 'proc /proc proc defaults 0 0' but it's the same

jpollard 01-09-2014 09:48 AM

The "none" is just a place holder required for the syntax of the fstab file.

For filesystems that don't use a device, you can actually put anything in there you want. "none" satisfies the syntax, and if at some time in the future change the fstab file such that a real device is needed, it will immediately report the error, and identify that "device doesn't exist". Putting anything else in there could just cause confusion.

rknichols 01-09-2014 10:35 AM

Quote:

Originally Posted by jpollard (Post 5094942)
Putting anything else in there could just cause confusion.

It is frequently recommended to put something meaningful to humans in that field, lest you one day get some message referring to "none".

adrhc 01-09-2014 11:45 AM

This means that when no real device name is declared than the "device" would be considered the RAM ?

jpollard 01-09-2014 12:55 PM

Quote:

Originally Posted by adrhc (Post 5095012)
This means that when no real device name is declared than the "device" would be considered the RAM ?

Not exactly... it is both yes and no. The filesystem used MAY be ram based... Now system tables are represented as a filesystem (like the /proc, /sys filesystems), and that is in memory, but is not anything like a device or even ramdisk. But like some FUSE filesystems, it just means there is no dedicated device. FUSE interprets file access (via the fstab) into whatever the user definition is. If there is a device assocated with it, it would be specified as configuration to the FUSE implementation, and that can be a database system (MySQLfs is one) or some other representation.

adrhc 01-10-2014 04:59 AM

I read about /proc from http://www.tldp.org/LDP/Linux-Filesy...tml/index.html and now for /proc things make sense: it's just the configurable path for the OS where "proc" information should be put.

Modern Linux distributions include a /sys directory as a virtual filesystem (sysfs, comparable to /proc, which is a procfs), which stores and allows modification of the devices connected to the system, whereas many traditional UNIX and Unix-like operating systems use /sys as a symbolic link to the kernel source tree. -> now I understand /sys

/dev/pts -> http://man7.org/linux/man-pages/man4/ptmx.4.html

The summary is that (for a begginer only):
the paths /proc, /sys, /dev/pts are not mount points for something existing on a HDD but locations where the OS is putting runtime information. That's why they have none - because is the OS's job to know who is the "device" where to store these runtime information.


All times are GMT -5. The time now is 10:14 PM.