Friday, September 16, 2005

Add new disks to an existing Sol9

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

> http://docs.sun.com/app/docs/doc/816-4520 - Solaris Volume Manager
> Administration Guide.

There are a number of good step-by-step guides out there on the web
to go along with the official docs for SVM, or "DiskSuite" for us old
timers:

http://www.unixway.com/vm/disksuite/index.html
http://slacksite.com/solaris/
http://www.adminschoice.com/docs/P_Solstice_disksuite.htm
http://sysunconfig.net/unixtips/solaris.html#svm

I still refer to these to remind myself of syntax when doing things
that are (hopefully) rare, like replacing failed disks.

0 Comments:

Post a Comment

<< Home