How to Create VxVM Volume & VxFS Filesystem in RHEL 7

Veritas has re-branded it’s “Storage Foundation and High Availability” family products and now, from version 7 all the of the Veritas products under this category comes with a brand name of “Infoscale“. In this tutorial, we are going to teach how to create a Veritas Volume Manager (VxVM) volume and then how to create a VxFS filesystem and mount it in Red Hat Enterprise Linux 7 (RHEL 7).

This will be a basic VxVM tutorial with easy to understand steps. For better understanding perform this live on your test environment for learning.

 

Pre-Requisite:

1. Red Hat Enterprise Linux 7 (RHEL 7) or CentOS 7.
2. Infoscale Foundation (VxVM + VxFS).
3. Knowledge of Linux Operating System.

 

Create Veritas Volume Manager (VxVM) Volume and VxFS Filesystem in RHEL 7

 

Creating Veritas Volume Manager (VxVM) Volume & Filesystem in RHEL 7

 

1. First of all, check the disks which are visible to Veritas Volume Manager (VxVM) and this can be done by “vxdisk” command as below.

# vxdisk -o alldgs list
[root@server ~]# vxdisk -o alldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
emc_d1 auto:none       -            -            online invalid
emc_d2 auto:none       -            -            online invalid
emc_d3 auto:none       -            -            online invalid
emc_d4 auto:none       -            -            online invalid

 

2. Once the disks are visible to the VxVM, initialize the disk which are not under VxVM control, i.e. showing “Online Invalid” status.

# vxdisksetup -i emc_d2
[root@server ~]# vxdisksetup -i emc_d2
[root@server ~]# vxdisk -o alldgs list |grep -i emc_d2
emc_d2 auto:cdsdisk    -            -            online
[root@server ~]# 

 

By default CDSDISK (Cross-Platform Data Sharing Disk) type is used and can be changed as per requirement.

Once the disk is initialized and is under control of VxVm, we can create a Disk Group (DG). Here we are using a single disk to create a DG and a Volume. No complex layouts in this tutorial like Stripe, Mirror, Mirror-Concat, etc.

 

3. To create a disk group (DG) with one disk use below command.

# vxdg init testdg testdg01=emc_d2
[root@server ~]# vxdg init testdg testdg01=emc_d2
[root@server ~]#
[root@server ~]# vxdg list
NAME         STATE           ID
testdg       enabled,cds          1482590455.40.server
[root@server ~]#

 

testdg01 is a logical name called DM name (Disk media name). If the DM name is not given while creating the disk group, then by default disk name will be used.

 

4. Once DG is created with one disk, create a volume as below.

# vxassist -g testdg make testvol 100m

 

The above command will create a volume with the name “testvol” having size 100 MB.

 

Mounting VxFS Filesystem in Red Hat Enterprise 7 (RHEL 7)

 

5. Now, once the volume is created, format it as a VxFS filesystem using the below command.

# mkfs -t vxfs /dev/vx/rdsk/testdg/testvol
[root@server ~]# mkfs -t vxfs /dev/vx/rdsk/testdg/testvol
    version 11 layout
    204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
    rcq size 1024 blocks
    largefiles supported
    maxlink supported

 

Note: /dev/vx/rdsk/testdg/testvol is a character or RAW device and for mounting we don’t use it. For mounting purpose block device is used.

 

6. Now create a directory to mount the filesystem.

# mkdir /data

# mount -t vxfs /dev/vx/dsk/testdg/testvol /data

# df -h /data [To verify]
[root@server ~]# mkdir /data
[root@server ~]# mount -t vxfs /dev/vx/dsk/testdg/testvol /data

[root@server ~]# df -hP /data
Filesystem                  Size  Used Avail Use% Mounted on
/dev/vx/dsk/testdg/testvol  100M  3.2M   91M   4% /data
[root@server ~]#

 

Now your VxFS filesystem is mounted and you can start using it. If you want to mount it permanently put an entry in “/etc/fstab” file like any other filesystem.

 

Tip: Use Veritas™ Services and Operations Readiness Tools (SORT) to check version compatibility. It is a web-based tools that optimizes the end to end experience for Veritas products.

 


This tutorial is just a basic and first in our Veritas Volume Manager (VxVM) tutorial series, we will also cover other simple and advance tutorials, so do subscribe to our blog and get alerts for FREE whenever a new article is published.

If you like this article, do not forget to share it with your friends and social network. Also, do let us know if you have any doubts through your comments.

Buy me a coffeeBuy me a coffee

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.