Disk Slices
Disks are logically divided into single partition called slice. SLICES is functionally used to organize data, composed of Cylinder packets.
Note - Grouping Cylinders Into Slices Is Done to Organize Data, Facilitate Backups, And Provide Swap Space.
A disk can be divided into 8 SLICEs from 0 to 7.
For convenience, SLICE 2 represents the entire disk. It maintains important data on the entire disk.
Table 2-1 Disk Slices
SLICE NAME FUNCTION
0 / The Root Directory's System FILES
1 SWAP SWAP AREA
2 Entire Disk
5 / OPT OPTIONAL SOFTWARE
6 / USR System Executables and Programs
7 / Export / Home User Files and Directories
Disk Slice Naming Convention
Usually a 8-character string represents a full name of a SLICE. This string includes Controller Number, The Target Number, The Disk Number, And The Slice Number.
Controller Number Identifies The Host Bus Adapter (HBA), Which Controls Communications Between The System and Disk Unit. The hba takes Care of Sending and receiving Both Commands and Data To the Device.
The Controller Number is Assigned in Sequential Order, Such AS C0, C1, C2, And So ON.
Target Number Target Numbers, Such As T0, T1, T2, AND T3, CORRESPOND TO A Unique Hardware Address That IS
Assigned to Each Disk, Tape, or CD-ROM. Some External Disk Drives Have An Address Switch Located on The Rear Panel. Some Internal Disks Have Address Pins That Are Jumpered To Assign That Disk's Target Number.
Disk Number The Disk Number Is Also Known As The Logical Unit Number (LUN). THIS Number Reflects the Number
Of disks at the target location.
Slice number A slice number ranging from 0 to 7. The embedded SCSI configuration and the integrated device electronics (IDE) configuration represent the disk slice naming conventions across two different architectures. The disk number is always set to d0 with embedded SCSI disks.Introducing Solaris OE Device Naming Conventions
In Solaris, all devices are represented by three different types of different types, Depending On How the Device Is Being Referenced:
Logical Device Names
Physical Device Names
Instance names. INSTANCE NAMES
Note - The Berkeley Software Distribution (BSD) device names exist in the Solaris OE if the BSD compatibility packages are installed with the Solaris Developer, Entire Distribution, or Entire Distribution Plus the original equipment manufacturer (OEM) Solaris software group The BSD device names. For Example / DEV / SD0A, Are Typically Used for Backward Compatibility with Old Scripts.
Logical Device Names
The logical disk device name is a symbolic connection to the physical device name in the Links to the Physical Directory in the Links to the Physical Device Names key. This name is used when you enter a command. All logical device names are saved in the / dev directory. The logical name includes the Controller Number, Target Number, Disk Number, And Slice Number.
Each disk device has an entry corresponding to block devices and character devices in / dev / dsk and / dev / rdsk directory. To Display the Entries in the / dev / dsk directory, Perform The Command:
# ls / dev / dsk
Physical Device Names
The physical name uniquely identifies the physical address of the system on the system and maintains under the / devices directory.
A Physical Device Name Contains The Hardware Information, Represented as a series of node names, subjectd by slashes, That indeicate the path to device. To display a physical device name, Perform the Command:
# ls -l / dev / dsk / c0t0d0s0
In the system startup process, kernel finds the physical address of the device. Kernel associated address a node, nodename @ address, which is a physical device name.
In Figure 2-9, Dad @ 0 is The Direct Access Disk Device At Address 0.
Instance names. INSTANCE NAMES
The instance name is a short written by the name of the kernel to the system. An Instance Name Is A Shortened Name for The Physical Device Name. Two Examples Are Shown:
SDN
WHERE SD Is The Disk Name and Nis The Number, Such As SD0 for the First SCSI Disk Device.
Dadn
WHERE DAD (DIRECT Access Device) is The Disk Name and Nis The Number, Such As Dad0 for the First Ide Disk Device.
Listing A System's Devices
In The Solaris Oe, There Are Several Ways To List A System's Devices, Including:
USING THE / ETC / PATH_TO_INST FILE
USING THE PRCONF Command
USING THE FORMAT Command
THE / ETC / PATH_TO_INST FILE
For each device, the system is recorded physical name and instance name in / etc / path_to_inst file. These names are used by the Kernel to Identify Every Possible Device. This File is Read Only at boot time.
THE / ETC / PATH_TO_INST FILE IS Maintained by the Kernel, And It Is Generally Not Necessary, NOR Is It Advisable, for The System Administrator to Change this file.
.,.............................
# more / etc / path_to_inst
The Prtconf Command
Use the prconf command to display the configuration information of the system, including the total amount of memory, and system peripheral information. It lists all possible instance names of the device, regardless of whether the device is Attach or there is no ATTACH to the system. To see the ATTACH to the system's device, use the following command.
# prtconf | grep -v not
The Format Command
Reconfiguring Devices
Using the devfsadm command
Many systems are running critical customer applications on a 24-hour, 7-day-a-week basis. It might not be possible to perform a reconfiguration boot on these systems. In this situation, you can use the devfsadm command.
.
The devfsadm command attempts to load every driver in the system and attach all possible device instances. It then creates the device files in the / devices directory and the logical links in the / dev directory. In additionto managing these directories, the devfsadm command also maintains The / etc / path_to_inst file.
To limit the operation of To Restrict the Of The DEVFSADM to a specific device, use the -c option.
DEVFSADM-C Device_class
Device_class's values include Disk, Tape, Port, Audio, And Pseudo. For Example, To Restrict The Devfsadm Command to the Disk Device Class, Perform The Command:
# devfsadm -c disk
You can specify multiple device types one by one. Use the the command of the disk, tape, and audio device classes, perform the commiff:
# devfsadm -c disk -c tape -c audio
To restrict the use of the devfsadm command to configure only defices for a named driver, use the -i option.
Devfsadm -i driver_name the following examples use the -i option.
To configure only Those Disks Supported by The Dad Driver, Perform The Command:
# devfsadm -i dad
Partitioning The Hard Disk Introducing Disk Partition Tables, INTROCING DIS
As the root user, WHEN You Use The format Utility and SELECT A Disk To Partition, a Copy of The Disk's Partition Table Is Read from The Label on The Disk Into Memory and is Displayed As The Current Disk Partition Table.
When you use the format command, Format will read this file (/etc/format.dat). This file is a list of available disk types and a set of predefined partition tables, you can use it to quickly partition disks.
Introducing Disk Labels
The disk's label is the area set aside for storing information about the disk's controller, geometry, and slices. Another term used to describe a disk label is the volume table of contents (VTOC). The disk's label or VTOC is stored on the first sector Of the disk. Make a Label for a disk means writing partition information to disk. A Disk Means to Write Slice Information Onto The Disk. If you don't perform Label after SLICE, the partition information will be lost. An important part of the disk Label is a partition table, which defines the boundary and total size of the slice of the disk, Slice. Unsing the format commandthe format utility is organized into two tiers of commists.
When you type format on the command line, the first tier of commands appears. This set of commands allow you to, among other functions, select a disk, select a partition, save new disk and partition definitions, and write the label to the disk Top Tier of Commands is Denoted by The Format> Prompt. The second tier of commists appears at the means. This set of commists allow you to, among Other
Functions, Define The Characteristics of The Individual Slices, Print The Existing Partition Table, And Write The Partition Map and Label To The Disk. Table 2-2 Describes The Terminology for disk partitioning.
Table 2-2 Partition Table Terms and USAGE
Term Description
Part The Slice Number. Valid Slice Numbers Are 0 THROUGH 7.
Tag a value what indeicates how the slice is being used.
0 = unassigned
1 = boot
2 = root
3 = SWAP
4 = USR
5 = backup
6 = Stand
8 = home
Sun Storedge? Volume Manager Array Tags:
14 = public (Region)
15 = private (Region)
Flag 00 wm = The disk slice is write and mountable.
01 Wu = The Disk Slice IS Writable and Unmountable. This is The default stateof slices deted for swap all.
10 rm = the disk slice is read-only and mountable.
11 ru = the disk slice is read-only and unmountable.
Cylinders the starting and ending cyding. Number for the disk
Size The Slice Size: MBytes (MB), Gbytes (GB), Blocks (b), or cylinders (c).
Blocks The Total Number of Cylinders and The Total Number of Sectors Per Slice.
Managing Disk Labels
Every Disk in The Solaris Oe Has A Label Set Aside for Storing Information About The Disk's Controller, Geometry, And Slices.
Viewing the disk vtoc
You can use two methods for locating and viewing a disk's label or vtoc:
(1) Use the verify command from the format utility
(2) Invoke the prtvtoc Command from The Command Line
Reading a disk's vtoc! The verifycommand
THE VERIFY Command Enables You to View a Disk's Vtoc from With In Format Utility. To Read a Disk's Vtoc, Perform The Following Steps:
At The Format Prompt, Enter The Verify Command, and Press Return.
Format> Verify Left step 省 省 Reading a disk's vtoc application the prtvtoc commist
THE PRTVTOC Command Enables You to View a Disk's Vtoc from The Command Line. To View a Disk's Vtoc from The Command Line, Type The Following:
# prtvtoc / dev / rdsk / c1t0d0s2
RELABELING A DISK
Use the prtvtoc command to write the VTOC of the disk to the file. This way you can use the FMThard command to re-label disk, such as what happens below:
(1) The vtoc on the disk has been destroyed.
(2) You Accidentally Changed The Partition Information on The Disk and Did Not Save A Backup Label in The /etc/fect.dat file.
To save a disk's vtoc to a file, Perform The Command:
# prtvtoc / dev / rdsk / c1t0d0s2> / vtoc / c1t0d0
The FMTHARD Command
To Relabel a Disk, you can save the output of the prttoc Command INTO A File ON Another Disk and use it as the datafile argument to the fmthard command.fmthard -s datafile / dev / rdsk / c # t # d # s2
Caution - The fmthard command can not write a disk label on an unlabeled disk Use the format utility for this purpose If the need to relabel a disk arises and the VTOC was previously saved to a file, the following options are available:..
(1) Run Format, Select The Disk, And Label It With the default partition table.
(2) Use the fmthard command to write the desired label information, previously saved to a datafileback to the disk.
# fmthard -s / vtoc / c1t0d0 / dev / rdsk / c1t0d0s2
Check the practice of this section in SA 239.