免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1282 | 回复: 0
打印 上一主题 下一主题

Disk and File-system Management on Solaris [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-21 19:12 |只看该作者 |倒序浏览

                                ** Install a new hard disk   --> perform a reconfiguration boot
    # touch /reconfiguration
     ( creates a file allowing the OS to check for the presence of new components during startup)
    # sync; init 0    # prtconf  - to view the system's device configuration info
** Disks & Slices -- 8 slices/disk in total ( 0 ~ 7 ); defined by offset: begin cylinder and the size    slice 0 is always the root slice (boot sector and root file system)    slice 1 - swap, slice 2 - backup    no cylinder overlap allowed!    disk label - first sector of a disk, also called the volume table of contents(VTOC)        -> contains disk's controller and geometry info, and partition table    boot block - sectors 2 to 16 of a disk,  bootstrap program (bootblk)        only the root file system has an active boot block    super block - sectors 17 to 33 of a disk, a table that describes the file system        num of data blocks and cylinder groups, block size, name of mount points, state flag    cylinder groups - from sector 34 to end, data        -> allow a hard disk head to read more info in each pass ( improve disk access)                the 1st component in each sylinder group is a backup of the superblock for a disk        cylinder group block - an info table: data blocks/directories/inodes  in the group        data blocks - 8 KB by default (eight fragments of 1024 bytes)            UFS uses fragments to store small files    logical device name:  ** View partition table    prtvtoc /dev/rdsk/c3t0d1s3    -h, -f, -s, -t, -m** Format     - to create disk slices, display the partition table, test and repair disks, etc        disk partitioning - disk, type, partition, current        wu - readonly, wm -writable        label - write slice configuration to the disk's label    disk diagnosis and repair - format, repair(SCSI), analyze, defect(SCSI)    disk label management - label, backup, verify, save, volname    ! - to execute commands from the Format utility    example:        >format     >partition     >0                 # for root slice     tag, wm, 0 (start cylinder), 1499e (end cylinder)     >label     >quit     >verify    ** UNIX file system(UFS)    - default Solaris file system    - state flags (clean, stable, active, unknown)        unknown state prompts Solaris to run a file system check    - extended fundamental types (EFT), to provide 32-bit ID numbers for users, groups, and devices    - support for large file systems, up to 1TB (but Solaris Volume Manager is required in practice)    - support for large files, larger than 2 GB    UFS logging -> ensures consistency and reduces the need to run file system checks    (UFS creates a log of the changes that a data transaction involves, and applies changes for complete transactions only at system reboot.)        mount with -o logging option** Create file system    considerations: I/O workload  and  data size    newfs [-Nv] device_name** Mount file system   mount [-o options]      -r   readonly    -m   without making an entry in the /etc/mnttab    -g   globally in a cluster    -O   over an existing file system on the same mount point    -a   a list of mount points to a series of file systems in parallel    logging/nologging, nolargefiles/largefiles, noatime, setuid/nosuid    mountall        - mount all file systems listed in the vfstab /etc/vfstab    -l   only local file systems    umount     -f   force to umount   umountall    fuser [-c|-d] [-k]     (to obtain a list of processes currently accessing a file system)    -k   kill any running processes** fsck    ~ can detect and repair    - lost files and directories --> lost+found    - damaged superblocks --> a backup superblock in any of the cylinder groups    - corrupted inodes --> /lost+found    - bad data blocks --> /lost+found    - inconsistent cylinder blocks     fsck [-m|V|y|Y|n|N] [-o file_system_options] file_system        -m   check a file system    -V   view all options selected by default for this command    -y/Y answer yes to every question    -n/N answer no to every question    b=n  specify a backup superblock for a file system to use    c    convert the format of a file system    f    force to check even with a bad superblock    p    "preen" mode checking, no user interavention allowed    w    check write-only file systems** du     ~ determine disk usage for files or directories        -a   display the num of data blocks    -s   the total num of data blocks    -k   display the output in KB    -d   cannot cross file system boundaries    -o   exclude subdir    -r   include hidden files** quot    - how much space different users' files consume    -a   for all mounted file systems    -c   three columns (size specific)    -f   (user specific)* ff    ~ view a list of file names and inode statistics for a file system    ff [options]         -mn, -an, -cn

               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16112/showart_325979.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP