Re: is it possible to resive a PV in LVM and add more LV's ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





On Mon, May 11, 2009 at 7:55 PM, Flaherty, Patrick <pflaherty@xxxxxxx> wrote:
Rudi is right, the easiest/fastest thing to do is to just add the new
partition to the pv and expand your lvs as you see fit. But if someone
ever wants to resize a pv I have done it on some vm hosts. It a touch
scary but straight forward (make backups!). It really can only be done
on drives where the lvm is the last partition, or partitions after the
lvm partition is perishable data (swap).

The steps (from memory lacking arguments)
* fdisk -l /dev/sda (whatever the physical drive is) and write down all
the partition information (make sure you get block alignment if you've
changed that).
* remove the exisiting lvm partiton and whatever partitions are after
it.
* recreate the lvm partition with whatever extra size you want and set
it's type. The os won't recognize the extra space.
* reboot, the os recognises the space
* run pvresize
* run pvscan
* use vgdisplay to find out how many extents available. if you want to
extend a logical volume to the entire pvolume size.
* use resize2fs to extend the filesystem on the volume online.
* use tune2fs to reduce the number of blocks reserved for root to 1%



thanx guys :) I ended up sending the server back to the IDC to have it repartitioned by the techs, since they have direct access to the server and the installation DVD's. 

--
Kind Regards
Rudi Ahlers
CEO, SoftDux Hosting
Web: http://www.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux