Veritas reminders
Based on VXVM v3.0.4 on Solaris 2.6 and Solaris 8
Installation
To encapsulate the root (swap,var..) disk :
N.B. the root disk must have 2 slices free
run vxdiskadm and follow instructions
afterwards, there are more forceloads in /etc/system (scsi, pci, sd..), and also at the end of /etc/system:
and /etc/vfstab is modified to contain vx devices ( the old copy of vfstab is renamed to vfstab.prevm)
vxprint will now show new volumes created for any filesystems you had on your root disk (swapvol, usr, home..)
To mirror the root disk :
To do this, you must add a new disk (which must have slice 0 free) to the rootdg disk group. You may have done this during vxinstall; if not, you can do this using
|
To create a new filesystem/volume:
vxassist make robin2 100m [ disk1 disk2 ] mkfs /dev/vx/rdsk/robin2 204800 |
Create a disk group:
vxdg init testdg test01=c0t3d4 Delete ("deport") a disk group: vxdg deport testdg |
|
To remove filesystem/volume: umount /mnt vxassist remove volume robin2 or vxvol stop robin2 vxedit –rf rm robin |
Remove a disk from a disk group: vxdg –g testdg rmdisk test01 |
|
See largest size of a new volume :
# vxassist maxsize Maximum volume size: 21950464 (10718Mb) |
Add a hot spare disk to a disk group: vxdg adddisk disk03=c0t1d0s2 vxedit set spare=on disk03 |
|
See largest size a volume can be grown by :
# vxassist maxgrow usr Volume usr can be extended by 21950464 to: 28242970 (13790Mb+1050 sectors) |
|
|
Grow a filesystem/volume: vxassist growto robin2 200m or vxassist growby robin2 50m Then you have to run mkfs to grow the filesystem: mkfs /dev/vx/rdsk/robin2 512000 /etc/vx/bin/vxresize robin2 250m |
Remove a mirror:
vxassist remove mirror robin2 [ !plex-name ] or (better) vxplex –o rm dis plex-name |
|
Dissociate plex from volume: vxplex dis plex-name |
Dissociate sub-disk from plex: vxsd dis subdisk-name |
|
remove volume : vxedit rm vol-name |
Remove subdisk/plex: vxedit rm name |
Show free disk space (i.e. free ‘chunks’, space not allocated to sub-disks):
Show disks:
View a summary:
See exact layout of sub-disks on the disk
vxprint options:
Recreating volumes / plexes / subdisks
(in this case, 'vxassist remove mirror testvol' had removed the wrong side of the mirror)
re-create the sub-disk
VX snapshots
for doing consistent online backups.
NB to do snapshots, you must have spare disk space on a separate disk (as if you were going to mirror the volume)
Uninstalling VXVM
unmount filesystems, transfer them to non-vxvm disks (e.g. using ufsdump)