Gentoo Archives: gentoo-user

From: Momesso Andrea <momesso.andrea@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Resizing physical volume for lvm.
Date: Sun, 22 Mar 2009 20:18:11
Message-Id: 20090322211514.11afd2e8@revolver
1 My current setup is:
2
3 Device Boot Start End Blocks Id System
4 /dev/sda1 * 1 2894 23246023+ 83 Linux
5 /dev/sda2 2895 3381 3911827+ 82 Linux
6 swap /Solaris
7 /dev/sda3 3382 24804 172080247+ 83 Linux
8 /dev/sda4 24805 30401 44957902+ 83 Linux
9
10 where sda3 is an lvm volume and sda4 is free space.
11
12 I'd like to to merge sda3 and sda4 into a single partition without
13 losing the data on it, but I'm not sure if it is possible.
14
15 My guess is that I can use fdisk to delete sda4 and sda3, create a sda3
16 partition starting at 3382 and ending at 30401, then use pvresize to
17 enlarge it.
18
19 This is from man pvresize:
20 "Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
21 pvresize /dev/sda1"
22
23 Is that going to work or I'm going to lose all the data?
24
25 P.S. I'm not using vgextend to simply add sda4 to the lvm because I
26 might want to migrate my root (sda1) to ext4, and to do so I will need
27 to split it in two separate partitions (/boot using ext3 and / using
28 ext4). This way I'm not going to need extended partitions.
29
30 ---
31 TopperH
32 http://topperh.blogspot.com

Attachments

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

Replies

Subject Author
Re: [gentoo-user] Resizing physical volume for lvm. Jil Larner <jil@××××.eu>
Re: [gentoo-user] Resizing physical volume for lvm. Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] Resizing physical volume for lvm. Dirk Heinrichs <dirk.heinrichs@××××××.de>