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

Re: Endre størrelsen på /dev/vg_data og /dev/vg_system

On 26-11-2004 17:29, Axel Bojer wrote to the norwegian list:

> hvordan overfører man plass fra en volumgruppe til en annen?
> (e2fsadm -L -1G /dev/vg_data gir beskjeden «invalid volume name», og, ja, både 
> vg_data og vg_system er da avmontert og jeg har startet ash).

In english:
> How to transfer space from one volume group to another?
> (e2fsadm -L -1G /dev/vg_data emits «invalid volume name», and yes,
> both vg_data and vg_system is unmounted and I have started ash).

e2fsadm is for e2fs (and e3fs) partitions on top of LVM volumes.

To "resize" LVM volumes you must add or remove physical partitions to
the LVM volumes. Removing physical partitions requires the removed
amount not being in use (by e.g. an e2fs partition) on the volume. If I
remember Skolelinux correctly the LVM volumes are initially created from
single physical partitions - so you need to temporarily use an
additional physical partition...

So what you need to do is the following:

1) shrink e2fs partitions on vol_too_large using e2fsadm
2) add temporary partition (big enough to replace) to vol_too_large
3) remove original physical partition from vol_too_large
4) repartition physical disk to split the now free partition in two
5) reboot to make the system recognize new partitioning names
6) add first half of divided physical partition to vol_too_large
7) remove temporary partition
8) add second half of divided physical partition to vol_too_small
9) extend e2fs partitions on vol_too_small using e2fsadm

Please correct me somebody if I am wrong about this procedure.

The reason for adding the LVM layer, I assume, was to easily _extend_
space (by adding more harddrives). If I am right in the above, it would
probably make sense to consider changing Skolelinux to initially
partition physical space into more smaller slices, so that physical
space can more easily be rearranged between LVM volumes.

 - Jonas

* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm

Reply to: