SOLARIS
BASICS-P1
We will start the basics with Disk Architecture.
There are few terms we need to know about disk,
TRACK: A concentric ring on a disk.
CYLINDER: A set of tracks.
SECTOR: section of each disk platter, 1 sector=512
bytes.
BLOCK: A data storage on a disk, 1 block=512 bytes
Let’s start with Platters,
There are too many tracks on platter1 as well on platter2..platter3…so
on.
Track=T<n>
Platter=P<n>
T0(P1)+T0(P2)+T0(P3) = CYLINDER1
T1(P1)+T1(P2)+T1(P3) = CYLINDER2
Now CYLINDER’s are made up of particular tracks from each platter.
Track0 from platter1, platter2, platter3 …. Make Cylinder1
Track1 from platter1, platter2, platter3 …. Make Cylinder2
And so on….
Let’s consider an example to make it clearer,
There are 450 platters.
1 platter has 300 tracks.
How many Cylinders…??
300…………How…?
No. of Cylinders = No. of Tracks on Platter
Units:
1Byte= 8bits
1024Bytes= 1Kilo Byte
1024KB= 1 Mega Byte
1024MB= 1 Giga Byte
1024GB= 1 Tera Byte
1024TB= 1 Peta Byte
1024PB= 1 Exa Byte
1024EB= 1 Zeta Byte
How the disk partitions happen and how to manage it.
We need to partition the disk in separate slices, File system need to
be created on each slice.
But how the Solaris will know about the slices, partitions and File
systems…?
Answer is LABEL.
What is first thing came in mind by listening word label…
Labels are used to define the organizational characteristics of disk,
and also they define that how the disk cylinders are grouped in to partitions
and slices.
Simply Label, stores info about Disk controllers, Disk geometry and
slices.
LABELS are of two types:
1. SMI :
Sun Microsystem Inc Labels
2. EFI :
Extensible Firmware Interface
SMI: (SUN MICROSYSTEM LABELS)
·
Also called SMI VTOC label
·
Support for less than 1TB
·
Resides on 1st sector of disk (sector
0)
·
Allows partitions up to 8 slices (0-7)
·
Slice 2 cannot be used
·
Bootable
·
Sector 0 at SPARC and sector 1 at X86.
EFI: (EXTENSIBLE FIRMWARE INTERFACE)
·
Supports larger than 1TB on a 64bit OS kernel
·
Compatible with UFS, can be create UFS partitions
>1TB
·
Not bootable
·
Allows partitions up to 7 slices (0-6)
·
Slice 2 is just another/normal slice
·
No cylinder/controller/sector info stored in EFI,
size is considered in blocks
·
Size of EFI label is 34 blocks, partition starts
from sect34, no partition starts from sect0.
SMI disk labels are also named as VTOC, if there is reference
about VTOC means SMI is referred.
PARTITIONS:
SPARC: 0-7 (8 slices)
X86: 0-9 (10 slices)
Sparc disks are automatically recognized by the system, but X86 disks
need special treatment to be realized by system.
Basically X86 systems are capable to hold multiple OS, so the Solaris
need a way by which it can say that, ohhh… I am the owner of this disk.
How it is achieved…?
By putting a layer on entire disk called FDISK partition. This
is virtual in nature. Once putting the disk under FDISK, normal OS operations
can be carried out.
Now back to partition,
Why 2 is circled in Sparc and 2-8-9 are circled in X86…??
We cannot use slice 2 on both platforms, slices 8 & 9 are
platform specific to X86.
What happen when we look at slice 2 on both platforms…?
It shows the capacity of entire disk with name of Overlap / Backup.
We are not supposed to touch this slice 2. But why…?
What info it contain to become so critical…?
·
Whole disk is referred as slice2
·
Contains size of entire disk
·
Total no of cylinders available for storage
Just because of these 3 info it becomes so critical…L…L
Yes it is, though we can alter this partition also. Solaris will not
tell us anything. But in long run it might result is very unpredictable manner.
Like,
If we use slice 2, SVM, Solaris Live Upgrade and Install GRUB will
not work in the way they are intended for.
Or might be some weird things can happen, depending upon your luck…J…J
OK, Now what is in Slice 8 & 9 at X86…?
8: boot loader info, GRUB boot info
9: alternate boot blocks
Let’s see the VTOC:
VTOC includes following,
·
DIMENSION: logical dimension of disk
·
PARTITION NO: which identifies the slice
·
1ST SECTOR: the
starting sector of each slice
·
LAST SECTOR: the ending sector of each
slice
·
SECTOR COUNT: total no of sectors in
each slice
·
MOUNT DIR: mount status of slices, empty
means not mounted
VTOC- SPARC- SECTOR 0
VTOC- X86- SECTOR 1
VTOC can be seen by,
#format
format> verify
OR
#prtvtoc /dev/rdsk/c#t#d#s#
VTOC is stored for entire disk at Sector0.
No comments:
Post a Comment