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

Re: [linux-lvm] Keeping swap in the middle of the disk



On Fri, 26.01.01, Chris Wilson <cdw22 hermes cam ac uk> wrote:
> 

[cut some stuff]

> Each disk is partitioned as follows:
> 
>   hda1     hda2      hda3     hda4
> <32 meg> <22 gig> <256 meg> <22 gig>
> 
> The two drives are hda and hdc. I'd hoped it might be possible to create a
> Logical Volume from hda2 and hda4, and one from hdc2 and hdc4. Then use
> them as Physical Volumes to create an 88gig Logical Volume for my reiser
> filesystem. It would appear that I cannot do this with LVM (pvcreate
> appears to check that the devices are not logical volumes).

I suppose the hda3 and hdc3 are to be the swap devices, so all you
have to do is:

(1) 	turn hda2, hda4, hdc2 and hdc4 into _physical volumes_, using
	partition id 8e and pvcreate, eg

	"pvcreate /dev/hda2 /dev/hda4 /dev/hdc2 /dev/hdc4"

(2)	create a _volume group_ out of these PV's

	"pvcreate <name of VG> /dev/hda2 /dev/hda4 /dev/hdc2 /dev/hdc4"

(3)	create a _logical volume_. This is where the filesystems are
	put on :)

	"lvcreate -n <name of LV> -L 88G /dev/<name of VG>"

(4) 	make filesystem

	"mkreiserfs /dev/<name of VG>/<name of LV>

that should be it.

good luck,

Nils

-- 
 >   Nils Juergens  | nils muon de | icq 7090774   <
 >  If we all work hard, we can turn this company  <
 >      around 360 degrees -- gruntbert(LOTD)      <


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