免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2011年12月25日 星期日

fstab, mtab

這兩個table頗像, 常搞混
fstab : filesystems table, 通常存在/etc/fstab or /etc/vfstab
mtab : mounted filesystems table, 通常存在/etc/mtab

根據wikipedia, 主要的差別在於mtab 只列出目前處於mounted狀態的裝置
而fstab 則列出所有可用的filesystems

有種說法 mtab 是 mount 這個命令參考fstab 執行後的結果 :
fstab -> mount -> mtab

那為何mtab中會出現 fstab中沒有的filesystem?

//===  摘錄
"... the main distinction being that the latter lists all available filesystems whereas the former lists only currently mounted ones ..."

fstab:
"... lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system's file system..."

"... the options field simply contains a comma-separated list of options which will be passed directly to mount when it tries to mount the filesystem...."


[ref]
http://en.wikipedia.org/wiki/Mtab
http://en.wikipedia.org/wiki/Fstab

沒有留言:

張貼留言