Saturday 19 April 2008

How to define slices on a SPARC and x86/64 system (Solaris)

x86/64 systems require the additional steps to create a Solaris fdisk partition before you can create slices within that partition.SPARC systems don't use fdisk partition.
This is short note.you can see more detail on solaris website.

1. Use format utility
# format
Identify the correct disk.
2. use fdisk menu in the format utility to create the fdisk partitions(SPARC system don't use fdisk partition)
3. use partition menu in the format utility to divide the disk or Solaris fdisk partition into slices.
4. Label the disk or Solaris fdisk partition with new slice information

Viewing the VTOC
- Use verify command in the format utility
- prtvtoc command from command line.

Replacing VTOC on disk
prtvtoc to save VTOC to file
# prtvtoc /dev/rdsk/c1t1d0s2 > /var/tmp/c1t1d0s2.vtoc
fmthard command to replace the VTOC to recover
# fmthard -s /var/tmp/c1t1d0s2.vtoc /dev/rdsk/c1t1d0s2
nort : use /dev/null instead backup vtoc file to initialize the VTOC of a disk

Viewing the fdisk partition table

This procedure only pertains to x86/64 systems.
# fdisk -W - /dev/rdsk/c1t1d0s2
option - to print to console

Replacing fdisk partition table
Write fdisk table to file
# fdisk -W /var/tmp/c1t1d0s2.fdisk /dev/rdsk/c1t1d0s2
Load fdisk table from file to disk
# fdisk -F /var/tmp/c1t1d0s2.fdisk /dev/rdsk/c1t1d0s2

more information
Device and file system : http://docs.sun.com/app/docs/doc/817-5093?l=en
format utility : http://docs.sun.com/app/docs/doc/817-5093/disksformat-15833?l=en&a=view
prtvtoc command : http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqcj?l=en&a=view
fmthard command : http://docs.sun.com/app/docs/doc/817-5440/6mkt7md5m?l=en&a=view

No comments: