# disinstallare VxVM #
1) DEPORT DG
2) SMONTARE FS
3) SALVARE vfstab e system in .save
cp /etc/vfstab /etc/vfstab.save
cp /etc/system /etc/system.save
4) Ripristinare la vfstab precedente all'installazione
cp /etc/vfstab.prev /etc/vfstab
5) init 6
6) format c0t0d0 per azzerare le private region di vxvm come da
/etc/vx/reconfig.d/disk.d/vtoc, che contiene il vecchio partizionamento del disco di boot
(partition -> n. slice -> dim=0 -> label)
o prtvtoc <disco_boot>
7) Rimuovere pacchetti e patch
pkginfo|grep -i VRTS
showrev -p |grep -i VRTS
8) init 6
# installare VxVM #
pkgadd ....
vxinstall
- licenza
- quick : inizializza tutti i dischi e li mette in rootdg
- custom: chiede il nome del rootdg e richiede il reboot
- creare il filesystem sul volume: newfs /dev/vx/dsk/<dg>/<vol>
# vari comandi #
vxassist -g <dg> make <vol> <size> layout=mirror nome_disco nome_disco
i nomi dei dischi di default sono dg00 dg01
per inizializzare :
/etc/vx/bin/vxdiskunsetup -C c#d#t#
vxdctl enable
vxdiskadm c#t#d#
vxdg -g <dg> adddisk c#t#d#
vxedit rename c#t#d# nome
per vedere i task in corso :
vxtask list
deportare il disco:
vxdg deport <dg>
importare il disco:
vxdg import <dg>
lista dei dg:
vxdg list
vxprint -Ath
vxprint -g <dg>
per vedere lo spazio allocato e free:
vxassist -g nome_dg help space
per modificare la dimensione del volume:
/etc/vx/bin/vxresize -g oradg oravol 2.5g
quando si fa import e deport i volumi vengono messi in disable, per attivarli:
vxvol -g <dg> start <vol>
vxvol -g <dg> startall
1 Installazione VxFS/VxVM
1.1 VERITAS: installazione prodotti
* Montare il cd di installazione dallo share:
mount -F nfs host:/export/software /mnt
* Dal cd di installazione, lanciare ./installer.
Selezionare i prodotti da installare. Il secondo cd
contiene gli agenti per SAN.
nstallo VxFS, inserisco l'hostname e la licenza.
Nota: la licenza è per hostname e hostid. Verificare
sempre con i comandi hostname e/o hostid.
* Eseguo il reboot a fine installazione:
shutdown -y -i6 -g0
* Procedo allo stesso modo anche per VxVM e i prodotti
collegati (appare dalla schermata se la licenza è
valida per i prodotti nella lista). Non richiedono
reboot. Alla fine:
+----------------------------------+--------------------+----------+
| VERITAS Product | Version Installed | Licensed |
+----------------------------------+--------------------+----------+
+----------------------------------+--------------------+----------+
| File System | 4.0 | yes |
+----------------------------------+--------------------+----------+
| Volume Manager | 4.0 | yes |
+----------------------------------+--------------------+----------+
| Volume Replicator | no | no |
+----------------------------------+--------------------+----------+
| Cluster Server | no | no |
+----------------------------------+--------------------+----------+
| Cluster Server Traffic Director | no | no |
+----------------------------------+--------------------+----------+
| Storage Foundation | 4.0 | yes |
+----------------------------------+--------------------+----------+
| Storage Foundation for Oracle | no | no |
+----------------------------------+--------------------+----------+
| Storage Foundation for DB2 | no | no |
+----------------------------------+--------------------+----------+
| Storage Foundation for Sybase | no | no |
+----------------------------------+--------------------+----------+
| SANPoint Control QuickStart | 4.0 | yes |
+----------------------------------+--------------------+----------+
| Enterprise Administrator GUI | 3.2.514.0 | yes |
+----------------------------------+--------------------+----------+
1.2 VxVM: incapsulamento disco boot. Creazione rootdg.
* Durante l'installazione del S.O. sono state create
slices sul disco c0t0d0. Tali slices devono essere
trasformate in oggetti utilizzabili da VxVM. Per
questo, senza perdere dati, si ricorre
all'incapsulamento.
* Lancio vxdiskadm. Al menu scelgo (2) Encapsulate one
or more disks per incapsulare. Mostro i dischi
utilizzabili (list). Poi scelgo il disco c0t0d0. A
richiesta del disk group, seleziono rootdg, che verrà
creato allo scopo. Non utilizzo il default name per
il disco: seleziono (n) e più avanti mi verrà
richiesto il nome da dare: rootdisk.
Enter disk name for c0t0d0 [,q,?] (default:
bootdg01) rootdisk
* Alla fine, dovrebbe apparire il messaggio:
The c0t0d0 disk has been configured for encapsulation.
The first stage of encapsulation has completed
successfully. You
should now reboot your system at the earliest
possible opportunity.
The encapsulation will require two or three reboots
which will happen
automatically after the next reboot. To reboot
execute the command:
shutdown -g0 -y -i6
This will update the /etc/vfstab file so that volume
devices are
used to mount the file systems on this disk device.
You will need
to update any other references such as backup
scripts, databases,
or manually created swap devices.
* Dopo il reboot, il file vfstab viene modificato
automaticamente:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/vx/dsk/bootdg/swapvol - - swap - no -
/dev/vx/dsk/bootdg/rootvol
/dev/vx/rdsk/bootdg/rootvol / ufs 1 no logging
/dev/vx/dsk/bootdg/usr /dev/vx/rdsk/bootdg/usr /usr
ufs 1 no logging
/dev/vx/dsk/bootdg/var /dev/vx/rdsk/bootdg/var /var
ufs 1 no logging
/dev/vx/dsk/bootdg/opt /dev/vx/rdsk/bootdg/opt /opt
ufs 2 yes logging
swap - /tmp tmpfs - yes -
#NOTE: volume rootvol (/) encapsulated partition c0t0d0s0
#NOTE: volume swapvol (swap) encapsulated partition c0t0d0s1
#NOTE: volume var (/var) encapsulated partition c0t0d0s3
#NOTE: volume usr (/usr) encapsulated partition c0t0d0s4
#NOTE: volume opt (/opt) encapsulated partition c0t0d0s5
* Nota: il disk group viene chiamato comunque bootdg.
C'è un link simbolico a rootdg.
1.3 VxVM: mirror dei volumi
1.3.1 Aggiungo un disco al rootdg
* Uso vxdiskadm. Nel menu scelgo (1) Add or initialize
one or more disks.
* Inizializzo il disco c1t0d0. Lo inserisco in rootdg e
lo chiamo rootmirror
1.3.2 Eseguo il mirror
* Uso vxdiskadm. Nel menu scelgo (6) Mirror volumes on
a disk.
* Selezionare il disco contenente i volumi da
mirrorare: rootdisk. Mi viene richiesto il
destination disk:
Enter destination disk [,list,q,?] (default:
any) rootmirr
The requested operation is to mirror all volumes on
disk rootdisk
in disk group rootdg onto available disk space on
disk rootmirr.
VxVM NOTICE V-5-2-3650 This operation can take a long
time to complete.
Continue with operation? [y,n,q,?] (default: y) y
VxVM vxmirror INFO V-5-2-22 Mirror volume swapvol ...
* Controllo il progresso del mirror:
vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
161 ATCOPY/R 94.89% 0/62916216/59699200 PLXATT swap
vol swapqvol-02 rootdg
1.3.3 Alternate boot path
* A fine procedura di mirror, la variabile di eeprom
viene settata automaticamente:
eeprom | grep nvra
use-nvramrc?=true
nvramrc=devalias vx-rootdisk /pci@bc,4000/scsi@4/disk@0,0:a