Solaris File System Administration

      Solaris OS file system is very different from Windows OS.FAT16,FAT32,NTFS are file systems for Windows,But Solaris belong to UNIX architecture .Learning Solaris file system is a difficulty for the beginner.
      What is file system? Simply,file system is a directory collections ,and it is used for locating and storing file.
       These are so many kinds of file systems for Solaris such as ufs、hsfs、pcfs 、NFS、Tmpfs、Profs、Swapfs and Devfs. For user, file system frame is a multi-level tree  made of  directory and file.


Demo 1  Create UFS file system

 Firstly,we must mark off disks into different partitions,and then we create new file system by using 'newfs' on these partitions.Lastly, these file systems are installed into root directory.
#newfs /dev/rdsk/c1t1d0s0   ----create file system on c1t1d0s0.
#df -k
# tunefs -m 4 /dev/rdsk/c1t1d0s0  ----tune reservation space,such as increasing 3 percent.
#df -k | grep c1t1d0s0

Demo 2   Mount and Umount

Generally, we must mount the file system to designated directory,and then we can read and write disk by the mounted point.
#mount /dev/dsk/c0t0d0s0 /export/home
#mount  -o option option ……
#fstyp /dev/rdsk/ c0d0t0s1    -----check the file ,local or remote?
#mount -F hsfs -o ro /dev/dsk/c0t0d0s0 /cdrom     -----mount cdrom file system
#umount /dev/dsk/c0t0d0s0
#fuser -c -k /export/home  ----fuser kill all of processors which belong to this file system

Demo 3  ----Fsck 

Power fault ,software fault and hardware fault may result in that file systems are damaged. Fsck command check data consistency of file system,and repaire the damage( Under simple user mode).
#fsck /dev/dsk/c0t0d0s2  
#fsck -y /dev/rdsk/c0d0t0s1      -----all of the answers are "yes" in fsck step.

fsck detects a super block damage,and we try to use the super block on 32th sector to repaire the fault(every file system has main super block backup on 32th sector).
#fsck -o b=32 /dev/rdsk/c0t0d0s2

In the end

评论:

发表一条评论:
  • HTML语法: 禁用
About

This is Chinese Functional CA Team Blog. Any suggestion is appreciated.

Search

Archives
« 四月 2014
星期日星期一星期二星期三星期四星期五星期六
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
今天