File System Structure

File System Structure

Solaris file systems are generally of the type UFS (UNIX File System), although other file system types can be defined in /etc/default/fs. UFS file systems are found on hard disks that have both a raw and block device interface on Solaris, as found in the /dev/dsk and /dev/rdsk directories, respectively. Every partition created on a Solaris file system will have its own entry in /dev/dsk and /dev/rdsk. A UFS file system contains the following elements:

  • A boot block, which contains booting data if the file system is bootable

  • A superblock, which contains the location of inodes, file system size, number of blocks, and status

  • Inodes, which store the details of files on the file system

  • Data blocks, which actually store the files

In order to create a new UFS file system, a disk needs to be partitioned into different slices. These slices can then be used for creating new file systems by using the mkfs or newfs command. For example, the following two commands are equivalent for the purposes of creating a new file system on the partition c0t0d0s1:

# newfs /dev/rdsk/c0t0d0s1
# mkfs -F ufs /dev/rdsk/c0t0d0s1

Part I: Solaris 9 Operating Environment, Exam I