HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
ProLiant Servers (ML,DL,SL)
cancel
Showing results for 
Search instead for 
Did you mean: 

Extending logical drive and Linux

 
Ciro Iriarte
Valued Contributor

Extending logical drive and Linux

Hi, on a DL380 G4 i'm running a raid5 set with 3 disks, already added a 4th to the array. Now i need to extend the logical drive, is this supported on linux?, should i create another drive instead and use lvm?.

I need to repeate the some procedure on a DL380 G3 also, both running SLES9 SP3.
4 REPLIES
Matti_Kurkela
Honored Contributor

Re: Extending logical drive and Linux

SLES9 uses Linux 2.6 kernel series, so it has LVM version 2. LVM2 has the "pvresize" tool which can be used to expand a LVM PV, if you want or need to do it that way.

There are also tools to extend a filesystem for some filesystem types (ext2, ext3 and maybe reiser), but each of them requires that you extend the underlying partition or LVM logical volume first. Some filesystems can even be extended online, without unmounting them.

Your question is slightly ambiguous: a DL380 has a SmartArray hardware RAID controller, which hides the real, physical disks from the OS and presents them as one or more logical disks.

LVM will take any disks the OS can see and designate them as Physical Volumes (PVs). These can be then joined into volume groups (VGs) and then split again into logical volumes (LVs) as needed.

Note that a SmartArray _logical_ disk (or a partition of it) is used as a LVM _physical_ volume.

Because of this ambiguous terminology, I'm not exactly sure about what you're intending to extend.

Are you already using LVM on your original disks?

If not, the operation may still be possible but very tricky... and it requires that the partition you wish to extend is at the end of the existing SmartArray logical disk, so the new free space will be contiguous with the partition you intend to expand.

If you make the new physical disk into a new SmartArray logical disk, the new disk will be without any RAID protection. I don't remember the possibilities and limitations to extending of SmartArray logical disks, but the SmartArray documentation will certainly have that information.

So tell us more.
What does the partition table of the SmartArray logical disk you wish to extend look like?

MK
MK
Ciro Iriarte
Valued Contributor

Re: Extending logical drive and Linux

I was in a hurry, so i followed a procedure i knew was going to work (although i didn't like it). Added a second Logical Drive on the SmartArray controller after expanding the RAID. Now Linux sees two disks and just added the new one to my LVM volume group.

The cleanest way to do what i was looking for is to use the pvresize. Thanks a lot, wasn't aware that resizing a PV was possible, do you have any examples of the command?. Can a reize of a PV be done online?

Ciro Iriarte
Valued Contributor

Re: Extending logical drive and Linux

Well, i assume the partition on the disk containing the PV must be resized before using pvresize, right?
Matti_Kurkela
Honored Contributor

Re: Extending logical drive and Linux

Of course. "pvresize" is just a way to inform the LVM that the size of the underlying unit of storage is changing.

If you're expanding the storage, you must first expand the underlying storage, then pvresize; if you're shrinking the storage, you must successfully use pvresize to shrink the PV *before* you actually shrink the underlying storage.

"man pvresize" has more information and some examples.

MK
MK