Saturday, 21 March 2015

Disk Labeling in Solaris

SMI and EFI/GPT Label
===============

In Solaris a disk partition and label is required before a filesystem (ZFS or UFS) can be created on a physical raw disk. Other disk management software like Oracle ASM or Solaris Volume Manager also requires a disk label and partition before the  physical disk can be used by these disk management software. 

Solaris currently support 2 types of disk labeling on SPARC ,they are  SMI label and EFI/GPT label. 

Virtual Table of Contents (VTOC) Label is also known as the Sun Microsystems Inc (SMI) Disk label. The SMI label's significant limitation is that SMI label does 
not support disk larger than 2TB.

An example of a disk with a traditional VTOC/SMI label will have 8 partitions (0-7) 

Example A (Solaris format/partition utility) 

partition> p
Current partition table (default):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    90      128.37MB    (91/0/0)      262899
  1       swap    wu      91 -   181      128.37MB    (91/0/0)      262899
  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6        usr    wm     182 - 24619       33.67GB    (24438/0/0) 70601382
  7 unassigned    wm       0                0         (0/0/0)            0

partition> 

GUID Partition Table (GPT) is an industry standard definition for disk partition table, GPT is part of the Unified Extensible Firmware Interface (UEFI) standard. In Solaris we call this the EFI/GPT label. EFI/GPT label is required to support DISK greater that 2TB in size, Solaris ZFS uses EFI/GPT labels by default. The EFI label standard can support up to 128 partitions, 

Solaris currently supports 7 partitions for disk with EFI/GPT labels. 

Example of EFI label with default partition. Slice 0 contains all the usable sector of the disk and slice 8 contains the 
alternate sector.

Example  (Solaris format/partition utility) 

partition> print
Current partition table (default):
Total disk sectors available: 285673405 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm                34      136.22GB          285673438    
  1 unassigned    wm                 0           0               0    
  2 unassigned    wm                 0           0               0    
  3 unassigned    wm                 0           0               0    
  4 unassigned    wm                 0           0               0    
  5 unassigned    wm                 0           0               0    
  6 unassigned    wm                 0           0               0    
  8   reserved    wm         285673439        8.00MB          285689822    

partition> 

Another example of a disk with EFI label with customize 7 partitions (0-6 ),slice 8 contains the alternate sector.

Example  (Solaris format/partition utility) 

partition> print
Current partition table (original):
Total disk sectors available: 285673405 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm                34      100.00GB          209715233    
  1        usr    wm         209715234        1.00GB          211812385    
  2        usr    wm         211812386        1.00GB          213909537    
  3        usr    wm         213909538        1.00GB          216006689    
  4        usr    wm         216006690        1.00GB          218103841    
  5        usr    wm         218103842        1.00GB          220200993    
  6        usr    wm         220200994        1.00GB          222298145    
  8   reserved    wm         285673439        8.00MB          285689822    

partition> 


The quickest way to determine from Solaris if the disk is EFI/GPT labelled is to check the partitions on the disk with Solaris format utility, an EFI/GPT labeled disk will have partition 8 while an SMI labeled will have partition 7.

The issue with EFI labeled disk is that it could not be configured as a bootable device on SPARC systems. This had not been a major limitation because the largest bootable internal disk that is qualified on a SPARC T5 is 600GB in capacity. 
System Firmware 8.4+ (SPARC T4) and 9.1+ (SPARC T5) removes this EFI/GPT booting limitation.


Disk Relabeling

The label on the physical disk may be changed by doing the following. 
    
WARNING: Deleting the disk label and relabeling the disk will destroy ALL DATA on the disk.

STEP 1: delete the disk label with "dd if=/dev/zero of=/dev/rdsk/cXtXdXsX count=100

Example 

t5-8-sin06-a:/dev/dsk# dd if=/dev/zero of=/dev/rdsk/c13t4d0s0 bs=512 count=100 
100+0 records in
100+0 records out
root@t5-8-sin06-a:/dev/dsk# 

STEP 2: Relabel the disk with the command "format -e cXt4XdX "  

Example E

root@t5-8-sin06-a:~# format -e c13t4d0  
selecting c13t4d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        inquiry    - show disk ID
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 1
Ready to label disk, continue? yes

format> 
format> par


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> print
Current partition table (original):
Total disk sectors available: 285673405 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm                34      136.22GB          285673438    
  1 unassigned    wm                 0           0               0    
  2 unassigned    wm                 0           0               0    
  3 unassigned    wm                 0           0               0    
  4 unassigned    wm                 0           0               0    
  5 unassigned    wm                 0           0               0    
  6 unassigned    wm                 0           0               0    
  8   reserved    wm         285673439        8.00MB          285689822    

partition> 

EFI/GPT boot disk requirement
Booting EFI/GPT boot disk on SPARC T4 and SPARC T5 requires that the following minimum software requirement must be met.

Requirement 1.) Solaris 11.1

Requirement 2.) System Firmware 8.4+ or System Firmware 9.1+ 

System Firmware 9.1+ for SPARC T5

T5-2 with Patch 17264122 (above)
T5-4/T5-8 Patch 17264131 (above)
T5-1B Patch 17264114 (above)
Netra T5-1B Patch 17264110 (above)

System Firmware 8.4+ for SPARC T4

SPARC T4-1 Patch 150676-01 (above)
SPARC T4-2 Patch 150677-01 (above)
SPARC T4-4 Patch 150678-01 (above)
SPARC T4-1B Patch 150679-01 (above)
Netra SPARC T4-1 Patch 150680-01 (above)
Netra SPARC T4-2 Patch 150681-01 (above)
Netra SPARC T4-1B Patch 150682-01 (above)

Note:The Solaris 11.1 installer will prompt that the disk be relabeled to SMI label if OBP firmware does not support EFI/GPT boot.

No comments:

Post a Comment