How to resize a disk partition on a Xen Guest Linux host

Alcuni semplici step per allargare una partizione Linux di un sistema operativo ospitato su Xen:

1) Spegnere la VM guest

2) Dal Dom0 eseguire: xe vdi-resize uuid=13575f55-e55d-7f49-f22d-62427cb8fa22 disk-size=5500MiB

3) Start VM

4) Nella VM: fdisk /dev/xvda
Command (m for help): d
Partition number (1-4): 2
Command (m for help): p
Disk /dev/xvda: 5767 MB, 5767168000 bytes
255 heads, 63 sectors/track, 701 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
Partition number (1-4): 2
First cylinder (14-701, default 14):
Using default value 14
Last cylinder or +size or +sizeM or +sizeK (14-701, default 701):
Using default value 701
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

5) reboot

6) Dalla VM: pvresize -v /dev/xvda2
Using physical volume(s) on command line
Archiving volume group “VolGroup00” metadata (seqno 5).
Resizing physical volume /dev/xvda2 from 115 to 168 extents.
Resizing volume “/dev/xvda2” to 11052336 sectors.
Updating physical volume “/dev/xvda2”
Creating volume group backup “/etc/lvm/backup/VolGroup00” (seqno 6).
Physical volume “/dev/xvda2” changed
1 physical volume(s) resized / 0 physical volume(s) not resized

7) lvextend -l +100%FREE /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 5.25 GB
Logical volume LogVol00 successfully resized
resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 1376256 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 1376256 blocks long.

Tags: , , , , , , , ,

Post simili:

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

12 Responses to “How to resize a disk partition on a Xen Guest Linux host”
  1. bygbyt
    23:04 on December 20th, 2011

    Es muy interesante el proceso gracias por compartirlo y por tu tiempo

  2. Koffein Pulver
    11:03 on October 4th, 2011

    Taht are wonderful points altogether, you just gained a emblem new reader. Tahnaks

  3. demotywatory
    11:37 on October 3rd, 2011

    You could certainly see your expertise within the paintings you write. The arena hopes for more passionate writers such as you who are not afraid to say how they believe. Always follow your heart.

  4. filme
    19:21 on October 1st, 2011

    I think this is one of the so much important information for me. And i’m satisfied reading your article. However should remark on few normal things, The site taste is wonderful, the articles is really great : D. Excellent activity, cheers

  5. great fancy dress, gaga fancy dress
    13:23 on September 30th, 2011

    I appreciate, lead to I discovered just what I used to be looking for. You have ended my 4 day lengthy hunt! God Bless you man. Have a nice day. Bye

  6. divxfullmoviedownload
    00:00 on September 30th, 2011

    wonderful points altogether, you just gained a emblem new reader. What would you recommend about your submit that you simply made a few days ago? Any certain?

  7. web hosting
    20:53 on September 16th, 2011

    You actually make it seem really easy with your presentation however I to find this matter to be actually one thing that I feel I’d by no means understand. It kind of feels too complicated and very broad for me. I am having a look forward for your subsequent put up, I will attempt to get the hang of it!

  8. Download Music
    12:34 on August 11th, 2011

    Hi, i think that i saw you visited my site so i got here to ?return the choose?.I am trying to in finding things to enhance my web site!I assume its good enough to make use of some of your ideas!!

  9. Elliott
    07:46 on April 17th, 2011

    i recommened this one
    i tried it and successfully changed the disk c from 30GB in to 60 GB. lol

  10. rb
    17:28 on October 14th, 2010

    worked a treat in Xenserver 5.5. Thanks!

  11. How to resize a disk partition on a Xen Guest Linux host | fix my credit
    03:47 on June 17th, 2009

    […] How to resize a disk partition on a Xen Guest Linux host Posted by root 33 minutes ago ( Jan 16 2009 if you enjoyed this post please consider to leave a comment or bbpress database integration on wordpress middot import synchronizing your imap io me e michele is powered by wordpress entries and comments feeds Discuss  |  Bury |  News | How to resize a disk partition on a Xen Guest Linux host […]

  12. disk backup
    08:11 on March 26th, 2009

    A hard disk drive[1] (often shortened as “hard disk”[2] or “hard drive”[3]), is a non-volatile storage device which stores digitally encoded data on rapidly rotating platters with magnetic surfaces. Strictly speaking, “drive” refers to a device distinct from its medium, such as a tape drive and its tape, or a floppy disk drive and its floppy disk. Early HDDs had removable media; however, an HDD today is typically a sealed unit (except for a filtered vent hole to equalize air pressure) with fixed media

Leave a comment