开源中文网

您的位置: 首页 > solaris > 正文

solaris 文件系统

来源:  作者:

Solaris 文件系统管理(unix file system )

常见文件系统类型
================
[1]ufs,
[2]hsfs,
[3]pcfs,
[4]vxfs
....

设备名描述(硬盘)
==================
/dev/rdsk/c0t0d0s0,(裸设备/字符设备raw disk)
/dev/dsk/c0t0d0s0,(逻辑设备/块设备logicl disk , block device)

存储设备上建立文件系统
======================
# newfs /dev/rdsk/c0t1d0s7

系统文件系统记录
=================
# vi /etc/vfstab
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /cache ufs 2 yes -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c0t1d0s7 /dev/rdsk/c0t1d0s7 /export/home1 ufs 2 yes -
swap - /tmp tmpfs - yes -

常用文件系统的操作命令
======================
示例:
# umount /export/home1
# mount /dev/dsk/c0t1d0s7 /export/home1
# umount /dev/dsk/c0t1d0s7
# mount -F pcfs /dev/diskette /floppy (mount 软盘)
# mount -F hsfs -o ro /dev/rdsk/c0t6d0s0 /cdrom (mount 光驱)
# mountall -l
# umountall -l
# volcheck
# fdformat (软盘格式化)
# eject cdrom (弹出光驱)
# eject floppy (弹出软盘)


Swap区文件系统的管理
====================
# swap -l,-a,-d,-s

增加Swap区示例
# mkfile 20m /export/home1/swap
# swap -a /export/home1/swap
# swap -l
# swap -d /export/home1/swap
# vi /etc/vfstab
/dev/dsk/c0t0d0s1 - - swap - no -
/export/home1/swap - - swap - no -
swap - /tmp tmpfs - yes -

文件系统的维护/管理(maintain file system )
[1] fsck,sync,fslush deamon( 30 second)
stop+a
sync
[2] # umount /dev/dsk/c0t0d0s7
# fsck /dev/rdsk/c0t0d0s7
# fsck /export/home
# mount /dev/dsk/c0t0d0s7 /export/home
# ls /export/home/lost+found 

Tags:solaris 文件系统
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明