Charu[[Datta] Deodas]

Veritas File System (vxfs) Commands

Veritas Volume Manager Commands

Veritas vmsa hung issues

Veritas License Keys

Disk Group Procedures

Disk Information

c#t#d#s# c->loop number
t->disk node id (0-125)
d->disk is 0
s->disk slice

Dynamic Multipathing

Veritas Volume Manager 2.5 would allow dynamic multipathing (DMP), it will allow dual loop a & loop b to access disk with load balancing.

Photons:

ok> probe fcal all to probe fcal devices at the OK prompt.
vxdisk list
vxdctl enable (this would search for all the devices)
vxreaatach Sometime volume manager would not attach the disks / subdisks. Everything else looks ok. The disks/plexes looks grayed out. Use this volumemanager script to attach the disks. vxprint -ht would show these as nodevise/ndev.
luxadm insert device (when a new photon is connected)
luxadm display
luxadm probe <wwn>

/a/usr/sbin/luxadm display CIT1 - CIT1 is the name of the A5000
/a/usr/sbin/luxadm display CIT1,f0 - f0 (front 0)is the disk

Sync the firmware rev of the drives in A5K

How to recover Volume Manager data from a Solaris 2.6 upgrade

  • /etc/vx/reconfig.d/state.d
  • Boot the box from CDROM in single user mode, boot cdrom -sw
  • Get the original partition table from
  • /etc/vx/reconfig.d/disk.d/c0t0d0/vtoc # The original (prevm) disk partition
  • cp /etc/vx/reconfig.d/disk.d/c0t0d0/vtoc /tmp/vtoc.prevm
  • vi /tmp/vtoc.prevm
  • remove the first two lines, which are comment lines
  • remove 0x from the second and the third column
  • Make sure this is correct. It can really mess up the root disk.
  • fmthard -s /tmp/vtoc.prevm /dev/rdsk/c0t0d0s0
  • The command o/p is as follows
  • fmthard: New volume table of contents now in place.
  • fsck all the partitions
  • reboot

Missing Disk in Volume Manager - No DMP devices created:

There is a bug in veritas due to which it does not create the dmp devices, /dev/vx/rdmp. You should be able to see the array and the disks using luxadm display /.
Also make sure that all the pactches are installed and FC1000 pacakge is also installed for PCI bus based machine.
Then, use the following steps to create the dmp devices manually
  • remove /etc/vx/reconfig.d/state.d/install-db
  • vxconfig -d / vxconfigd -m disable
  • vxdctl initdmp
  • /dev/vx/rdmp

Add a new disk in Photon

Follow the following procedure to add a new disk in photon.
  • luxadm probe and get the name (or WWN) of the enclosue
  • luxadm display / to display the current disks, save the copy of display for future referance
  • format to display the current disks, save the copy of display for future referance
  • add disks in the array
  • drvconfg
  • devlinks
  • disks
  • format to display the current disks, the new disks should be visible
  • luxadm insert_device it will display the following
    #luxadm insert_device
    Please hit when you have finished adding Fibre Channel Enclosure(s)/Device(s):
    Waiting for Loop Initialization to complete...
    New Logical Nodes under /dev/dsk and /dev/rdsk :
    #
  • vxdctl enable (finds the disk for Volume Manager)
  • use vxdiskadm to add / initialize the new disks

Create a new disk group

You may use any of the following procedure to create a disk group
  • Before performing the following step make sure that the disk which you are going to add are not being used as normal disks with ufs
  • Use vxdiskadm to add/initialize disks, i.e. get them in volume manager controll
  • The above step may not be necessary if disks are already initialized but not in any of the disk groups
  • You will be given a choice off adding the disk in any existing disk group or a new group will be created if you specify any non existing disk group
  • You can use the following command to create a new disk group. Note that you will need at least one available disk to create a new disk group

    vxdg init diskgroup diskname=devicename

    For example

    vxdg init oracledg oracle-d01=c1t0d0

    Additional information can be found in the next section.

Disk Group Comman Tasks

  • Remove a disk from the disk group

    vxdg [ -g groupname ] rmdisk diskname

    the diskgroup needs to be specified if it is not rootdg

  • Move a disk from one disk group to another

    This is a two stage process, remove the disk from one diskgroup and and into the other disk group

    vxdg [ -g oldgroupname ] rmdisk diskname

    the diskgroup needs to be specified if it is not rootdg

  • vxdg [ -g newgroupname ] adddisk diskname=devicename

    For example,

    vxdg -g fsdg rmdisk oracle-d03 (veritas disk name of c0t3d0)

    vxdg -g oracledg adddisk oracle-d01=c0t3d0

    You can also achieve the same task by using vxdiskadm's main menu by selecting item 3 (remove disk) and then add/initialize disk

    Note: All data on the disk would get distroyed

Veritas Volume Manger Commands

vxprint -hget information about volumes
vxprint -g sybdgget information about diskgroup sybdg
vxassist -g sybdg make t1 1200m layout=nolog disk04 make volume in the disk group sybdg called syb_vol of size 1200m with layout as nolog, the disk to be used is disk04
vxassist -g sybdg make log_dev 1200m layout=nolog user=sybase group=dba same as above but with user as sybase and group dba
sudo /usr/sbin/vxassist growto sybs11-webs_dat1 300m resize, grow the volume sybs11-webs_dat1 to a size 300m
sudo /usr/sbin/vxassist -g sybasedg mirror dbccdb_log1 layout=nostripe sybd03 create a mirror for the volume dbccdb_log1 on disk sybd03
sudo /usr/sbin/vxassist growby sybs11-webs_dat1 300m resize, grow the volume sybs11-webs_dat1 by 300m
/usr/sbin/vxedit -g sybasedg -fr rm act4_dat2 remove the volume act4_dat2 from sybdg
/usr/sbin/vxedit -g sybasedg -v rename act4_dat2.old act4_dat2.new rename the sybdg volume act4_dat2 to act4_dat2.old
/usr/sbin/vxedit -g sybasedg -v set user=sybase group=dba vol01 Change ownership of the volume to sybase and group to dba

Create a file system

  • /usr/sbin/vxassist -g tmwdg -U fsgen -p maxsize layout=nolog tmwdg05
  • /usr/sbin/vxassist -g tmwdg -U fsgen make u10 35362816 layout=nolog tmwdg05
  • VxFS: /usr/sbin/mkfs -F vxfs /dev/vx/rdsk/tmwdg/u07 35362816
  • UFS: /usr/sbin/mkfs -F ufs /dev/vx/rdsk/tmwdg/u07 35362816
  • Note: Last parameter is blocks, i.e. 100m would become 204800
  • mkdir /u07
  • edit /etc/vfstab
  • mount /u07
  • chown oracle:dba /u07

Increase a file system size

    VxFs
  • vxassist -g ipprd1_sybdump growby sybtran-p09-spa 256m
  • /usr/lib/fs/vxfs/fsadm -b 933888 -r /dev/vx/rdsk/ipprd1_sybdump/sybtran-p09-spa /sybtran/ipprd1_srv_p09/spa
  • UFS
  • vxassist -g diskgroup growby volume-name 200m
  • or
  • vxassist -g diskgroup growto volume-name 200m
  • /usr/lib/fs/ufs/mkfs -F ufs -M /mount-point /dev/vx/rdsk/diskdg/fs-vol size-in-blocks
  • /usr/lib/fs/ufs/mkfs -F ufs -M /export /dev/vx/rdsk/ddg/vol 12345

Rename a disk group

  • vxdg -n oracle-bb2 deport oracledg
  • vxdg import oracle-bb2
  • start all volumes
  • mount -a

Add a new oracle service group

  • cd /etc/VRTSvcs/conf/config
  • ls -l main.cf
  • sintora201$ sudo haconf -dump -makero
  • Password:
  • ls -l main.cf # check time-stamp
  • VCS:10369:haconf: Cluster not writable.
  • sintora201$ pwd
  • /etc/VRTSvcs/conf/config
  • sintora201$ ls -l main.cf
  • -rw-r--r-- 2 root other 15854 Oct 31 12:42 main.cf
  • sintora201$ sudo cp main.cf main.charu
  • vi main.charu
  • copy the info at the end
  • Change ip address
  • .,$s/creg01/ecaseg01/gc
  • .,$s/ucre_/uecase_/gc
  • sudo hastop -all -force
  • sudo ls -l main.charu main.cf
  • sudo cp main.charu main.cf
  • sudo hacf -cftocmd .
  • sudo hastart # on the machine where main.cf is being modified
  • sudo hastart -stale # on the other machines
Note:Info on the page may not be the latest or correct.
Back To Home
Last modified: May 31st, 2002