Operating System - Linux
1752494 Members
5093 Online
108788 Solutions
New Discussion юеВ

Re: hpacucli + logical drive extension + linux

 
Ciro  Iriarte
Valued Contributor

hpacucli + logical drive extension + linux

Is it a supported operation to extend a logical drive on linux?, i succesfuly managed to expand a 3 disk raid5 on a Proliant DL380 G4 to 4 disks(same process pending on a G3).

Is it supported to extend a logical drive or should i create a second logical drive and use lvm make use of that space?
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: hpacucli + logical drive extension + linux

Shalom,

If the disk is visible to the system via fdisk -l fdisk can be used to prepare a partition.

Then pvcreate is used to get it ready.

Then vgextend a volume group onto the partition.

Then lvextend the logical volume within that volume group to the new "disk"

Answer: Yes if you follow the steps above.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rick Beldin
HPE Pro

Re: hpacucli + logical drive extension + linux

The response above about using LVM is probably 'best' and 'easiest', however there is an alternative if you are using ext3/ext2 instead of lvm.

When you extend the 'disk' as above, the underlying filesystem has no knowledge that the disk was changed. In RHEL4 there is a tool called ext2online:

The ext2online tool resizes ext2 file systems while they are mounted
and in use by the system. It is OK to resize the filesystem even
while programs have open files and are writing into the filesystem.
It is only possible to enlarge a mounted filesystem. To be able to
use ext2online, you need to have the Online ext2 resize support (CON-
FIG_EXT2_RESIZE) feature enabled in the kernel (after applying the
appropriate patch for the 2.x series of kernels).

For offline (unmounted) use there is also resize2fs:

The resize2fs program will resize ext2 file systems. It can be used
to enlarge or shrink an ext2 file system located on device. The size
parameter specifies the requested new size of the filesystem.

The ext2online program did not exist on RHEL3, and I am not sure of its existence on SLES.

It seems to work, although I have worked on one case where we were unable to resize an ext3 filesystem created on RHEL3 because some of the internal structures were already maxed out and the program refused to alter the fs.

Caveat:

BACKUP YOUR DATA BEFORE DOING THIS.
Necessary questions: Why? What? How? When?
Ivan Ferreira
Honored Contributor

Re: hpacucli + logical drive extension + linux

Mba'eteco Ciro. I think I know you.

This is a test I did, but LVM was not involved:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1129838

The same test could be done with LVM, creating a new 8e partition in the new free space, and adding that partition to the existing volume group.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: hpacucli + logical drive extension + linux

Here is a sample procedure for LUN extension with LVM I just tested. It's risky, you should have a good backup, but it's pretty cool.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ciro  Iriarte
Valued Contributor

Re: hpacucli + logical drive extension + linux

Thanks a lot for taking the time to reply.

Well, i was in a hurry, so followed a procedure i knew was going to work, although it wasn't what i was looking for.

Created a second Logical Drive on the SmartArray controller, and added that disk to my VG.

Later i found, that the tool i was looking for was pvresize, that allows to resize a PV i assume, after extending the partition that contains it. Ill keep researching
skt_skt
Honored Contributor

Re: hpacucli + logical drive extension + linux

I doubt if the pvresize work for those raid disks.
Ivan Ferreira
Honored Contributor

Re: hpacucli + logical drive extension + linux

According to the Red Hat 5 LVM guide, pvresize can be used if you increase the size of a underlying disk (for example RAID), but it seems that is not available for versions prior to 5 (maybe only for cluster LVM).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: hpacucli + logical drive extension + linux

Finally, I had the opportunity to do a real test of growing a LUN. Here are the results.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ciro  Iriarte
Valued Contributor

Re: hpacucli + logical drive extension + linux

Well, the command is available on SLES9 SP3, i'm not sure about GM, SP1 or SP2 though.