jueves, 24 de abril de 2008

cp with tar

cd /u01
tar cfvE - .| (cd /u01_new; tar xfBp -)
cd /oradatos
tar cfvE - .| (cd /oradatos_new; tar xfBp -)
cd /oraindices
tar cfvE - .| (cd /oraindices_new; tar xfBp -)

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

martes, 15 de abril de 2008

LVM

# Enable LVM in disk
pvcreate /dev/sdb

# Create Volume Group
vgcreate storage0 /dev/sdb

# Active Volume Group
vgchange -a y storage0

# Create Logical Volume
lvcreate -l 2047 storage0 -n opt0

# Extend Volume Group
vgextend storage0 /dev/sdb2

# Check Volume Group
vgdisplay

# Extend Logical Volume
lvextend -L+1G /dev/storage0/opt

sábado, 5 de abril de 2008

Configure RSC SUN SPARC

Install:

To OS SOL 9 y 10.

- Enterprise 250
- Sun Fire 280R
- Sun Fire V880
- Sun Fire V480
- Sun Fire V890
- Sun Fire V490

You should install the base Solaris packages and the localization
packages for any locales supported on your system. For your reference,
the packages are:

Download: Click here

SUNWrsc - the RSC base package for installation on the host machine
SUNWrscd - the RSC documentation package
SUNWrscj - the RSC GUI package to be installed on any system wanting
to display the RSC GUI


Procedure:

To unpack for Solaris 9 & Solaris 10:
mkdir /tmp/RSC
unzip -d /tmp/RSC rsc2.2.3_packages_s9.zip
cd /tmp/RSC
pkgadd -d SUNWrsc
pkgadd -d SUNWrscd
pkgadd -d SUNWrscj

Running the rsc-config Script on the Server
On the server systems only, type the following command to configure the new firmware image:

# /usr/platform/`uname -i`/rsc/rsc-config