jueves, 24 de abril de 2008

sun_md

# How to configure Meta Devices in solaris 10.
1. Crear la base de estados.
metadb -a -f -c 1 c0t0d0s5 c1t0d0s1

2. Configurar el RAID-0 o 1.

RAID-O: Concatenado o Striped
Concatenad:
metainit -f d0 2 1 c0t0d0s7 1 c3t0d0s0
Checking:
metastat
ls -lL /dev/md/dsk
ls -lL /dev/md/rdsk
df -k /export/home
umount /export/home

Edit "/etc/vfstab" and change device by metadevice.
mount /export/home
df -k /export/home

# Crecer un softpartition:
metattach d0 100gb
growfs -M /export/home /dev/md/rdsk/d0
df -k /export/home

Configurar RAID-1(/): Los dos slice deben ser de igual tamaño
1. metainit -f d11 1 1 c0t0d0s0
2. metainit d12 1 1 c3t3d0s1
3. metainit d10 -m d11
4. metaroot d10
# grep md /etc/vfstab
# tail /etc/system
5. init 6
# df -k
# metastat
6. metattach d10 d12
# metastat d10
7. ls -l /dev/dsk/c3t2d0s1
init 0
OK show-disks
OK nvalias mirror-disk .....
OK nvalis root-disk
OK devalias root-disk
OK devalias mirror-disk
OK printenv boot-device
OK setenv boot-device disk mirror-disk net
OK boot mirror-disk


Eliminar un Mirror(/)
1. metastat d10 # Verificar la consitencia del mirror.
2. metadetach d10 d12
3. metaroot /dev/dsk/c0t0d0s0
grep c0t0d0s0 /etc/vfstab
4. init 6
5. metaclear -r d10
metaclear d12
6. init 0
OK setenv boot-device disk net
OK boot

How to create Logical SVM

root@sdigbogsisg001 # metastat -p d100
d100 1 1 /dev/dsk/c4t600A0B800029E4F20000081946B0C201d0s0
root@sdigbogsisg001 # metastat -p d101
d101 -p d100 -o 32800 -b 262144000
d100 1 1 /dev/dsk/c4t600A0B800029E4F20000081946B0C201d0s0

How to resync one mirror that Need maintenance:

metastat -a | more

d3: Mirror
Submirror 0: d13
State: Okay
Submirror 1: d23
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 18876480 blocks (9.0 GB)

d13: Submirror of d3
State: Okay
Size: 18876480 blocks (9.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s3 0 No Okay Yes


d23: Submirror of d3
State: Needs maintenance
Invoke: metareplace d3 c0t1d0s3
Size: 18876480 blocks (9.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s3 0 No Maintenance Yes


metareplace -e d3 c0t1d0s3

metastat -a | more

d3: Mirror
Submirror 0: d13
State: Okay
Submirror 1: d23
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 18876480 blocks (9.0 GB)

d13: Submirror of d3
State: Okay
Size: 18876480 blocks (9.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s3 0 No Okay Yes


d23: Submirror of d3
State: Resyncing
Size: 18876480 blocks (9.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s3 0 No Resyncing Yes

No hay comentarios: