I want to develop a script that I can run like follows:
./format_disks.sh <disk name 1>, <disk name 2>, etc...
Some background. I've create a VMware based virtual machine that has Solaris 5.11 installed on it. Initially, the only disk that is on this VM is the one that hosts the OS. I then create 4 additional disks on this VM, while the VM is shutdown with the VMware software, specs as follows:
2GB, named c8t1d0
2GB, named c8t2d0
5GB, named c8t3d0
5GB, named c8t4d0
The manual process that I've been doing to get this done is running through the wizard in Solaris 5.11, by typing the format command, then supplying the values as the prompt requests the values, finagling ending the wizard by typing the label command to save the changes. I do this for each of the 4 disks above. Can I somehow accomplish the task I'm wanting by only typing the bolded command above? Or is there some other way to format disk in Solaris 5.11 other than the wizard I'm discussing?
I have never used Solaris 11 and probably never will. But I have used Solaris 10. we would always mirror our disks. I needed two disks with the same layout. I would use the interactive format command on the first and then do:
The prtvtoc command just displays the disk geometry and the fmthard command reads this for it's input. I had a bunch of disks to layout and it occurred to me to simply save the output from prtvtoc and hard code it into a script.