SOLARIS
BASICS-P2
COMPONENTS
OF UFS
UFS: UNIX file system is default File System for Solaris 10.
Partitions -> Cylinders -> Blocks
Partitions are divided in to Cylinders; further Cylinders
are divided in to Blocks.
BLOCKS are intended to control and organize the
structure of files within a cylinder group.
Functions of BLOCKS,
BOOT BLOCK: to store booting info
SUPER BLOCK: info about FS
CYLINDER GROUP: FS are divided into Cylinder Gr to improve disk
access
INODE: stores all info about a File, except its name
DATA BLOCK: stores data
VTOC- SECTOR 0 (0)
BOOT BLOCK- SECT 1 TO 15 (1-15)
SUPER BLOCK- SECT 16 TO 31 (16-31)
BOOT BLOCK:
Storing codes that are used to boot the system. It is available on
all disks whether they are for booting or not. If FS is not for booting then
these boot blocks remain left.
Boot block resides in 1st cylinder Group i.e. cylinder Gr
0.
SUPER BLOCK:
Sometimes also referred as PRIMARY SUPER BLOCK, it contains
·
No of cylinder group
·
No of data blocks in a cylinder group
·
Name of mount point
·
Size of file system
·
File system state
(used/clean/stable/active/logging/unknown)
Without superblock FS become unreadable.
CYLINDER GROUP:
Each FS is divided into multiple cylinder groups with a minimum size
of 16 cylinder/group. FS always tries to place a files data into a single
cylinder group, which reduces the distance a head has to travel to access the
files data.
INODE:
Inode contains all info about a File except its name. So who holds
the name of a file…?
Directory
Inode have the answers of following questions about a file…
·
What type of file…? (regular/char/dev/link)
·
What is perm on file…? (RWX)
·
Who is owner of file…? (user name of owner)
·
Which group does the file belongs…? (GID)
·
What is the size of file…? (in bytes)
·
How many links the file have…? (Hard links)
·
When the file was last accessed…? (date &
time)
·
When the file was last modified…? (date &
time)
·
When the file was created…? (date & time)
Can be seen by,
#ls –li
#df –o
Inodes are no’s, each FS creates its own Inode Table.
How many Files a FS can sustain are dependent upon the no of Inodes
available for that FS.
No of Inodes depends upon the size of disks and size of partitions.
DATA BLOCK:
Also referred as STORAGE BLOCK where we store our data.
Well, we have two new terms here,
BACKUP SUPER BLOCK & CYLINDER GROUP BLOCK….
BACKUP SUPER BLOCK:
After creation of file system, super blocks are created and in
parallel a backup copy of super block is created at sector 32. Additional
backup is also created at beginning of each cylinder group to provide
redundancy in case of corruption.
CYLINDER GROUP BLOCK:
A table which includes the,
No of data blocks
No of Inodes
No of directories, free blocks, free and used Inodes.
DISK
NAMING
SPARC:
c#t#d#s#
# denotes the no
(c#) controller no: it identifies the HBA, which controls
communication between the system and disk.
(t#) target no: HW address assigned to the scsi target controller of
a disk, tape or cd-rom.
(d#) disk no: also known as Logical Unit No (LUN). If more than one
disk is attached to the target then the no change.
(s#) slice no: partition no ranged from s0 to s7.
SCSI= small computer
system interface
IDE= integrated device
electronics
SATA= serial advanced
technology attachment
X86:
C#D#S#
These devices do not use target controllers.
FDISK PARTITION NO: fdisk partition no ranging from P0 to P4. Where
P0 represents the whole disk.
UNIX systems can detect primary partitions (Solaris call these FDISK
partitions)
And each disk is only expected to contain a single Solaris FDISK
partition.
X86 has 0-15 slices, in which 2-8-9 cannot be used.
Format is not capable to process the slices, that’s why we can see
only 0-9 slices.
SPARC’s boot block is contained in root fs, whereas the X86 has
bigger boot loader (GRUB) so a separate boot partition is used (slice 8).
While using “fmthard” we can see all 0-15 slices in X86.
No comments:
Post a Comment