Monday, July 13, 2009

Solaris volume Mangement

Solaris volume Mangement

metadb –a [-f] [-c n] [-l nnnn] disk_slice

-a Adds a stale database replica
-f Force the creation of the initial replica, even if no replica exist.
-c n Specifies the number of replicas to add to the slice
-l nnnn Specifies the size of the new replica in blocks
disk_slice Specifies the name of the disk_slice that will hold the replica

# metadb –a –f c0t0d0s4 c0t0d0s5 c1t0d0s0 c1t0d0s1 -- To create metadb
# metadb -- Reports the status of all replicas

RAID 0 Config

# metainit d10(name d0-dn) 3(total disk/slice) 1 c0t1d0s0 1 c0t1d0s1 1 c0t1d0s3
# newfs /dev/md/rdsk/d10

# metaclear d10 -- Delete the volume

# metainit d0(partition name) –p d10(volume name) 1000m -- Creating partition

# metattach d0 999m -- To increase partition size

# growfs –M /m1(mount point) /dev/md/rdsk/d0 -- To create FS for extra space added

# metattach d10(volume) c0t1d0s4 -- To increase space for volume


RAID 5 Config

# metainit d20 –r(raid 5 option) c0t1d0s0 c0t1d0s1 c0t1d0s3

# metadb –d –f c0t1d0s7 -- To delete metadb

RAID 1 Config

# metainit d10 –m d0 -- To create mirror
Then reboot
# metattach d10 d1 -- Attaching another disk to mirror

# metastat -- To check the status of mirror disk


Building a Mirror of the Root (/) File System

metainit –f concat/stripe numstipes width components……
# metainit –f d0 1 1 c0t0d0s0
d0 concat/stripe is setup

# metainit d1 1 1 c0t1d0s0
d1 concat/stripe is setup


metainit mirror –m submirror [read_options] [write_options] [pass_num]

read_options
-g -- Enables the geometric read option, which results in faster performance on sequential
reads
-r -- Directs all reads to th first submirror. Use this option, when the devices that comprise
the first submirror are substantially faster than those of the second mirror.

You cannot use –r option with the –g option. If neither the –g nor –r options are specified, reads are made in a round-robin order from all submirros in the mirror. This process enables load balancing across the submirros.

write_options
S -- Performs serial write to mirrors. The default setting for this option is parallel write
Pass_num -- A number (0-9) at the end of an entry defining a mirror that determines the order in which that mirror is resynchronized during a reboot. The default is 1. If 0 used resync is skipped.

# metainit d10 –m d0
d10 : Mirror is setup

# metaroot d10 -- Updates /etc/system file also /etc/vfstab

# grep md /etc/vfstab
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -

The metaroot command also updates the /etc/system file to contain the forceload statement that loads the kernel modules that support the logical volumes.

# tail /etc/system
forceload : misc/md_hotspares
forceload : misc/md_sp
forceload : misc/md_stripe
forceload : misc/md_mirro
forceload : drv/pcipsy
.
.
.
rootdev:/pseudo /md@0.10.blk

You must reboot the system before attaching the secondary submirror
# init 6
# metattach d10 d1
d10: Submirror d1 is attached

# ls –l /dev/dsk/c1t0d0s4
Record the path that follows the /devices directory: /pci@if,0/pci@1/scsi@4......................

ok nvalias backup_root /pci@if,0/pci@1/scsi@4,1/disk@2,0:b
ok printenv boot-device
boot-device=disk net
ok setenv boot-device disk backup_root net
boot-device=disk backup_root net

ok boot backup_root -- To test the secondary submirror
Unmirroring the Root (/) File System

# metastat d10 -- To verify that status of the mirror
# metadetach d10 d1 -- To make a one-way mirror
d10: submirror d1 is detached
# metaroot /de/dsk/c0t0d0s0 -- To change entries in /etc/vfstab and /etc/system
# init 6
# metaclear –r d10 -- To clear the mirror and submirror. The –r deletes metadevices
d10: Mirror is cleared
d0: Concat/Stripe is cleared
# metaclear d1
d1: Concat/Stripe is cleared

No comments:

Custom Search

Feeds from my other blog

Samsung S2 Brand new for 25900 White piece sealed box

For Sale, Mobile Phones - Accessories in India, Andhra Pradesh, Hyderabad. Date September 17

For Sale in Hyderabad