« Terror Alert Levels | Main | Poetry »

August 05, 2005

Copying Disk Layouts (Solaris)

A couple of weeks back I posted about Insufficient metadevice database replicas - a problem that can happen on Sun servers. In that post, I mentioned a way of copy the partition maps from one disk to another.

A kind reader named Oscar pointed out a better way of doing it:

Your whole copy disk VTOC example via "format" can be replaced with a single line command:-
# prtvtoc /dev/dsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c5t0d0s2
the above example copies the VTOC from disk c0t0d0 to disk c5t0d0

Unfortunately Oscar did not leave an web address that I could link but I have sent him an email to thank him. When I first read the post, I said to myself: "Ah yes, but those commands were only introduced in recent editions of Solaris". I was wrong. Very wrong. Looks like both prtvtoc(1M) and fmthard(1M) were in Solaris 2.4 (and may have existed earlier although I couldn't find them in the SunOS -> Solaris transition commands.

So thank you Oscar. I am always glad to learn a better way to do something...

Posted by Ozguru at August 5, 2005 06:00 AM