sa239学习笔记之二管理文件系统( 三 )


** Phase 5 - Check Cyl groups
CG 0: BAD MAGIC NUMBER
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? y


用备份超级块:

超级块的坏掉会导致系统无法mount , 系统会发出如下信息:

“Can"t mount file_system_name”
or
“device_name is not this fstype”

每个文件系统在第32块都有一个备份块以供恢复超级块 , 如下:
# fsck -o b=32 /dev/rdsk/c1t3d0s0
如果第32块也属于坏掉的部分则没有办法从32块恢复 , 可用newfs -N来查看其它备份块 ,
newfs -N /dev/rdsk/c0t0d0s7
提示: 如果不加-N参数 , 则文件系统会被重写;
用newfs -N查看到其它备份块 , 用此来恢复数据:
fsck -o b=535952 /dev/rdsk/c0t0d0s7

六、管理文件系统应用

df – Displays the number of free disk blocks
du – Summarizes disk use
quot – Summarizes file system ownership



df 显示磁盘空间已用,可用,总共

-a Reports on all file systems, including those with entrIEs in
the /etc/mnttab file for which the ignore option is set
-b Prints the total number of Kbytes free
-e Prints only the number of files free
-k Displays disk allocation in Kbytes
-h Acts like the -k option, except that sizes are in a more
readable format, for example, 14K, 234M, 2.7G, or 3.0T
-l Reports on local file systems only


Fields for the df -k Command
Field Definition
Filesystem The mounted file system
kbytes The size of the file system in Kbytes (1024 bytes)
used The number of Kbytes used
avail The number of Kbytes available
capacity The percentage of file system capacity used
Mounted on The mount point

提示: 已用的和可用的,总共的可用的系统空间是除了minfree空间之外的部分.
如果系统文件用满后,普通用户会收到“File System Full”,对root用户而言是可用的.

用du命令显示磁盘的块数(512kb组成)

du -options Directory

-k 用kb显示
-s 显示目录概要
-a 全部显示

用quot命令显示有多少空间正在被那些户所用:

quot -options filesystem

-a Reports on all mounted file systems
-f Includes the number of files

用smc&打管理界面

推荐阅读