Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0

What does the 6 columns mean?

share|improve this question

4 Answers 4

mtab lists currently mounted file systems and is used by the mount and unmount commands when you want to list your mounts or unmount all. It's not used by the kernel, which maintains its own list (in /proc/mounts or /proc/self/mounts). Its structure is the same as fstab (see manpage).

Separated by whitespace, its 6 columns are:

  1. Mount device if applicable
  2. Mount point
  3. File system
  4. Mount options
  5. Used by the dump command, 0 to ignore
  6. Used by the fsck command (which order to check at boot), 0 to ignore

*To clarify, mtab does contain values in the 5th and 6th columns in order to have the same structure as fstab, even though these columns are only meaningful when used in fstab.

share|improve this answer

The /etc/mtab file shares the same structure as /etc/fstab. According to this site the 5th and 6th column in /etc/fstab are used to store "Dump and fsck options". The 5th column is used to determine if dumping of the partition should be made, and the 6th to decide if an fsck must be processed on the partition.

In /etc/mtab, however, this two options loose their sense. Indeed, these two options are used when mounting the partitions, and /etc/mtab lists the partitions that are already mounted. If I understand it correctly, these option are not useful in /etc/mtab. They may be here for compatibility reasons with /etc/fstab, as the content of /etc/mtab must be directly usable in /etc/fstab

share|improve this answer
    
Good point about columns 5 and 6 being meaningless in /etc/mtab, but being there so that it can be pasted into /etc/fstab and be compatible –  thomasrutter May 13 '11 at 6:29

The columns in /etc/mtab are the same as /etc/fstab, except they represent currently mounted filesystems instead of those configured to be mounted by the installation or sysadmin.

You used to be able to cat /etc/mtab > /etc/fstab to save the current configuration of mounted filesystems for future boots. I wouldn't recommend this these says, asmtab does not preserve mounts by label or UUID, such as UUID= or LABEL= in /etc/fstab, which is quite common in distros these days. This will cause problems for devices which may not boot in the same order, such as external USB or eSATA drives.

man fstab will give you a description of the columns.

share|improve this answer
1  
I don't see how it answers the question. –  Agemen May 9 '11 at 6:39

The /etc/mtab file is the list of mounted file systems it is maintained by the mount and unmount programs. It's format is similar to the fstab file The columns arw

  • device the device or remote filesystem that is mounted.
  • mountpoint the place in the filesystem the device was mounted.
  • filesystemtype the type of filesystem mounted.
  • options the mount options for the filesystem
  • dump used by dump to decide if the filesystem needs dumping.
  • fsckorder used by fsck to detrmine the fsck pass to use.

Check the fstab man page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.