Tuesday, July 26, 2011

Solaris Volume Manager

State Database Replicas are the meta database which will hold all the volume information. The default state database replica size in SVM is 8192 blocks while in Solstice DiskSuite is 1034 blocks. You should create state database replicas on dedicated slice of at least 4 mega bytes per replica copy.

A minimum of 3 copies of replica is required on a system.


Here are few commands to manage state database replicas ...

To create the initial state db replicas:
# metadb -a -f c1t0d0s3

To create additional state database replicas on disks:
# metadb -a c1t1d0s3 c1t2d0s3 c1t3d0s3

To create 2 state database replicas on the same disk:
# metadb -a -c2 c1t3d0s3

To list all the state database replicas :
#metadb

To list the status:
#metadb -i

To delete a state database replica:
#metadb -d c1t0d0s3

Volumes:

To create a stripe volume :
# metainit d0 1 2 c0t1d0s3 c0t2d0s3 -i 32k

To create a concat volume :
# metainit d1 2 1 c0t1d0s3 1 c0t2d0s3

To remove a stripe or concat volume :
# metaclear d0

To create a mirror using 2 concat volumes (d1 and d2) :
# metainit d10 -m d1
# metattach d10 d2

To detach a submirror from a mirror volume :
# metadetach d10 d2

To place a submirror offline :
# metaoffline d10 d2

To place a submirror online :
# metaonline d10 d2

To show the details of a volume :
# metastat d10

To create a RAID5 volume :
# metainit d11 -r c1t2d0s4 c2t2d0s4 c1t2d0s4
 

Now lets look at how to create and manage filesystem on the volumes

To create filesystem on the volume :

# newfs -i 8192 /dev/md/rdsk/d10

To mount the filesystem :
# mkdir /data
# mount -F ufs /dev/md/dsk/d10 /data

Also add the below line to /etc/vfstab so that the filesystem mounts on every reboot.
/dev/md/dsk/d10       /dev/md/rdsk/d10      /data  ufs     2       yes     -

No comments:

Post a Comment