Re: Expanding an LVM

urgrue <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
Dermot Paikkos wrote:
> Hi,
> 
> I think I may have made a error in the method I have used to create 
> more space on one of my servers.
> 
> Here's what I've done.
> 
> 1) Backed up the LVM volume (phew)
> 2) Added some disks to the storage array (HP MSA 20)
> 3) Used the HW Array configurator to do and on-line extend of the  
> Raid Array.
> 
> It was at this point I realised that I hadn't un-mounted the volume 
> in question. 
> 
> The other thing I am trying to figure out is, how I am going to 
> extend a Physical Volume? I think the procedure should have been to 
> add a completely new array and use pvcreate, vgextend, lvextend and  
> extended the filesystem (ext3).
> 
> Can anyone confirm if the procedure above is the correct? 

Correct. You dont expand the PV, you make a new partition with fdisk in
the new space and then create a pv on it, add it to the vg with
vgextend, and the lvextend and then ext2online/resize2fs/whatever to
expand the fs.

> Right now I am considering deleting the RAID container completely and 
> re-creating and restoring rather than waste any more time but before 
> I do I'd like to hear it if sounds like the procedure is bound to 
> fail. 
> 
> At the moment I think the best I can hope for is that the volume will 
> be fine but the extra disk-space will never be seen?
> 

if you dont see the new space in fdisk, you might have to reboot, or do
echo "- - -" > /sys/class/scsi_host/hostXXX/scan.
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.