Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Disks and Volumes, Featured

Adding LUNs to VXVM on Linux

Submitted by on September 6, 2011 – 2:03 pm 5 Comments

The following is a brief overview of the process for adding LUNs to VXVM under Linux. In our example we have an RHEL 5 server with existing LUNs and VXVM volume groups. Two new LUNs with multipathing were allocated from SAN and need to be added to the system to grow one of the volumes and the corresponding filesystem. The first step is to make sure your system can see the new LUNs. A reboot is usually required for the OS to detect the new LUNs.

1. Run “vxdisk list” to see the list of disks detected by VXVM

In our case, disks san77721_4 and san77721_5 are the new LUNs. They do not yet belong to any disk groups.

2. Now you need to identify how Linux sees these two LUNs. First, use fdisk to get a list of all available disks:

Now you need to figure out which /dev/sd* device corresponds to which LUNs. It is important to keep in mind that, since we are dealing with multipathing, each LUN will be represented by two or more /dev/sd* devices. So the next step is to determine how many paths are used by each LUN:

After reviewing this list, you will notice that san77721_4 corresponds to sde and sdk, while san77721_5 corresponds to sdf and sdl. This means that each LUN uses two paths. You can confirm this by running the vxdisk command for the specific disk device:

3. Now we have determined that disks sde, sdk, sdf, and sdl are our two new LUNs. What we need to do now is to label and partition them. Labeling is done using “parted” command:

Now we will use fdisk to partition the new disk devices:

Repeat the last fdisk step for the remaining new disks.

4. After labeling and partitioning the new disk devices, we are ready to set up them in VXVM. To accomplish this, we will need to use the vxdisksetup command:

5. The next step is to add these two disks to the desired disk group (sys-data-fs, in our example) using vxdiskadd command:

We will repeat this process for the other LUN (san77721_5).

6. The two new LUNs are now a part of the disk group and can be used to grow the VXVM volume. To identify the volume corresponding to the disk group (sys-data-fs, in our example), use the vxprint command:

In our case, the volume we are interested in is fs-vol. We can use the vxassist command to help us figure out just how big we can make this volume using all available disks in the associated disk group:

So we can grow the volume up to 32Tb and that’s what we are going to do using the vxresize command:

The volume resizing process may take a few minutes, depending on the size of the volume and the speed of storage and network. After giving the system a couple minutes to complete the operation, we can check on the size of the filesystem:

The fs-vol and the associated filesystem are now 32Tb. We hope this brief tutorial was helpful to you. Always remember to backup your data before making any changes to your storage. Operate under the assumption that if anything can go wrong, it will go wrong.

Print Friendly, PDF & Email


Leave a Reply

%d bloggers like this: