Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: Gentoo-User ML <gentoo-user@l.g.o>
Subject: [gentoo-user] Extending a partition with LVM on it
Date: Wed, 05 Sep 2007 21:59:53
Message-Id: 20070905234715.0b2278dd@marcec.huntemann.uni-oldenburg.de
1 Hi Lists,
2
3 I recently did some rearranging of my partitions, so that everything
4 except / and /boot (they're where my Windows used to be) is on a
5 logical volume. Yay, me. My partitioning now looks like this:
6
7 >marcec marcec # df -h
8 >Dateisystem Größe Benut Verf Ben% Eingehängt auf
9 >/dev/sda1 1,2G 516M 610M 46% /
10 >udev 10M 280K 9,8M 3% /dev
11 >tmpfs 501M 0 501M 0% /dev/shm
12 >/dev/mapper/maindisk-Var
13 > 2,0G 340M 1,7G 17% /var
14 >/dev/mapper/maindisk-Usr
15 > 20G 13G 7,4G 64% /usr
16 >/dev/mapper/maindisk-Opt
17 > 15G 8,6G 6,5G 57% /opt
18 >/dev/mapper/multimedia-Home
19 > 45G 40G 5,7G 88% /home
20 >/dev/mapper/multimedia-Media
21 > 20G 1,5G 19G 8% /home/marcec/multimedia
22 >/dev/mapper/multimedia-Stuff
23 > 45G 37G 8,7G 81% /home/marcec/stuff
24
25 I wasn't sure how big I should make /var and /usr. /opt is that big in
26 the event I install some more games. Otherwise /boot is on sda5, the VG
27 maindisk on sda6 and the VG multimedia on sdb.
28
29 Now, since Windows was at the beginning of the hard drive, there is a
30 huge gap (about 23 GB) between sda5 and sda6.
31
32 What I want to know is, how would I go about filling the gap to have a
33 single, large partition for maindisk? Gparted wouldn't do it and I
34 didn't dare do anything with cfdisk.
35
36 For the moment I added a new partition (via cfdisk, that I did dare do)
37 that takes up the entire gap and extended maindisk to that. It's not
38 what I wanted, but it works. So that puts the VG on both sda6 (new) and
39 sda7 (old sda6). So it looks like this now:
40
41 >marcec marcec # pvs
42 > PV VG Fmt Attr PSize PFree
43 > /dev/sda6 maindisk lvm2 a- 23,22G 23,22G
44 > /dev/sda7 maindisk lvm2 a- 273,31G 233,38G
45 > /dev/sdb1 multimedia lvm2 a- 149,05G 39,05G
46
47
48 Of course, since I didn't do anything else to maindisk, I understand I
49 can always remove the partition from LVM via vgreduce and pvremove.
50
51 Any hints in this regard, or is my current solution the only viable?
52
53 --
54 Marc Joliet
55 --
56 "People who think they know everything really annoy those of us who
57 know we don't" - Bjarne Stroustrup

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-user] Re: Extending a partition with LVM on it Alexander Skwar <listen@×××××××××××××××.name>