Tuesday, April 6, 2010

Solaris: ZFS Administration: Disk Administration – Trouble Shooting


Solaris: ZFS Administration – Trouble Shooting



Once a disk is taken control by ZFS, then there is a possibility in the change of the disk layout.

For instance, earlier the disk c2t9d0 was under the control of ZFS.
Now once after removing the disk from ZFS control and trying to create a new slice (default – ufs), we face the following error.



OUTPUT TRUNCATED…
AVAILABLE DISK SELECTIONS:
0. c1t0d0 system
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000020371b6542,0
1. c1t1d0 system
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000020373e0ced,0
2. c2t3d0
/pci@8,700000/scsi@6,1/sd@3,0
3. c2t5d0
/pci@8,700000/scsi@6,1/sd@5,0
4. c2t9d0
/pci@8,700000/scsi@6,1/sd@9,0
5. c2t12d0
/pci@8,700000/scsi@6,1/sd@c,0
6. c2t15d0
/pci@8,700000/scsi@6,1/sd@f,0
Specify disk (enter its number): 4
Format> p
partition> p
Current partition table (original):
Total disk sectors available: 17672849 + 16384 (reserved sectors)

Part Tag Flag First Sector Size Last Sector
0 usr wm 256 8.43GB 17672849
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 17672850 8.00MB 17689233

partition>q
format>q



In that case, we can use the following command with the option –e
-e = Enables SCSI expert menu.

For eg: # format –e c2t9d0




OUTPUT:

bash-3.00# format -e c2t9d0
selecting c2t9d0
[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 vendor, product and revision
scsi - independent SCSI mode selects
cache - enable, disable or query SCSI disk cache
volname - set 8-character volume name
! - execute , then return
quit
format>p
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1

Part Tag Flag First Sector Size Last Sector
0 usr wm 0 0 0
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
7 unassigned wm 0 0 0
8 reserved wm 0 0 0

Do you wish to continue creating a new partition
table based on above table[yes]?
Free Hog partition[6]?
Enter size of partition 0 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 1 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 2 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 3 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 4 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 5 [0b, 33e, 0mb, 0gb, 0tb]:
Enter size of partition 7 [0b, 33e, 0mb, 0gb, 0tb]:
Part Tag Flag First Sector Size Last Sector
0 unassigned wm 0 0 0
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 usr wm 34 8.43GB 17672848
7 unassigned wm 0 0 0
8 reserved wm 17672849 8.00MB 17689232


Ready to label disk, continue? y

partition> l
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? y
Auto configuration via format.dat[no]?
Auto configuration via generic SCSI-2[no]?
partition> p
Current partition table (default):
Total disk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 73 129.75MB (74/0/0) 265734
1 swap wu 74 - 147 129.75MB (74/0/0) 265734
2 backup wu 0 - 4923 8.43GB (4924/0/0) 17682084
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 148 - 4923 8.18GB (4776/0/0) 17150616
7 unassigned wm 0 0 (0/0/0) 0

partition>q
format>q



Note:

EFI - Extensible Firmware Interface (EFI), this is the default layout used by ZFS.

No comments:

Post a Comment