1 / 29

Managing the Solaris OE File System

Managing the Solaris OE File System. Solaris OE File Systems. Disk-based file systems Distributed file systems Pseudo file systems. Disk-based file systems. “ufs” The UNIX file system in the Solaris OE is based on the Berkeley fast file system. “hsfs”

aliya
Download Presentation

Managing the Solaris OE File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Managing the Solaris OE File System

  2. Solaris OE File Systems • Disk-based file systems • Distributed file systems • Pseudo file systems

  3. Disk-based file systems • “ufs” • The UNIX file system in the Solaris OE is based on the Berkeley fast file system. • “hsfs” • The High Sierra file system is a special-purpose file system developed for use on CD-ROM media.

  4. “pcfs” • The PC file system is a UNIX implementation of the DOS FAT file system. The pcfs allows the Solaris OE to access PC-DOS formatted file systems. • “udf” • The Universal Disk Format file system is used for optical storage targeted at DVD and CD-ROM media.

  5. Distributed File Systems • NFS • The network file system allows users to share files among many types of systems on the network.

  6. Psuedo File Systems • “tmpfs” • The temporary file system stores files in memory, which avoids the overhead of writing to a disk-based file system. The “tmpfs” file system is created and destroyed every time the system is rebooted. • “swapfs” • The swap file system is used by the kernel to manage swap space on disks.

  7. “fdfs” • The file descriptor file system provides explicit names for opening file by using file descriptors (eg:- /dev/fd/0, /dev/fd/1) in the “/dev/fd” directory.

  8. “procfs” • The process file system contains a list of active processes in the “/proc” directory. The processes are listed by process number. • “mntfs” • The mount file system provides read-only information from the kernel about locally mounted file systems.

  9. Viewing the Solaris OE ufs File System • Disk Label (VTOC) • The VTOC contains the partition table for the disk. • The VTOC resides in the first disk sectr (512 bytes blocks). • Only the first disk slice contains a VTOC.

  10. Boot Block • The bootstrap program (bootblk) resides in the 15 disk sectors that follow the VTOC. Only the “/” (root) file system has an active boot block

  11. Primary Superblock • The superblock resides in the next 16 sectors that follow that boot block. The superblock contains the following information: • The number of data blocks • The number of cylinder groups • The size of a data block and fragment • A description of the hardware, derived from the label • The name of the mount point • File system state flag: clean, stable, active, logging or unknown

  12. Backup Superblocks • When the file system is created, each cylinder group replicates the superblock beginning at Sector 32. • The replication protects the critical data in the superblock against catastrophic loss.

  13. Cylinder Groups • Each file system is divided into cylinder groups with a minimum default size of 16 cylinders per group. • Cylinder groups improve disk access

  14. Cylinder Group Blocks • Cylinder group block is a table in each cylinder group that describes the cylinder group: • The number of inodes • The number of data blocks in the cylinder group • The number of directories • Free blocks, free inodes, and free fragments in the cylinder group • The free block map • The used inode map

  15. The “ufs” inode • An inode contains the following information about a file: • The type of file and the access modes • The UID & GID of the file’s owner and group • The size of the file • The link count • The time the flag was last accessed and modified and the inode changes • The total number of data blocks used by or allocated to the file • Two types of pointers: direct pointers and indirect pointers

  16. Solaris ufs File System Structure

  17. Direct Pointers • Inside the inode there are 12 direct pointers, which contain addresses for the file’s first 12 data blocks. • The 12 direct pointers can each reference 8-Kbyte data blocks for a file that is upto 96Kbytes

  18. Indirect Pointers • Single indirect pointer • Refers to a file system block that contains pointers to data blocks. • This file system block contains 2048 additional addresses of 8=Kbyte data blocks, which can point to an additional 16 Mbytes of data

  19. Double indirect pointer • Refers to file system block that contains single indirect pointers. • Each indirect pointer refers to a file system block that contains the data block pointer. • Double indirect pointers point to an additional 32Gbytes of data

  20. Triple indirect pointer • Can reference up to an additional 64 Tbytes of data. • However, the maximum size of a ufs file system is limited to 1 Tbyte due to the maximum address space of 32-bits for the device drivers

  21. Data Blocks • The remaining space allocated to the ufs file system holds data blocks. • Data blocks are allocated, by default, in 8-Kbyte logical block sizes. • The blocks are further divided into 1-Kbyte fragments.

  22. Creating a New ufs File System • Using the “newfs” command • As a root user to create a new ufs file system: • “# newfs /dev/rdsk/c1t0d0s0” • The “newfs” command asks for confirmation before continuing

  23. “minfree” value • To display the “minfree” value for the filesystem: • “#fstyp -v /dev/rdsk/c0t0d0s0” • To change the “minfree” value: • “#tunefs -m 1 /dev/rdsk/c1t0d0s0” • Changes the minfree value from the default 10% to 1%

  24. Checking the File System by using the “fsck” command • Data Inconsistencies checked by the “fsck” command • Superblock Consistency • Cylinder Group Block Consistency • Inode Consistency • Data Block Consistency • The lost+found directory - fsck puts the files and directories that are allocated but unreferenced in this directory

  25. Noninteractive Mode • During a normal system boot, fsck command operates in noninteractive mode, which is often referred to as preen, or silent mode. • Addresses only minor inconsistencies. • Interactive Mode • Lists each problem it encounters, followed by a suggested corrective action in the form of a question that requires a yes or no response.

  26. “fsck” usage • “#fsck /dev/rdsk/c0t0d0s7” • “#fsck /export/home” • “#fsck -o f,p /dev/rdsk/c0t0d0s5” - checks and repairs the file system with the force (f) and preen (p) options

  27. Using Backup Superblocks • To display the alternative superblocks: • “#newfs -N /dev/rdsk/c0t0d0s7” • To use a backup superblock: • “#fsck -o b=32 /dev/rdsk/c0t0d0s7”

  28. Monitoring File System Use • “df” - Displays the number of free disk blocks • “df -options mount_point” • “du” - Summarizes disk use • “du -options directory” • “quot” - Summarizes file system ownership • “quot -options filesystem”

More Related