[SunHELP] Add a disk

Phil Stracchino phil.stracchino at speakeasy.net
Sun Sep 11 17:39:41 CDT 2005


Eric Webb wrote:
> Hi guys,
> 
> Need basic pointers/starters on how to add new disks to an existing Sol9 
> install.  I have two extra drives I'm adding to an E250, the idea is to use 
> them as a mirrored pair for data.  Coming from other *nixes, I'm kinda lost 
> without an LVM... ;)

Insert disks.
Create the device nodes:

host:root:/:1 # devfsadm -v -c disk

Run format.  It should find two new disk devices.  Let's say they're
c0t1d0 and c0t2d0.  Label them if necessary and set up the following slices:
	slice 0 -- entire disk except the last 50MB, tag usr, flags wm
	slice 2 -- entire disk, tag backup, flags wu
	slice 7 -- last 50MB, tag usr, flags wm

Remember to write the new label and partition map to the disks.

Assuming you're not already running metadevices:
Create metadb replicas

host:root:/:2 metadb -a -f -c 3 c0t{1,2}d0s7

I suggest creating either one or three metadb replicas on your boot disk
as well, if you have a small extra slice you can use for the purpose.
The solaris metatools require that half the total metadb replicas,
rounded down, plus one, must be available at boot time.

Set up the metadevices using metatools:

host:root:/:3 # metainit d11 1 1 c0t1d0s0
host:root:/:4 # metainit d12 1 1 c0t2d0s0
host:root:/:5 # metainit d10 -m d1 d2

Create a filesystem on the mirror:

host:root:/:6 # newfs /dev/mb/rdsk/d10

Set up a line in /etc/vfstab to mount the filesystem where you want it.
 Remember to use /dev/md/dsk/d10 and /dev/md/rdsk/d10 for the devices.
Logging is a good idea.  Your /etc/vfstab line should end up looking
something like this:

/dev/md/dsk/d10   /dev/md/rdsk/d10   /data   ufs   1   yes   logging


Then just mount the new filesystem:

host:root:/:7 # mount /data

And you're done.


-- 
 Phil Stracchino       phil.stracchino at speakeasy.net
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518



More information about the SunHELP mailing list