Expand LVM Disk with Ontap Backed LUNs

Latest response

We are running RHEL 7 on HP ProLiant hardware with LVM. Currently, we are testing the use of LVM with disk groups (for performance) but a question arose about using a single LUN with an LVM disk group namely:

  • With a single LUN in a single logical volume in a single LVM disk group can we extend the LUN online and then run commands in RHEL to extend the partition, logical volume and then filesystem?

We have been told by our storage team the only way to do this is add another LUN in ONTAP9, present back to the RHEL server and add it to the LVM disk group then extend the filesystem. This seems odd to me as on our RHEL VMs we using LVM and can do this on the fly using by expanding the .vmdk then fdisk, lvextend and XFS_Grow. Is vmware tools doing some magic here that a physical server cannot do ?

Note: we know one disk in a LVM group does not really give any specific benefit but we have a specific scenario that might require this.

Responses

Darragh O'Shaughnessy,

From what I see above, you mention in the third or so paragraph the existence of a .vmdk file which is generally associated with virtual systems. I see you also mention Ontap which seems to be a Netapp storage device.

We're not clear if the system you wish to extend an LVM on is a physical or virtual system, but it seem possible from your description it is virtual since you mentioned a ".vmdk" file.

In VMware, if you are able to enlarge the size of the vmdk file, (again, in VMware, but you did not mention VMware), you can extend the LVM and to commands on a Red Hat system to extend the filesystem. disclaimer Open a case first with Red Hat before trying this solution to ensure it is a good fit for your scenario FIRST!.

I'm not sure what virtualization method you are using - and if you are using virtualization, you need to verify with that virtualization vendor (and your storage appliance) their support of extending a vmdk (if I am reading your description correctly).

IMPORTANT NOTE: If there is no possibility to add additional space to the existing vmdk file (and your storage team is closer to this matter than I am, work with them please before proceeding), then you would have to consider adding a different device. This is generally not optimal to have an LVM across two devices. I generally always recommend spreading one partition across two devices (namely one you add after-the-fact). That generally is not optimal. The real matter here is working out this storage issue with your current netapp device

In principle, the method to add storage in LVM is: - D (device) - If your device is already full, adding another one could be not a best practice - P (physical) - V (volume group) - L (logical volume) - F (filesystem)

So if you have an existing volume group, this documentation has some info.

This sounds like a server you genuinely care about. I'd seriously recommend you open a ticket with Red Hat before proceeding with the specifics to include the output of these commands in a case with Red Hat: lsblk blkid df -PhT an sosreport as well.

Make sure to work with your storage team when you fill out the case with Red Hat so they are involved for clarity.

Regards,
RJ