Veritas Volume Management Print
Written by Administrator   
Thursday, 04 December 2008 11:47

Veritas Volume Management

Veritas VxVm cmds (4.0) for Solaris Boot Disk Management

VxVM Manual ch 4, 5
The correct procedure for remirroring bootdisk from bootmirror so that 
they are nearly identical in paritioning scheme should be:
(after many tries):

/etc/vx/bin/vxdisksetup -i c1t0d0 format=sliced
Add disk c1t0d0 to vertias control, using sliced format for boot-able di
sk.

vxdg -g rootdg adddisk bootdisk=c1t0d0

vxmirror -g rootdg bootmirror bootdisk
This mirror partition and cyl in right seq.

/etc/vx/bin/vxbootsetup -g rootdg rootdisk
just in case vtoc or boot sector info is missing.

----

Some more notes from the try, vxassist command used as per book suggestion.

fix later, from try 2 on oaprod2

vxplex -g rootdg dis rootvol-01
vxplex -g rootdg dis var-01 u01-01 swapvol-01
vxedit -g rootdg -fr rm rootvol-01
vxedit -g rootdg -fr rm swapvol-01 var-01 u01-01
vxdg -g rootdg rmdisk bootdisk
vxdisk rm c1t0d0

/etc/vx/bin/vxdisksetup -i c1t0d0 format=sliced
Add disk c1t0d0 to vertias control, using sliced format for boot-able disk.

vxdg -g rootdg adddisk bootdisk=c1t0d0

vxassist -g rootdg mirror swapvol bootdisk &
Mirror swap slide
try mirror swap first so that it will start at cyl 2
It won't put any partition info in vtoc yet.

/etc/vx/bin/vxrootmir bootdisk
mirror the root partition, it will need slide 0 be avail.
This would probably work, except somehow var was placed in disk earlier
than root, so will need to do that first.
vxassist -g rootdg mirror var bootdisk &
vxassist -g rootdg mirror u01 bootdisk &

So instead, use vxmirror...
vxmirror -g rootdg bootmirror bootdisk
This mirror partition and cyl in right seq.
oaprod2 seems to be fine.



vxmirror : mirror root disk

Missing!! Try in test "4"
/etc/vx/bin/vxbootsetup -g rootdg rootdisk
Configure bootable info on vxvm boot disk in rootdg disk group.
This include boot sector and solaris VTOC info that match
location of root, swap, /usr, /var.
Optional media name(s) at end (rootdisk) specify action to be carried out
on specified disk only (if omitted, done for all disk in dg).

More info:
http://www.sun.com/blueprints/0800/vxvmref.pdf

vxbootsetup would be needed for vxassist, and slide indeed show up in vtoc/format.
but vxassist method req more work to copy partition in the right cyl
manner. Maybe if bootmirror was created using vxassist, then that
would have been good. But right now, vxmirror works great
and don't really need vxbootsetup (at least in 4.0)

---

VxVM commands on oaprod1, clean tba

544 vxmirror -g rootdg c1t1d0 c1t0d0
545 vxmirror c1t1d0s2 c1t0d0s2
546 vxdg -g rootdg c1t1d0s2 c1t0d0s2
547 vxmirror -g rootdg c1t1d0s2 c1t0d0s2
548 vxmirror -g rootdg c1t1d0s2 c1t0d0s2
549 vxmirror -g rootdg c1t1d0s0 c1t0d0s0
550 vxprint -hrt
556 vxdisk list
564 vxdmpadm -h
565 vxtask list
566 vxprint -hrt
567 vxdisk list
576 vxdisk list
577 man vxdisk
578

vxdisk list
display all disk managed by Veritas
vxdisk -s list
much more detailed version than above
vxprint
print disk slice/mirroring info, plex,vol, etc
vxprint -hrt
diff version than above, useful to see boot disk mirroring location
on disk.


vxvol -g oracledg stopall
stop all veritas volume on the specified disk group oracledg.
all volume must be unmounted first

vxdg deport oracledg
export the disk group oracledg
this would make all the disk/volume of the said disk group
to be available for import by other hosts.
optional -h parameter tell who is expected to do import

vxdg list
list all disk group
vxdisk -o alldgs list
scan all disk, incl those not currently managed by veritas.
those with disk group name inside () are exported dg, ready for import.

vxdg import oracledg
import the said disk group oracledg

vxvol -g oracledg startall
start all disk in said disk group oracledg
This will make all vol in said disk group to be avail for mounting
and general use.
Veritas may have some locking mechanism based in scsi3 to fence off
multiple host from importing a disk group, even if forceful.
(as maybe problem on SAN disks shared in cluster).
Check this first though.

----

vxddladm addjbod VID=DGC pagecode=0x83 offset=8 length=16
disable Veritas DMP (dynamic MultiPath) and use EMC PowerPath driver instead
(EMCpower pkg need to be installed).

vxddladm listjbod
Display current settings

vxddladm rmjbod vid=DGC
Undo use of EMC PowerPath, and let Veritas DMP do its thing again.

Veritas DMP will continue to be used, PowerPath sits at lower layer and intercept the calls
to the different disks. Veritas will know multiple path to the LUN, and it will know they are
the same. If fiber is removed, DMP won't know as power path work behind the scene. Syslog
will log error. After using vxddladm addjbod, reboot machine w/ reconfigure to ensure all devices are seen.


vxdmpadm getdmpnode enclosure=Disk
list paths to various disks/luns


May 3 15:05:15 oaprod1 vxio: WARNING: VxVM vxio V-5-0-181 Illegal vminor encountered

The error is said due to vm disk starting up before vxconfigd, but my experience is that vxconfigd is already running.
Other things to check:
There is no files named:
/VXVM-UPGRADE/.start_runed
/etc/vx/reconfig.d/state.d/install-db


ls -l /dev/vx/dsk/
reminor disk group whose import is in conflict w/ existing disk group.

ls -l /dev/vx/dsk/oracledg
brw------- 1 root root 259,52001 May 4 17:10 u02
brw------- 1 root root 259,52000 May 4 17:10 u03
^^^^^
^^^^^ 52000 is the minor number, shown also in vxprint -l oracledg

vxdg -g oracledg -f reminor 53011 # change the minor number of a disk group,
# must be done while disk group is mounted
# but changes take effect only in the next import run
# and this minor number belongs to the disk group, which get carried to
# another node when it is imported there.





Other commands

vxassist

/usr/sbin/modinfo | grep vx : look for loaded veritas modules (to see if veritas was running)

vxlicense -p : list licenses available in the system
vxlicense -c : interactive program to enter veritas license key
: license files are stored in /etc/vx/elm/
/usr/sbin/vxdisk list : list veritas disks, status

/usr/sbin/vxprint -ht : show some long config,
/usr/sbin/vxprint -m :
: veritas setup, etc



vxdiskadm : encaptulate root disk
vxmirror : mirror root disk
vxassistmirror

vxrecover : rebuild? failed vx slide
vsedvtoc : edit the veritas "fdisk/format" info

vxvol stop : stop all veritas volumes on root disk
vxedit -r : remove volume