Hi,
I have a question concerning /dev, tmpfs and swap.
In several modern linux distributions I've seen so far - there is /dev directory mounted on tmpfs pseudofilesystem:
# cat /proc/mounts |grep tmpfs
/dev /dev tmpfs rw,mode=755 0 0
As I know the tmpfs is pseudo-filesystem basing on swappable cache so it resides either in memory or in swap area.
As the contents of "/dev" directory is mounted on tmpfs and tmpfs is in swappable cache it may be swapped out to the storage.
I'm wondering what will happen if the "/dev" contents will be swapped out and the storage with swap area suddenly will start with reporting bad-sectors? Probably we will lost our swapped out "/dev" directory contents.
Why the most of linux distribution developers uses tmpfs instead of ramfs for /dev?
Is it possible to turn off swapping of tmpfs contents?
This is carefully explained
This is carefully explained in the documentation in /usr/src//docs/fs
(or it may be Documentation). Basically tmpfs is a safer version of ramfs.
Will