Solaris: Copy disk labels to duplicate drive layout

Contributor Icon Contributed by Michilimackinac  
Tag Icon Tagged: Solaris system administration  

While the format command can be used to manually lay out the slices of a disk and save the label to disk, when performing administrative steps like preparing for mirroring drives with DiskSuite it can be useful to copy the label of an existing disk to another. This Tech-Recipe uses the fmthard command to save a disk label to a file and then another fmthard command to write to the second disk.


fmthard -i -n "" /dev/rdsk/c0t0d0s2 > /tmp/d0

This command writes the disk label on c0t0d0 out to a file

fmthard -s /tmp/d0 -n "" /dev/rdsk/c0t1d0s2

This command writes the disk label defined in the file /tmp/d0 to disk c0t1d0

 

1 Comment -


  1. Imnkk said on February 8, 2011

    How to reove the label from second disk

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -