FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-22-2009, 07:15 PM
Momesso Andrea
 
Default Resizing physical volume for lvm.

My current setup is:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2894 23246023+ 83 Linux
/dev/sda2 2895 3381 3911827+ 82 Linux
swap /Solaris
/dev/sda3 3382 24804 172080247+ 83 Linux
/dev/sda4 24805 30401 44957902+ 83 Linux

where sda3 is an lvm volume and sda4 is free space.

I'd like to to merge sda3 and sda4 into a single partition without
losing the data on it, but I'm not sure if it is possible.

My guess is that I can use fdisk to delete sda4 and sda3, create a sda3
partition starting at 3382 and ending at 30401, then use pvresize to
enlarge it.

This is from man pvresize:
"Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
pvresize /dev/sda1"

Is that going to work or I'm going to lose all the data?

P.S. I'm not using vgextend to simply add sda4 to the lvm because I
might want to migrate my root (sda1) to ext4, and to do so I will need
to split it in two separate partitions (/boot using ext3 and / using
ext4). This way I'm not going to need extended partitions.

---
TopperH
http://topperh.blogspot.com
 
Old 03-22-2009, 07:33 PM
Jil Larner
 
Default Resizing physical volume for lvm.

Hi,

Momesso Andrea a écrit :

My current setup is:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2894 23246023+ 83 Linux
/dev/sda2 2895 3381 3911827+ 82 Linux
swap /Solaris
/dev/sda3 3382 24804 172080247+ 83 Linux

/dev/sda4 24805 30401 44957902+ 83 Linux

where sda3 is an lvm volume and sda4 is free space.


You may consider setting your partition type to 8E (Linux LVM), which
would give a better labeling of your table.


I understand what you want to do, and I would process the same way but
I'd rather make a backup before (of your partition table and data). As I
never did it, I prefer not telling you to go ahead


Sincerely,
Jil
 

Thread Tools




All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org