日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

sa239學習筆記之三mount 和umount

Moduel 4 Performing Mounts and Umounts

Note – While system administrators typically use the /usr/sbin/mount
command, the system boot scripts use the /sbin/mount command.

介紹/etc/vfstab文件:

/etc/vfstab列出系統(tǒng)啟動時自動mount的文件, 除/etc/mnttab和/var/run之外;
/etc/vfstab文件分出七個區(qū)域:
device to mount 被mount的設備和偽設備
device to fsck The raw or character device e.g. /dev/rdsk下的
對于偽設備如:/proc 或 fd 這項可寫 -
mount point mount 的路徑
FS type 文件系統(tǒng)類型
fsck pass 指示在系統(tǒng)啟動時是否fsck檢測;0不檢1表示fsck為系統(tǒng)正常啟動運行
大于1時表示把此設備加入fsck運行列表,fsck可同時檢測8個設備,
mountall命令忽略此項
mount at boot yes 要求啟動時自動mount,no 則不

Note – For / (root), /usr, and /var (if it is a separate file system) file
systems, the mount at boot fIEld value is specified as no. The kernel
mounts these file systems as part of the boot sequence before the
mountall command is run. The mount command explicitly mounts the
file systems / (root) and /usr as specified in the
/etc/rcS.d/S30rootusr.sh script and the /var file system as specified
in the /etc/rcS.d/S70buildmnttab script.

mount options A comma-separated list of options passed to the
mount command. A dash (-) indicates the use of
default mount options.


介紹/etc/mnttab文件:
此文件是一個只讀文件,當mount一項時,會在此文件中入一條,umount后也會在此文件中刪除相應項;

包括五項區(qū)域:

mount point 掛接點
Device Name 設備名,塊設備是文件系統(tǒng)的物理名稱;
Mount Options 文件系統(tǒng)上生效的掛載選項列表
dev=number 主從設備號
Date and time mounted mount的日期時間


使用mount

mount /dev/dsk/c#d#t#s# /mountpoint
不加參數(shù)時,使用以下默認屬性:

read/write Indicates whether reads and writes are allowed on
the file system.
setuid Permits the execution of setuid programs in the
file system.
intr/nointr Allows and forbids keyboard interrupts to kill a
process that is waiting for an operation on a locked
file system.
nologging Indicates that logging is not enabled for the ufs file
system.
largefiles Allows for the creation of files larger than 2 Gbytes.
A file system mounted with this option can contain
files larger than 2 Gbytes.
xattr Supports extended attributes not found in
standard Unix attributes.
onerror=action Specifies the action that the ufs file system should
take to recover from an internal inconsistency on a
file system. An action can be specified as:
panic—Causes a forced system shutdown. This is
the default.
lock — Applies a file system lock to the file
system.
umount — Forcibly unmounts the file system.
------------------------------------------------------------------------------
Note – Due to file system overhead, the largest file size that can be created
is approximately 866 Gbytes.
------------------------------------------------------------------------------

使用mount命令的option
Some options used to mount local file systems include: ro, nosetuid,
noatime, nolargefiles, and logging.

格式: mount -o option,option,... device_name mount_point

# mount -o ro /dev/dsk/c0t0d0s6 /usr -------設成只讀
下面是使用多個參數(shù),設成只讀以及不允許執(zhí)行setuid進程,但并不限制生成setuid
# mount -o ro,nosuid /dev/dsk/c0t0d0s7 /export/home
為提高磁盤訪問性能,文件系統(tǒng)訪問頻繁,最后訪問時間并不計較的可以
# mount -o noatime /dev/dsk/c0t0d0s7 /export/home
防止成生超過2G的文件,
# mount -o nolargefiles /dev/dsk/c0t0d0s7 /export/home
如果文件系統(tǒng)已經存在超過2G的大文件,mount會挫敗,如果想成功mount,則必須刪除相關大文件,

推薦閱讀