LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Filesystems supported by the kernel (/proc/filesystems) (http://www.linuxquestions.org/questions/linux-newbie-8/filesystems-supported-by-the-kernel-proc-filesystems-4175474211/)

gacanepa 08-21-2013 08:44 PM

Filesystems supported by the kernel (/proc/filesystems)
 
Hi everyone,
From what I've read in plenty of places, everything seems to indicate that the /proc/filesystems file lists all the filesystems supported by the kernel currently in use. That is what I have read in this respectable site and in the RHEL 6 documentation.
Also, I have found 2 other threads in this very forum (1, 2) that deal with a similar question.
However, it is still not clear to me whether the /proc/filesystems file actualy lists all the filesystem types supported by the kernel currently in use, or if it only shows already loaded/present filesystem types.
I feel strongly about the second option, since this command
Code:

cat /proc/filesystems
did not include the iso9660 filesystem, and then I inserted a CD in my drive, ran the same command, and there it was, at the end of the list.
I looked up the config-3.5.0-17-generic inside /boot and I found these lines:
Code:

# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

What does the "m" mean? (I assume "y" means "yes"). By the way, do these lines represent kernel modules by themselves?
Sorry for all the questions! But thanks in advance!

astrogeek 08-21-2013 08:52 PM

Quote:

Originally Posted by gacanepa (Post 5013514)
Hi everyone,
From what I've read in plenty of places, everything seems to indicate that the /proc/filesystems file lists all the filesystems supported by the kernel currently in use. That is what I have read in this respectable site and in the RHEL 6 documentation.
Also, I have found 2 other threads in this very forum (1, 2) that deal with a similar question.
However, it is still not clear to me whether the /proc/filesystems file actualy lists all the filesystem types supported by the kernel currently in use, or if it only shows already loaded/present filesystem types.
I feel strongly about the second option, since this command
Code:

cat /proc/filesystems
did not include the iso9660 filesystem, and then I inserted a CD in my drive, ran the same command, and there it was, at the end of the list.
I looked up the config-3.5.0-17-generic inside /boot and I found these lines:
Code:

# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

What does the "m" mean? (I assume "y" means "yes"). By the way, do these lines represent kernel modules by themselves?
Sorry for all the questions! But thanks in advance!

To answer your last question first, "m" means that it was compiled as a module, "y" means that it was compiled into the kernel, "n" means that it was not built.

To the first question, it is clear that it means "/proc/filesystems file lists all the filesystems supported by the kernel currently in use", and "currently in use" means just that - the kernel (and it's modules) currently in use.

So, since ISO9660 was built as a module, it is not "in the kernel" until the module is loaded, so the kernel currently in use does not support it until the module is loaded.

Hope that makes sense.

TobiSGD 08-21-2013 08:53 PM

The file tells you all filesystems that are currently supported by the kernel. With putting in a CD you made the kernel load the iso9660 module, so that this was added to the list. I use a kernel with many filesystems inbuilt and /proc/filesystems shows up filesystems that were for sure never in use with this kernel.
Quote:

What does the "m" mean? (I assume "y" means "yes"). By the way, do these lines represent kernel modules by themselves?
These lines represent kernel options, some of them are options for specific drivers (the m tells the kernel to compile the iso9660 driver as a loadable module), some are options for the drivers (here the Joliet option, which is an extension to iso9660 and enabled), some are kernel options(for example the (in)famous PAE support option, not present in your example).

gacanepa 08-21-2013 09:58 PM

Thanks a lot astrogeek and TobiSGD. This is much clearer now. I already added to your reputation and will mark this thread as solved.

gacanepa 08-22-2013 07:57 AM

Hi again guys. Hope you don't mind another question related to this same thing.
Let's suppose that after inserting a CD or a DVD in the drive, the iso9660 filesystem module is not loaded automatically by the kernel and therefore it's not visible in the /proc/filesystems file.
In the man page for modprobe, I found the following:
Quote:

modprobe intelligently adds or removes a module from the Linux kernel: note that for convenience, there is no difference
between _ and - in module names (automatic underscore conversion is performed). modprobe looks in the module directory
/lib/modules/`uname -r` for all the modules and other files...
Then I checked the /lib/modules/3.2.0-4-686-pae directory and found and modules.alias file, and found out that isofs is an alias for the isso9660 module.
So the question is, say the iso9660 module is not loaded automatically by the kernel as I said before, am I correct in assuming that
Code:

modprobe -a isofs
inserts the module into the running kernel?
At least, that's what the result of my test seems to indicate ;). I'll copy here the /proc/filesystems file before and after the test:
BEFORE:
Code:

root@debian:/lib/modules/3.2.0-4-686-pae# cat /proc/filesystems
nodev  sysfs
nodev  rootfs
nodev  bdev
nodev  proc
nodev  cgroup
nodev  cpuset
nodev  tmpfs
nodev  devtmpfs
nodev  debugfs
nodev  securityfs
nodev  sockfs
nodev  pipefs
nodev  anon_inodefs
nodev  devpts
nodev  ramfs
nodev  hugetlbfs
nodev  pstore
nodev  mqueue
nodev  usbfs
        ext3
nodev  rpc_pipefs
nodev  nfs
nodev  nfs4
nodev  nfsd
root@debian:/lib/modules/3.2.0-4-686-pae#

AFTER (modprobe -a isofs):
Code:

root@debian:/lib/modules/3.2.0-4-686-pae# cat /proc/filesystems
nodev  sysfs
nodev  rootfs
nodev  bdev
nodev  proc
nodev  cgroup
nodev  cpuset
nodev  tmpfs
nodev  devtmpfs
nodev  debugfs
nodev  securityfs
nodev  sockfs
nodev  pipefs
nodev  anon_inodefs
nodev  devpts
nodev  ramfs
nodev  hugetlbfs
nodev  pstore
nodev  mqueue
nodev  usbfs
        ext3
nodev  rpc_pipefs
nodev  nfs
nodev  nfs4
nodev  nfsd
        iso9660
root@debian:/lib/modules/3.2.0-4-686-pae#

Then after removing the iso9660 module (modprobe -r isofs):
Code:

root@debian:/lib/modules/3.2.0-4-686-pae# cat /proc/filesystems
nodev  sysfs
nodev  rootfs
nodev  bdev
nodev  proc
nodev  cgroup
nodev  cpuset
nodev  tmpfs
nodev  devtmpfs
nodev  debugfs
nodev  securityfs
nodev  sockfs
nodev  pipefs
nodev  anon_inodefs
nodev  devpts
nodev  ramfs
nodev  hugetlbfs
nodev  pstore
nodev  mqueue
nodev  usbfs
        ext3
nodev  rpc_pipefs
nodev  nfs
nodev  nfs4
nodev  nfsd
root@debian:/lib/modules/3.2.0-4-686-pae#


astrogeek 08-22-2013 02:15 PM

Yes that is correct as I read your post.


All times are GMT -5. The time now is 04:43 AM.