29.01.2007, Oles Hnatkevych, don_oles@able.com.ua
Solaris, making mirrors with SVM
In single-user mode
metadb -a -f c0t0d0s5 c0t1d0s5
metainit -f d10 1 1 c0t0d0s0
metainit d0 -m d10
metainit -f d20 1 1 c0t1d0s0
metaroot d0
init 6
metattach d0 d20
metainit d11 1 1 c0t0d0s1
metainit d21 1 1 c0t1d0s1
metainit d1 -m d11
metattach d1 d21
Vertitas VM: remove volume "myvol2", add free space to another volume "myvol1"
# umount /vol2 # stop using volume
# vxvol -g mydg stop myvol2 # stop volume operations by volume manager, take it offline
# vxedit -g mydg -r rm myvol2 # delete volume recursively (-r), i.e. volume, plexes, subdisks
# vxassist -g mydg maxsize # find available space
# vxassist -g mydg growby myvol1 45g # add 45 gbyte to myvol1, it will be now 45+45=90gb
# fsadm -F vxfs -b 90g /vol1 # extend file system to new size
OR
# vxresize -g mydg -F vxfs myvol1 90g # one command to resize volume and file system to new size
Vertitas VM: Device Discovery, Dynamic Multipathing, Disk Arrays
# vxdisk scandisks new
# vxdisk scandisks fabric
# vxdisk scandisks device=c1t1d0,c2t2d0
# vxdisk scandisks !device=c1t1d0,c2t2d0
# vxdisk scandisks !ctlr=c1,c2
# vxdisk scandisks pctlr=/pci@1f,4000/scsi@3/
# pkgadd -d /cdrom/pkgdir vrtsda
# vxdctl enable
# vxddladm listsupport all
# vxddladm listsupport libname=libvxenc.so
# vxddladm listsupport libname=libvxfujitsu.so
# vxddladm excludearray libname=libvxenc.so
# vxddladm excludearray vid=ACME pid=X1
# vxddladm includearray libname=libvxenc.so
# vxddladm listexclude
# vxddladm listjbod
Vertitas VM: Disks Under VxVM Control
# vxddladm set namingscheme=ebn # enclosure-base naming
# vxddladm set namingscheme=osn # OS naming
# vxdiskadd c0t1d0
# vxdg list
# vxdg list {diskgroup}
# vxdisk -s list {devicename} # display diskgroup contents
# vxdg [-g diskgroup] free # display free space
# vxdg init {diskgroup} [cds=on|off] {diskname}={devicename}
# vxdg [-g diskgroup] [-k] rmdisk {diskname} # remove disk from group [-k even with subdisks]
# vxdiskunsetup {devicename} # remove from VxVM control
# vxvol -g {diskgroup} stopall # before deporting stop all volumes
# vxdg [-t] -n newdg import {diskgroup} # rename group when imporring [-t temporary, if same group name exists]
# vxdg -tC -n newdg import {diskgroup} # import [-C clear import locks]
# vxdg [-h hostname] [-n newdg] deport {diskgroup} # deport group [-n rename] [-h assign lock to another host]
# vxdg -g salesdg rmdisk salesdg04 # move disk between groups...
# vxdg -g mktdg adddisk mktdg02=c0t3d0 # ...DESTROYING config and data on them
# vxdg deport {diskgroup} # deport
# vxdg [-f] import {diskgroup} # import on another system [-f force, for exteme emergency]
# vxrecover -g {diskgroup} -sb # start all volumes in the disk group
# vxdisk clearimport {devicename} ... # clear locks on a specific set of devices
# vxdg -C import {diskgroup} # clear the locks during import