Find it

Friday, August 7, 2009

EFI ( Extensible Firmware Interface) disk label & SMI (Sun Microsystems Inc) or VTOC disk label.

I came across a problem with reusing ZFS disks for UFS. I couldn't
format the disk properly, but eventually got the answer!

The EFI disk label provides support for physical disks and virtual disk volumes. This release also includes updated disk utilities for managing disks greater than 1 terabyte. The UFS file system is compatible with the EFI disk label, and you can create a UFS file system greater than 1 terabyte.

There is another unbundled Sun StorEdge QFS Shared File System is also available if you need to create file systems greater than 1 terabyte. (I never worked on this FS)

NOTE: Some important facts of EFI -
1. The size of the EFI label is usually 34 sectors, so partitions start at sector 34This feature means no partition can start at sector zero (0).
2. No cylinder, head, or sector information is stored in the label. Sizes are reported in blocks.
3. Information that was stored in the alternate cylinders area, the last two cylinders of the disk, is now stored in slice 8.
4. The EFI disk label is not supported on IDE disks.

All right, now we have at leat got some idea what is EFI disk label and what are advantages and disadvantages. Now let us see how we can covert EFI disk label to SMI disk label.

So basically you see disk layout like as below -

#format -e c8t60050768018A8023B800000000000013d0
partition> p
Current partition table (original):
Total disk sectors available: 8821342 + 16384 (reserved sectors)

Part Tag Flag First Sector Size Last Sector
0 usr wm 256 4.21GB 8821342
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 8821343 8.00MB 8837726

Look at this there is something call slice 8 which is pretty new for few guys right...

So here we are converting EFI to SMI so that we can use it for UFS.

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? yes
Auto configuration via format.dat[no]?
Auto configuration via generic SCSI-2[no]?
partition> p
Current partition table (default):
Total disk cylinders available: 4313 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 127 128.00MB (128/0/0) 262144
1 swap wu 128 - 255 128.00MB (128/0/0) 262144
2 backup wu 0 - 4312 4.21GB (4313/0/0) 8833024
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 256 - 4312 3.96GB (4057/0/0) 8308736
7 unassigned wm 0 0 (0/0/0) 0

See.. now I can see normal SMI label disk layout.

This is the process to convert EFI label to SMI label. Hope it will help!

No comments:

Post a Comment