[Leaplist] gparted and KVM quetjuns'

Kevin Korb kmk at sanitarium.net
Sat Mar 27 21:45:43 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First off what you want is LVM2 not gparted or any other partitioning
system.  It is not possible to simply take part of one partition and put
it onto another partition however it is possible to do so with logical
volumes (which are often all stored on a single real partition).

With the setup you have I would keep / as /dev/sda1 but then make a
/dev/sdb2 for the entire rest of the disk.  On /dev/sdb2 you make your
LVM2 setup with logical volumes for each of the listed filesystems as
well as swap which you didn't mention.

Unfortunately this pretty much means a backup and restore of your system
since this conversion will require a reformat of everything other than
/dev/sda1 but then so would rearranging the partition table as you asked.

The procedure (after the backup of course) would be something like
partition the disk for sda1 as is and sda2 as the rest of the disk
pvcreate /dev/sdb2
vgcreate vg /dev/sdb2
lvcreate --name=usr --size=4G vg
lvcreate --name=var --size=512M vg
lvcreate --name=tmp --size=384M vg
lvcreate --name=home --size=50G vg
lvcreate --name=swap --size=1G vg (I am guessing at the size here)

Then you format and mount /dev/vg/usr, /dev/vg/var, /dev/vg/tmp, etc....
You can later increase the sizes as needed with lvextend and resize2fs.

More information: http://sunoano.name/ws/public_xhtml/lvm.html

Also, yell at your distro for not setting it up this way in the first place.

On 03/27/10 21:32, Whit Hansell wrote:
> 
> Hey,
> 
> I've used gparted before but have forgotten what I did and haven't used
> KVM yet....  I.ve got it installed  but have to set up sufficient
> "storage" drive space for the new virtual Windows XP OS(guest).
> 
> Wanting to use KVM to run a couple 'doze apps on my Debian AMD64 box. 
> From what I can tell, it's normal to use /var as the place to set up the
> "KVM storage area."  If that's the case I need to increase the size of
> the partition where /var resides.
> 
> 4G RAM and 250G SATA
> 
> This is my df -h result:
> 
> whit at greatstar:~$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sda1             662M  252M  376M  41% /
> tmpfs                     1.9G     0        1.9G   0% /lib/init/rw
> udev                       10M 1008K   9.1M  10% /dev
> tmpfs                     1.9G     0        1.9G   0% /dev/shm
> /dev/sda9              216G   43G    163G  21% /home
> /dev/sda8              373M   12M   342M   4% /tmp
> /dev/sda5               4.6G   3.7G   726M  84% /usr
> /dev/sda6               2.8G  402M    2.3G  16% /var
> 
> My swap partition is /dev/sda7   5.0G
> 
> I need to move free space(40G??) from /dev/sda9(home) all the way down thru
> /dev/sda8, /dev/sda7(swap) to /dev/sda6(/var) and also increase my /usr
> partition
> by another 2G too, which is on /dev/sda5.
> 
> I know I have to move the "new storage area free space" down thru the
> various partitions but wondered if I can bypass the swap partition, or
> not?  I think i already know the answer which is yes, but just wanted
> verification.
> 
> Also, for you who have set up KVM successfully, is /var, the best place
> to put it or would it work OK if I just bypassed all this gparted stuff
> and stuck it in /home?
> 
> I've "Googled so much about gparted and KVM but just can't find answers
> to these specific question.
> 
> One other question.  This one regarding setting up Windows XP.  Do I
> need to let the install program format the storage space or ignore
> formatting and just do the install of  the basic OS?   I'm sorry but I'm
> lost on how this works w. my linux partition set up as ext3 and trying
> to install Windows on it.
> 
> As to the 40G I want to move from /home to /var, it's just a guess.  I
> figured I might want to also do an FC linux guest too for grins so
> figured a full 40 would be good.  Any recommendations will be appreciated.
> 
> TIA for any information you can give.  This Virtualization stuff in
> interesting and I'd like to learn it.  Thanks again.
> Whit
> 
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuutMcACgkQVKC1jlbQAQca9gCbBb7c+G6yvzv2OgRuOnl4dtRx
3IIAn0NKdVpikMomO9+RujsDdhNEc9t0
=QQ66
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Leaplist mailing list