Home / Tutorials / VXVM – DISK Operations tutorial

VXVM – DISK Operations tutorial

          VXVM(veritas volume manager training) 2 of 10

In this post, we will see how to scan the disks and bringing the disks in to veritas volume manager control and various disks  operations. Instead of digging in to theory we will concentrate more on piratical. Here we will see about how to scan new disk in vxvm,disk naming convention and how to bring it in veritas control.Adding disk in to diskgroup ,we will see in diskgroup operation. 


Once the VXVM installation is completed ,you good to start work on the below things. 


VxVM presents the disks in a disk array as volumes to the operating system

in below manner.

1.Veritas Naming Scheme
Before bringing the disk in to veritas control you should know about the disk naming convention in veritas.In VXVM there are two type of disk naming schemes available.
1. Operating system-based naming scheme
2. Enclosure based naming scheme.

To avoid confusion with OS based names(i.e format),please check it,which is set in your system. 
bash-3.00# vxddladm get namingscheme
NAMING_SCHEME PERSISTENCE LOWERCASE USE_AVID
======================================================
Enclosure Based Yes Yes Yes
bash-3.00# vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:none - - online invalid
disk_1 auto:none - - online invalid
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS

As per the above output,the system was set to use enclosure based naming scheme. Anytime you can change the naming scheme on the fly.There will be no impact by doing this. 

To change the Operating system based naming scheme,

bash-3.00# vxddladm set namingscheme=osn
bash-3.00# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:ZFS - - ZFS
c1t3d0 auto:none - - online invalid
c1t4d0 auto:ZFS - - ZFS
c1t5d0 auto:none - - online invalid

You can set it back to enclosure based using below command.

bash-3.00# vxddladm set namingscheme=ebn

You can match the OS native names(i.e format) with VXVM enclose based names using the below command.

bash-3.00# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
disk_0 auto:none - - online invalid c1t3d0 -
disk_1 auto:none - - online invalid c1t5d0 -
disk_2 auto:ZFS - - ZFS c1t4d0 -
disk_3 auto:ZFS - - ZFS c1t0d0s2 -

2.Discover New Disks in veritas:
To Scan a new disk in OS level,

bash-3.00# cfgadm -al
bash-3.00# /usr/sbin/devfsadm -Cvc disk

After scanning the disk in OS,Scan the disks in veritas level by using the below command.

bash-3.00# vxdisk scandisks

Note:In older version we may used “vxdctl enable” or “vxconfigd -k” to scan new disks by restarting it vxvm daemon.Symantec recommending to use the above command to scan new disks.


Trigger DDL(Device Discovery Layer) to again assign names to 
DMP devices
bash-3.00# vxddladm assign names

Now you can see new disks

bash-3.00# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
disk_0 auto:cdsdisk - - online c1t3d0 -
disk_1 auto:cdsdisk - - online c1t5d0 -
disk_2 auto:ZFS - - ZFS c1t4d0 -
disk_3 auto:ZFS - - ZFS c1t0d0s2 -
disk_4 auto:cdsdisk - - online c1t6d0 -
disk_5 auto:cdsdisk - - online c1t2d0 -
disk_6 auto:cdsdisk - - online c1t1d0 -

3.Bringing the disk in  to veritas control

vxdisksetup command  brings the disks in to veritas volume manager control.By default this will format the disk in CDS(Cross Data platform Sharing ) .Other formats are sliced and simple. sliced will be used for boot disks.
bash-3.00# /etc/vx/bin/vxdisksetup -i disk_0
bash-3.00# /etc/vx/bin/vxdisksetup -i disk_1
bash-3.00# /etc/vx/bin/vxdisksetup -i disk_4
bash-3.00# /etc/vx/bin/vxdisksetup -i disk_5
bash-3.00# /etc/vx/bin/vxdisksetup -i disk_6

If you want to setup the disk in specific format,you can use the below syntax.

#vxdisksetup -i disk_XX format=cds or simple or sliced

By Checking the disk status,you will come to know how its formated and disk
status.

bash-3.00# vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk - - online
disk_1 auto:cdsdisk - - online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk - - online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online


You can find the Veritas volume manager disk replacement here.

Thank you for reading this.You have any doubt,please leave comment,I will get back to you as soon as possible.

VMTURBO-CLOUD-CAPACITY

5 comments

  1. Hi,

    i m following your training material with practicals. You have explained in the above session regarding the naming scheme (OS based and Enclosure based), i have installed the VxVM on Solaris 10 using VirtualBox and verified with both schemes, but i didnt see any difference while working on both schemes. can you please check the below one and explain why both are getting same output.

    Setting OS based naming Scheme:
    bash-3.00# vxddladm set namingscheme=osn
    bash-3.00# vxddladm get namingscheme
    NAMING_SCHEME PERSISTENCE LOWERCASE USE_AVID
    ============================================================
    OS Native No Yes Yes
    bash-3.00# vxdisk list
    DEVICE TYPE DISK GROUP STATUS
    c0d0s2 auto:none – – online invalid
    c0d1s2 auto:none – – online invalid

    Setting Enclosure based naming Scheme:
    bash-3.00# vxddladm set namingscheme=ebn
    bash-3.00# vxddladm get namingscheme
    NAMING_SCHEME PERSISTENCE LOWERCASE USE_AVID
    ============================================================
    Enclosure Based Yes Yes Yes
    bash-3.00# vxdisk list
    DEVICE TYPE DISK GROUP STATUS
    c0d0s2 auto:none – – online invalid
    c0d1s2 auto:none – – online invalid

  2. It seems your internal disks are not showing other name.You can try to provision luns from openfiler and check it.It should show ebn names. use "vxdisk -e list" command to see both osn and ebn names.
    To openfiler setup follow the below post.It will work like virtual SAN.
    http://www.unixarena.com/2012/08/how-to-install-openfiler-on-vmware-for.html
    http://www.unixarena.com/2012/08/how-to-provision-new-lun-in-openfiler.html
    http://www.unixarena.com/2012/08/how-to-add-iscsi-targets-in-solaris.html

  3. can we have multiple volumes residing on same disk grp ?

  4. I must use to allocate a disk using stripe of four disks as I describe it using the command ?
    You described the following command

    #vxdisksetup -i disk_XX format = cds or simple or sliced

    How I would look if it were stripe ?

    • vxdisksetup is used to bring the disk in veritas control and only three formats are supported (simple, sliced & CDS).You need to define stripe while creating the volume.

      Regards
      Lingesh

Leave a Reply

Your email address will not be published. Required fields are marked *