VxVM Cheat Sheet

From S23Wiki
Jump to: navigation, search

A handy URL before we start: http://www.eng.auburn.edu/pub/mail-lists/ssastuff/

Disk Commands

  • Initialise Disks / vxdisksetup -i c0t9d0
  • Un-initialise disks / vxdiskunsetup -C c0t9d0
  • Remove Disk / vxdisk rm c1t0d0
  • Scan for new disks / vxdctl enable
  • Scan for new disks (3.2 only) / vxdisk scandisks
  • List Disks / vxdisk list
  • List Disk Header / vxdisk list disk1
  • List disk private region / vxprivutil list /dev/rdsk/c1t9d0s2
  • Move data to another disk / vxevac -g my-dg old-disk new-disk
  • Reserve a disk / vxedit -g my-dg set reserver=on my-disk
  • Disable relocation to (3.1 only) / vxedit -g my-dg set nohotuser=on my-disk
  • Undo relocation (3.1 only) / vxunreloc -g my-dg my-disk

Disk group commands

  • Create disk group / vxdg init my-dg disk01=c4t4d0
  • Remove a disk group / vxdg destrogy my-dg
  • Add disk / vxdg -g my-dg adddisk disk02=c1t5d0
  • Remove disk / vxdg -g my-dg rmdisk disk02
  • Import disk group / vxdg import otherdg
  • Deport disk group / vxdg deport my-dg
  • List disk groups / vxdg list
  • Display disk group info / vxdg list my-dg
  • List free space / vxdg -g my-dg free

Subdisk commands

  • Create subdisk / vxmake -g my-dg sd my-sd disk1,0,5000
  • Remove subdisk / vxedit -g my-dg rm my-sd
  • Display subdisk info / vxprint -st
  • Associate subdisk to plex / vxsd -g my-dg assoc my-plex my-sd
  • Disassociate subdisk / vxsd -g my-dg dis my-sd
  • Move a subdisk / vxsd -g my-dg [-o rm] mv old-sd new-sd

Plex Commands

  • Create a plex / vxmake -g my-dg plex my-plex sd=my-sd
  • Associate a plex / vxplex -g my-dg att my-vol my-plex
  • Disassociate a plex / vxplex -g my-dg dis my-plex
  • Attach a plex / vxplex -g my-dg att my-vol my-plex
  • Detach a plex (remains associated) / vxplex -g my-dg det my-plex
  • List plexes / vxprint -lp
  • Remove a plex / vxedit -g my-dg rm my-plex

Volume Commands

  • Create a volume / vxassist -g my-dg make my-vol 1G or vxassist make my-vol 1G layout=stripe
  • Delete a volume / vxedit -g my-dg -r rm my-vol
  • Change owner of a volume / vxedit -g my-dg set user=oracle my-vol
  • Change permissions of a vol / vxedit -g my-dg set mode=644 my-vol
  • Display volume info / vxprint -g my-dg -hrt my-vol or vxinfo -g my-dg my-vol
  • Resize a volume / vxassist -g my-dg growto my-vol 2G or vxassist -g my-dg growby my-vol 500M
  • Resize volume and filesystem / vxresize -g my-dg my-vol new-size
  • Start a volume / vxvol -g my-dg start my-vol
  • Force a volume to start (eg a broken stripe) / vxvol -g my-dg -f start my-vol
  • Stop a volume / vxvol -g my-dg stop my-vol
  • Initialise a volume / vxvol -g my-dg init active my-vol
  • Recover a volume / vxrecover -g my-dg my-vol
  • Mirror a volume / vxassist -g my-dg mirror my-vol
  • Remove mirror from volume / vxassist -g my-dg remove mirror my-vol
  • Add log to a volume / vxassist -g my-dg addlog my-vol
  • Remove log from a volume / vxassist -g my-dg remove log my-vol
  • Snapshot a volume / vxasssit -g my-dg snapstart my-vol or vxassist -g my-dg snapshot my-vol my-snap
  • Change volume layour (v 3.0) / vxassist -g my-dg relayout my-vol layout=stripe
  • Convert volume type (v 3.0) / vxassist -g my-dg convert my-vol layout=stripe-mirror

stripe-mirror and concat-mirror = RAID 1+0

mirror-stripe and mirror-concat = RAID 0+1

Mirroring system disk

  • Initialise disk / vxdisksetup -i c0t8d0
  • Add disk to rootdg / vxdg adddisk rootmirror=c0t8d0
  • Create system disk mirror / vxmirror rootdisk rootmirror
  • Enable devalias in eeprom / vxeeprom enable
  • Boot from mirror disk / boot vx-rootmirror (at prom)
  • Show disk booted from / prtconf -vp | grep bootpath
  • Removing from VM / vxunroot , then reboot..

Monitoring and Performance

  • List running tasks / vxtask -g my-dg list or vxtask list
  • Pause running task / vxtask -g my-dg pause taskid
  • Display volume statistics / vxstat -g my-dg -c 5 -i 10 -v (-s=sd, -p=plex)
  • Display volume operations / vxtrace -g my-dg -c 5 -t 30 -o v (-s=sd, -p=plex)