29
Veritas notes The following notes are for Veritas Volume Manager 3.2 for Solaris. "vxvm:vxconfigd: ERROR: enable failed: Error in disk group configuration copies Disk group has no valid configuration copies; transactions are disabled." When receiving this error during system boot and when running vxinstall, follow the steps detailed in http://www.eng.auburn.edu/pub/mail-lists/veritas- users.May99/msg00048.html In my case, the rootdg configuration was apparently corrupted. After issuing touch /etc/vx/reconfig.d/state.d/install-db and rebooting the machine, I was able to run vxinstall. vxvm:vxdg: ERROR: Disk group disk_group: import failed: Disk group has no valid configuration copies" This error can occur when attempting to import a disk group that was configured using a later version of VxVM. In this case, the disk group was configured with VxVM 3.2, but VxVM 3.1.1 was installed. # pkginfo -l VRTSvxvm PKGINST: VRTSvxvm NAME: VERITAS Volume Manager, Binaries CATEGORY: system ARCH: sparc VERSION: 3.1.1,REV=01.30.2001.22.21 Upgrading to at least the same version of VxVM used to configure the disk group will allow the disk group to be imported.

veritas

  • Upload
    yadavky

  • View
    142

  • Download
    2

Embed Size (px)

Citation preview

Page 1: veritas

Veritas notes

The following notes are for Veritas Volume Manager 3.2 for Solaris.

"vxvm:vxconfigd: ERROR: enable failed: Error in disk group configuration copiesDisk group has no valid configuration copies; transactions are disabled."

When receiving this error during system boot and when running vxinstall, follow the steps detailed in http://www.eng.auburn.edu/pub/mail-lists/veritas-users.May99/msg00048.html

In my case, the rootdg configuration was apparently corrupted. After issuing touch /etc/vx/reconfig.d/state.d/install-db and rebooting the machine, I was able to run vxinstall.

vxvm:vxdg: ERROR: Disk group disk_group: import failed: Disk group has no valid configuration copies"

This error can occur when attempting to import a disk group that was configured using a later version of VxVM. In this case, the disk group was configured with VxVM 3.2, but VxVM 3.1.1 was installed.

# pkginfo -l VRTSvxvm   PKGINST:  VRTSvxvm      NAME:  VERITAS Volume Manager, Binaries  CATEGORY:  system      ARCH:  sparc   VERSION:  3.1.1,REV=01.30.2001.22.21

Upgrading to at least the same version of VxVM used to configure the disk group will allow the disk group to be imported.

"ld.so.1: vxconfigd: fatal: libdevid.so.1: open failed: No such file or directory"

With Solaris 8 and VxVM 3.2, the shared library libdevid.so.1 does not get copied to /etc/vx/slib after installing Veritas. If you do not manually copy this shared library to /etc/vx/slib, your system will not boot. Follow these steps to make your system bootable:

1. Boot off a CD-ROM.2. Mount your root and usr file systems.3. Copy /usr/lib/libdevid.so.1 to /etc/vx/slib4. Unmount your root and usr file systems and reboot.

More information:http://marc.theaimsgroup.com/?l=veritas-vx&m=102636855529467&w=2

Page 2: veritas

Clearing device locks

To clear a device lock, use the vxdisk clearimport command:vxdisk clearimport devicename

ex. vxdisk clearimport c0t1d0

Using a Sun StorEdge A5000 disk array with Veritas

Make sure the array(s) are recognized by the operating system.

# luxadm probeFound Enclosure(s):SENA               Name:a1   Node WWN:50800200000276e0     Logical Path:/dev/es/ses2  Logical Path:/dev/es/ses7SENA               Name:a2   Node WWN:5080020000028020     Logical Path:/dev/es/ses3  Logical Path:/dev/es/ses6SENA               Name:a0   Node WWN:5080020000026f38     Logical Path:/dev/es/ses4  Logical Path:/dev/es/ses5SENA               Name:a3   Node WWN:5080020000027060     Logical Path:/dev/es/ses8  Logical Path:/dev/es/ses9

Run Veritas' device discovery program.

# vxdctl enable

Determining maximum size of a volume

vxassist [ -g diskgroup ] maxsize layout=layout [attributes]

Example:

vxassist -g datadg maxsize layout=concat

layout may be concat, mirror, raid5, mirror-stripe, or stripe-mirror.

Veritas disk requirements

Disks managed by VxVM must have (1) two free partitions and (2) 2048 sectors of free space. The prtvtoc command displays how many sectors are in a disk cylinder:

# prtvtoc /dev/rdsk/c0t86d0s2* /dev/rdsk/c0t86d0s2 partition map

Page 3: veritas

** Dimensions:*     512 bytes/sector*     133 sectors/track*      27 tracks/cylinder*    3591 sectors/cylinder*    4926 cylinders*    4924 accessible cylinders

In this example, leave at least 1 cylinder free in your disk layout to allow for VxVM. If the disk is a boot disk, VxVM can shrink the swap partition to create space for VxVM's configuration data, but two free slices are essential for encapsulation.

Creating a volume with vxassist

ex.# vxassist -g datadg maxsizeMaximum volume size: 35356672 (17264Mb)

# vxassist -g datadg make volume 35356672

Create the vxfs file system:# mkfs -F vxfs /dev/vx/rdsk/datadg/db_backups    version 4 layout    35356672 sectors, 17678336 blocks of size 1024, log size 16384 blocks    unlimited inodes, largefiles not supported    17678336 data blocks, 17657432 free data blocks    540 allocation units of 32768 blocks, 32768 data blocks    last allocation unit has 16384 data blocks

Create the mount point:# mkdir /db_backups

Mount the vxfs file system:# mount -F vxfs /dev/vx/dsk/datadg/db_backups /db_backups

Add an /etc/vfstab entry to mount the file system after a reboot.

Replacing a failed disk

After replacing a failed disk in a SENA, make sure to run vxdctl enable for device discovery. Otherwise, you may encounter vxdmpadm errors:

  Initialization of disk device c1t74d0 failed.  Error: vxvm:vxdmpadm: ERROR: Error in ioctl/openvxdmpadm: No such file or directory

Page 4: veritas

vxvm:vxdmpadm: ERROR: Invalid da_namevxvm:vxdmpadm: ERROR: Invalid da_namevxdisksetup: c1t74d0: Device address must be of the form cCtTdD or mcCtTdD where

    C = host bus adapter controller number    T = target device controller number, if used    D = logical unit (disk) number within target device controller

# vxdisk list c1t74d0s2Device:    c1t74d0s2devicetag: c1t74d0type:      slicedflags:     online error private autoconfigerrno:     Device path not validMultipathing information:numpaths:   2c1t74d0s2       state=disabledc5t74d0s2       state=disabled

When replacing a failed internal disk on a Sun E450 running Solaris 8, I had to spin the disk down using ssaadm stop /dev/rdsk/cxtxdxs2as the vxdiskadm's "Disable (offline) a disk device" did not seem to spin the disk down. If you are using a Sun system with FC-AL devices, you will want to use the luxadm command.

After replacing the disk, I enabled device discovery with vxdctl enable and un-relocated the failed subdisks back to this disk using /usr/lib/vxvm/bin/vxunreloc -g disk_group replaced_disk.

Adding additional users to VxVM electronic mail notifications

By default, VxVM sends electronic mail to the root user when failures are detected and hot-relocation is being performed. To notify additional users,

1. Edit /etc/init.d/vxvm-recover2. Change the line containing vxrelocd root & to vxrelocd root user1 user2 ... &This will preserve the change across system reboot.3. To have the change take effect immediately, make sure that hot-relocation is not currently being performed by running vxtask list, kill the vxrelocd process, and run nohup vxrelocd root user1 user2 ... &

Miscellaneous

Adding a disk to a disk group:vxdiskadd disk_name

Page 5: veritas

Creating a subdisk:vxmake [-g groupname] sd subdisk diskname,offset,length

Creating a plex:vxmake [-g groupname] plex plex sd=subdisk1[,subdisk2,...]

Creating a volume with vxmake:vxmake [-g groupname] -U fsgen vol volume plex=plex1[,plex2,...]

Note: use gen instead of fsgen if you are creating a raw file system for RDBMS usage. fsgen is appropriate for general file system usage. More information on fsgen vs. gen.

After creating the volume, initialize the volume with vxvol start volume. If applicable, create the file system with newfs, create the mount point, and mount the volume as a file system.

Associating subdisks with plexes:vxsd assoc plex subdisk1 [subdisk2 subdisk3 ...]

Displaying free disk space in a diskgroup:vxdg [-g groupname] free

Dissociating subdisks from plexes:vxsd dis subdisk

Dissociating subdisks from plexes, removing subdisk from VxVM:vxsd -o rm dis subdisk

Dissociating and removing plexes and all associated subdisks:vxplex -o rm dis plex

Removing a disk from a disk group:vxdg [-g groupname] rmdisk diskname

Renaming a disk:vxedit rename old_diskname new_diskname

Removing a volume (vxassist):vxassist remove volume volume

Removing a volume (vxedit): what is the diff between ufslog and vxfslog?   1   60

what are the alarms in solaris?   0   31 1. How do you replace a failed boot disk under meta in solaris? Step by step explanation? 2. How do you remove meta only for the root slice? remaining slices should run under meta? 3. what you would do if you want to replace a slice using metareplace option? 4. what is the significance of 51% state database replicas in SVM? 5. what are the common errors you find in Solaris Volume

Page 6: veritas

manager? 6. You have a boot disk under svm, the machine fails to boot and remains in ok prompt? what could be the possible reason? 7. metastat -p shows a metavolume needs replacement. Metavolume is a single way mirror only. Actually you find disk and metavolumes are ok and I/O is happening to the filesystems… how will you remove the metareplace message that comes out of metastat. 8. How to create a shared disk group in VxVM? 9. What is the difference between private and public regions in Veritas Volume manager? 10. what would you do if the private region of a particular disk group is full? What are the design considerations for the size of private region in Vxvm disk group? 11. How to replace a corrupt private region? in vxvm 3.5 and greater versions… 12. How would you convert a volume from gen to fsgen? why should you do that? 13. How can you unencapsulate a boot disk in VxVM? 14. How to identify multiple paths for a disk. 15. What is the difference between Vxdmp and EMC powerpath? 16. vxdisk -o alldgs list o/p shows some disk groups in braces… What does that signify? 17. what are the various layouts that are available in VxVM? 18.What is a layered volume? how to create it using vxmake? 19.How to quickly mirror a volume, if the volume is empty? 20. How to grow a volume? 21. What is the difference between failing and failed disks? 22. How to replace a failed disk in Veritas? 23. Plex is in a disabled state. How will you recover? what are the steps to follow? 24.what is the difference between detached and disassociate state of plexes? 25. Whats the boot process of VxVM? 26. Whats the difference between SVM and VxVM? What would you recommend to your clients? why? 27.What are the various clusters you have worked on? 28. Which cluster is better VCS or Sun cluster? 29. Compare and contrast VCS and Sun Cluster. 30.how will you start VCS service? What are the configuration files in VCS? 31. How would switch a service group? 32. How

would you freeze a service group? 33. What is a Split brain scenario ?   2   112 My solaris system has 16GB RAM and swap. /tmp is associated to swap. We use vmstat command to get used system memory. We observe that once we fill up /tmp, it reflects in vmstat command. My intention is only to get overall used memory in RAM. 1. Can you let me know the if there is a solaris command to just get used memory in RAM? 2. How

is /tmp filling up associated to "free memory" in vmstat command?   0   48 What

are the options available in Solaris Security setting.? Accenture   0   55 After first installation of Solaris 10, what and all the Securities We need to set and how ? Microland

0   45 I would like to create users and the users account should be locked after 3 login attempts. How to create ? And where these locked information has been stored.

Environment : NIS and if LDAP also CTS   1   389 in solaris performance tuning

what fields we check with IOSTAT, VMSTAT and NETSTAT? Wipro   2   370

In solaris while patching why should we break the mirroring? Wipro    1   238

how to recover a server/system backup? Wipro   0   71 i dont have access to the

FTP server, what is the problem and how to trouble shoot? Wipro   1   215 What

is the command to check wwn in solaris? Siemens   2   443 What is Sun

Explorer ? CTS   4   548 In Solaris, how to check the number of Users currently

logged in ? CTS   3   455 If a User Account is locked,which file you need to

Page 7: veritas

check and how do you get to know at what time it has been locked.vxedit [-r] [-f] rm volume

-r -- recursive removal-f -- force removal; needed if volume is enabled

Moving hot-relocated subdisks back to their original disk with vxunreloc:/usr/lib/vxvm/bin/vxunreloc [-g groupname]original_disk

TITLE : Veritas Volume Manager command listOS LEVEL : SolarisDATE : 10/02/01VERSION : 1.0AUTHOR : Hubertus A. Haniel ([email protected])

----------------------------------------------------------------------------Create Veritas layout on a disk:

vxdisksetup -i c1t10d0 NOTE - private regon is 1024 sectors by default which means that it is limited to 2000 objects, when creating extreemly large diskgroups vxdisksetup might need the flag of privlen=2048.

Create a disk group on a new disk:vxdg init <dg name> <media name>=c1t10d0

Add disk to an existing disk group:vxdg -g <dg name> adddisk <media name>=c2t0d0

replace addisk with rmdisk to remove a disk

Set up a preferred reading plex, this can be useful if we have a sparse plex (plex in RAM):

vxvol -g <group> rdpol prefer <volname> <plexname>instead of prefer we can have round or sdeet

View configuration:vxprint -th

List disks:vxdisk listvxdisk -o alldgs list (shows deported disks)

Adding disks while solaris is running:drvconfig (This probes scsi - Solaris)disks (Creates links in /dev - Solaris)prtvtoc (View the vtoc - Solaris)vxdctl enable (Rescan for disks - Veritas)vxdisk list (Shows the disk in error as they are not

initalized jet)vxdisksetup (init the disks)

Page 8: veritas

To encapsulate use: vxencap -g <discgroup> <devicename>

Export a disk group:vxdg deport <dg name>vxdg -h <hostame> deport <dgname> to export to another host

Import a disk group:vxdg import <dg name>vxdg -C to clear hostid of old host (When failing over in DR

situation)vxdg -fC to clear hostid of old host and forcing diskgroup

online

Destroy a disk group:vxdg destroy <disk group>

Evacuate data from a disk:vxevac -g <dg name> <from disk> <to disks>

Create a volume on a diskgroup:vxassist -g <dg name> make <volname> <size> layou=stripencols=number of colums stripeunit=size

Create a veritas filesystem on this volume: mkfs -F vxfs /dev/vx/rdsk/<disk group>/<volume> <size>

Delete a volumesame as creatiuon but replace make with remove

Resize a filesystem: vxresize -g <disk group> -F <fstype> <volume> <size>

If Veritas is ever causing you problems, do the following:Touch /etc/vx/reconfig.d/state.d/install-dbedit /etc/system and modify /etc/vfstab to disable VRTS to start up and access the old rootpartitions

Other Examples:

vxassist make martin 100mmakes a volume called martin using any disk

vxassist make martin 100m disk10makes a volume called martin using disk10

vxassist make martin 100m layout=stripe disk07 disk08creates a 100mb striped volume called martin using disks7 and 8

vxassist mirror martin disk05 disk06uses disks5 and 6 ro make a mirror on volume called martin

Page 9: veritas

vxassist make martin 50m layout=mirrormakes a 50Mb mirror using any 2 disks

vxassist make martin 50m layout=mirror disk05 disk06makes a 50mb mirror using disks 5 and 6

vxassist make martin 50m layout=mirror,stripe disk05 disk06 disk07 disk08makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8

vxassist make martin 50m layout=mirror,stripe,log disk05 disk06 disk07 disk08makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8 and uses a log subdisk

vxassist make martin 100m layout=raid5makes a 100m raid5 volume

/usr/sbin/vxedit -g rootdg rename disk12 disk09 to rename disk12 to disk09 in the rootdg

vxedit rm disk10 to remove a greyed out or obsolete disk in this case disk10or to remove a disk from a diskgroup

vxdisk list - to list all disks under vmcontrol

vxdisk clearimport c#t#d#s#to allow a disk to be imported after a server crash

vxdg -g razadg rmdisk testto remove a disk called test from a dg called razadg

vxdg -g razadg adddisk test=c1t3d3 to add disk c1t3d3 to a dg called razadg calling the disk test, use vxdisk listto determine what disks are free :)

vxedit -g rootdg set spare=on disk09sets disk09 in the rootdg as a hotspare.

vxmirror rootdisk disk01mirrors all the volumes on the root disk to disk01

vxassist -g rootdg mirror vol01 disk03mirrors vol01 (in rootdg) to disk03

vxassist mirror martin

will mirror the volume martin

to make a mirror manually try

Page 10: veritas

/usr/sbin/vxmake -g rootdg sd disk03-01 dm_name=disk03 dm_offset=0 len=81920 to create a subdisk on disk03 callin the subdisk disk03-01 the len 81920 is 81920sectors x 512bytes =40M

vxmake plex martin-02 sd=disk03-01 creates a plex called martin-02 using subdisk disk03-01

vxplex att martin martin-02 attaches the plex martin-02 to volume martin

to list all volumes on your primary boot disk enter vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"'

vxsd mv disk03-01 disk05-01 moves the contents of subdisk disk03-01 to disk05-01 then moves subdisk disk05-01 into the plex where subdisk disk03-01 once lived, leaving disk03-01 to your mercy :)

to make a subdisk

vxmake sd disk02-02 disk02,0,8000 this would create a subdisk called disk02-02 at the start of disk02 and would be 8000blocks (4000k) long. if you wanted to create another subdisk on this disk the offset would be 8000 as this is where the next free space would be onthe disk so... vxmake sd disk02-02 disk02,8000,8000 would create another 8000block subdisk.

vxdisk rm c#t#d#s2 to remove a disk so it's out of vm control

vxdiskadd c#t#d# to add bring a new disk under vm control

or you can try... vxdisksetup -i c#t#d#

vxvol -g dg volname stop this stops a volume

vxedit -rf rm martin removes a volume called martin and plex(es) and subdisks though

vxprint -ht volume to display info a stripe looks like this.. V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE

Page 11: veritas

v martin fsgen ENABLED ACTIVE 204800 SELECT martin-01 pl martin-01 martin ENABLED ACTIVE 205776 STRIPE 4/128 RW sd disk04-01 martin-01 disk04 0 51408 0/0 c1t1d2 ENA sd disk05-01 martin-01 disk05 0 51408 1/0 c1t2d0 ENA sd disk02-01 martin-01 disk02 0 51408 2/0 c1t3d0 ENA sd disk03-01 martin-01 disk03 0 51408 3/0 c1t4d0 ENA

a mirror like this...

vxprint -ht martin Disk group: rootdg

V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE

v martin fsgen ENABLED ACTIVE 204800 SELECT martin-01 pl martin-01 martin ENABLED ACTIVE 205776 STRIPE 4/128 RW sd disk04-01 martin-01 disk04 0 51408 0/0 c1t1d2 ENA sd disk05-01 martin-01 disk05 0 51408 1/0 c1t2d0 ENA sd disk02-01 martin-01 disk02 0 51408 2/0 c1t3d0 ENA sd disk03-01 martin-01 disk03 0 51408 3/0 c1t4d0 ENA pl martin-02 martin ENABLED TEMPRMSD 205632 CONCAT - WO sd disk10-01 martin-02 disk10 0 205632 0 c1t1d3 ENA

a raid5 like this...

unix# vxprint -ht martin Disk group: rootdg

V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE

v martin raid5 ENABLED ACTIVE 40992 RAID - pl martin-01 martin ENABLED ACTIVE 42336 RAID 4/32

Page 12: veritas

RW sd disk04-01 martin-01 disk04 0 14112 0/0 c1t1d2 ENA sd disk06-01 martin-01 disk06 0 14112 1/0 c1t1d4s2 ENA sd disk05-01 martin-01 disk05 0 14112 2/0 c1t2d0 ENA sd disk02-01 martin-01 disk02 0 14112 3/0 c1t3d0 ENA pl martin-02 martin ENABLED LOG 2016 CONCAT - RW sd disk03-01 martin-02 disk03 0 2016 0 c1t4d0 ENA

vxplex -o rm dis plex deletes a plex, or volume if used with -f

vxplex det plex-0# detach's one half of the plex..

if a volume is unstartable try

try to start it by setting one of the plexes in a mirror to CLEAN using vxmend mirror plex_name

if this doesn't get the plex back into a kernel state of enabled try

vxplex att vol_name plex_name

to dissociate a subdisk try vxsd dis disk##-##

remove a subdisk by vxedit rm disk##-##

this command show's you what the lagest stripe you can currently have ? vxassist maxsize layout=stripe Maximum volume size: 17833984 (8708Mb)

same again for raid5 vxassist maxsize layout=raid5 Maximum volume size: 12300288 (6006Mb)

this shows how you how much you can grow a volume by.. vxassist maxgrow vol01 Volume vol01 can be extended by 18245632 to 18450432 (9009Mb)

vxassist growto martin 2000 grows a volume to 2000 512byte sectors

vxassist growby martin 2000 increases the volume martin by 2000 512byte sectors

Page 13: veritas

vxassist shrinkto vol_name 1000 will shrink a volume by 1000 sectors, make sure you don't shrink a volume below the current size of the filesystem

vxassist shrinkby vol_name 1000 shrinks a volume by 1000 sectors

vxvol set len=100000 vol_name will change the length to 100000 sectors it cannot increase the volume unless spce is available in the plexes (use vxassist)

vxsd -s SIZE split orignal_sd newdisk newdisk this will split an existing subdisk in 2 of the specified SIZE

vxsd join sd1 sd2 new_sd joins subdisk1 and subdisk1 to create a new subdisk

ssaadm -t 1|2|3 stop|start controller # so start/stop disk trays...

vxrecover -s vol_name will start a volume

vxrecover -s will start all volumes

vxvol maint vol_name puts a volume in to maintenance mode

vxmend off plex_name to offline a plex

vxplex att vol_name plex_name attches and starts the plex in a volume

vxmend on plex_name to start plex in volume

if the volume won't start up try vxinfo volume_name

vxedit set user=martin group=techies mode=0666 volume sets the owner as martin the group as techies and the mode to rw-rw-rw on a volume

vxvol rdpol round volume sets a round robin read policy on a volume

vxvol rdpol prefer vol_name plex_anme sets a prefered plex to read from.

vxedit set comment="message" disk01-01

Page 14: veritas

sets the comment field to testing

vxedit set putil01="go away" vol01 sets the putil01 to "go away"

vxrecover -b vol well bring stale plexes back online, -b indcates background job

vxassist move volume !disk10 move the voume to a disk other than disk10

vxmend fix clean plex_name sets the plax toa clean state so you can start vol and access data

vxdg list lists all diskgroups

vxdisk list lists all disks under VM control and which group their in

vxdisk list disk01 lists the properties of disk01

vxprint -vt vxprint -l volume_name vxprint -vl

display's info about the volumes

vxprint -lp vxprint -l plex_name displays info about plexes

vxprint -st vxprint -l disk##-## displays info about subdisks

ssaadm display -p c# show disk iops over 10 seconds...

vxtrace vol traces all i/o on a volume..

vxstat -d to report disk stats

vxdg free displays the free space on the disks

vxassist maxgrow vol tells you how much you can grow a volume by

vxsd aslog vol01-01 disk02-01 adds a log disk (disk02-01) to the volume vol01-01

vxassist addlog volume_name creates a log disk for a raid5 volume.

Page 15: veritas

there are some variables you can set for debugging

S_DEBUG - prints info when running mode sense command P_DEDUG - prints info for each ext library function called I_DEBUG prints progress during get status function O_DEBUG prints when files are opened

Veritas Volume Manager Command Line Examples

Tags: Veritas VM

Volume Manager CLI examples:---------------------------

display disk listings:

# vxdisk list

display volume manager object listings

# vxprint -ht

display free space in a disk group

# vxdg -g <diskgroup> free

list all volume manager tasks currently running on the system

# vxtask list

add a disk to Volume Manager (devicename = cXtXdX) (prompt driven) # vxdiskadd <devicename>

Page 16: veritas

designate/remove a disk as a hot-relocation spare

# vxedit set spare=on <diskname>

# vxedit set spare=off <diskname>

rename a disk

# vxedit rename <old_diskname> <new_diskname>

reserve/unreserve a disk (space won't be allocated unless specifically mentioned in vxassist)

# vxedit set reserve=on <diskname>

# vxedit set reserve=off <diskname>

take a disk offline (first remove the disk from its disk group) (devicename=cXtXdXs2)

#vxdisk offline <devicename>

remove a disk

(first, stop any applications associated with the volume, unmount the volume, stop the volume, if you need the data on the disk, move the volumes to another disk or back up volume)

--removing the disk from its disk group:

# vxdg -g <diskgroup> rmdisk <diskname>

--remove the disk from volume manager control (devicename=cXtXdXs2)

# vxdisk rm <devicename>

display multipath information

# vxdisk list <diskname>

Page 17: veritas

create a disk group

(see 'add a disk to volume manager - if the group does not exist, you will be prompted)

upgrade a disk group

--list disk group version # vxdg list <diskgroup>

--upgrade disk group to highest version currently running

# vxdg upgrade <diskgroup>

destroy a disk group

# vxdg destroy <diskgroup>

display disk group information

# vxdg list

# vxdg list <diskgroup>

move a disk group

(stop any applications associated with all volumes in the disk group, unmount and stop all volumes in the disk group:

--deport (disable local access) the disk group to be moved on first system

# vxdg deport <diskgroup>

--import (enable local access) the disk group and its disks from the second system

# vxdg import <diskgroup>

--start all volumes in the disk group on the second system

# vxrecover -g <diskgroup> -sb

or # vxvol -g <diskgroup> startall

Page 18: veritas

estimating maximum volume size (any_valid_type = raid5, stripe, mirror)

# vxassist -g <diskgroup> maxsize layout=<any_valid_type>

create a concatenated volume (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> <diskname> <diskname>

create a striped volume (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> layout=stripe <diskname> \ <diskname>

create a raid5 volume (without logging) (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> layout=raid5,nolog <diskname> \ <diskname> <diskname> <diskname>

create a raid5 volume (with logging) (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> layout=raid5,log <diskname> \ <diskname> <diskname> <diskname>

create a mirrored volume (without DRL) (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> layout=mirror,nolog <diskname> \ <diskname>

create a mirrored volume (with DRL) (length examples = 15g, 15m)

# vxassist -g <diskgroup> make <volumename> <length> layout=mirror,log <diskname> \ <diskname>

mirror an existing volume

Page 19: veritas

# vxassist mirror <volumename> <diskname_of_disk_to_be_mirrored>

mirror all volumes within a disk group

# vxmirror -g <diskgroup> -a

mirror the root (boot) disk

EEPROM variable "use-nvramrc?" must be set to true # vxrootmir -v <medianame>

remove a mirror (use 'vxprint -g <diskgroup> -ht' to get plexname)

# vxplex -o rm dis <plexname>

add a log to an existing volume

# vxassist addlog <volumename> <diskname>

remove a log from an existing volume

# vxassist remove log <volumename>

create a raid 0+1 volume (without DRL)

# vxassist -g <diskgroup> make <volumename> <length> layout=mirror-stripe,nolog \ nmirror=# nstripe=# <diskname> <diskname> <diskname>

create a raid 1+0 volume (without DRL)

# vxassist -g <diskgroup> make <volumename> <length> layout=stripe-mirror,nolog \ nmirror=# nstripe=# <diskname> <diskname> <diskname>

resize a volume

# vxassist -g <diskgroup> growto <volumename> <length>

Page 20: veritas

# vxassist -g <diskgroup> growby <volumename> <length>

# vxassist -g <diskgroup> shrinkto <volumename> <length>

# vxassist -g <diskgroup> shrinkby <volumename> <length>

estimate how much a volume can grow

# vxassist -g <diskgroup> maxgrow <volumename>

remove a volume

(stop all applications associated with the volume, unmount volume (remove /etc/vfstab entry))

--stop volume

# vxvol stop <volumename>

-- remove volume (for raid 1+0, use 'rf-rm')

# vxedit -r rm <volumename>

or # vxassist remove volume <volumename>

change the volume read policy

# vxvol rdpol <policy> <volumename>

# vxvol rdpol prefer <volumename> <preferred_plex_name>

change volume attributes

# vxedit set <field>=<value> <volumename>

resize a filesystem (ufs cannot be shrunk, only grown)

# vxresize -g <diskgroup> <volumename> + <size> # vxresize -g <diskgroup> <volumename> - <size>

join subdisks (must be in the order of offset on disks)

# vxsd join <subdisk> <subdisk> <subdisk>

Page 21: veritas

» Add new comment 101809 reads

create a striped volume (length examples = 15g, 15m)Submitted by Anonymous (not verified) on Wed, 07/16/2008 - 04:41.

The syntax is incorrect for:create a striped volume (length examples = 15g, 15m)

# vxassist -g make layout=stripe \

It should be something like this:

# vxassist -g testdg make testdgvol1 285503488 layout=stripe alloc=disk1,disk2,disk3,disk4

This brings the credibility of the rest of this document into question; You have not specified which version of Veritas this applied to ;P

» reply

Correct for older versionsSubmitted by admin on Wed, 07/16/2008 - 22:02.

It's been a while since I've used VXVM, but I can assure you these examples are correct. I cut and pasted them as I ran them. I believe the last version I used was 4.0, and I believe these examples were run on 3.x. Although, I can't claim that these commands are correct for newer versions.

The same syntax is used in these examples as well:

http://www.adminschoice.com/docs/vxassist.htmhttp://www.cuddletech.com/veritas/layeredvols/x74.html

What version does your example apply to? I'm all for keeping this info relevant and updated, so feel free to post more details about the newer versions.

Thanks.

» reply

Page 22: veritas

vxassist mirror <volumename> ...Submitted by Afsin Toparlak (not verified) on Mon, 09/15/2008 - 17:27.

do you have more examples about this?

I want to add new disks into a group and mirror volumes from old to new disks. I want to be able later to remove old disks and stop mirroring.

so I want to realisize a better move from one SAN to a new one.

Is it so possible?

What do think about volume movement? Is it secure?

thnx

» reply

LifesaverSubmitted by Dave (not verified) on Thu, 11/06/2008 - 16:01.

Just want to you know that I refer to this page all the time and it's the only way I can ever remember how to do all this stuff. Thanks!

» reply

movement to fs from on san to anotherSubmitted by Anonymous (not verified) on Mon, 02/14/2011 - 03:01.

initialize the new san diskvxdisksetup -i cxtxdxadd into the dgvxdg -g dgname disk_name=cxtxdxs2Mirror the volumevxassist -g dgname mirror vol_name_to be_mirrored new_san_disk/disks &once both of the plex are active, remove the old plex by following commandvxplex -g dgname -o rm dis old_plexnamehence your filesystem is moved to new SAN

» reply

Display Volume Manager VersionSubmitted by WF (not verified) on Mon, 09/27/2010 - 05:04.

Page 23: veritas

I thought would be useful to know how to do this on Solaris:display Volume Manager version:# pkginfo -l VRTSvxvm | grep VERSION | awk '{print $2}' | awk -F, '{print $1}'