Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-29-2009, 09:57 AM   #1
Registered: Nov 2005
Posts: 80

Rep: Reputation: 15
Increase / partition size


My Linux virtual machine running on XEN and increased 1GB harddisk space.

Current snapshot:
[root@linuxtest01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 6.8G 2.3G 4.2G 36% /
/dev/hda5 3.0G 69M 2.7G 3% /tmp
/dev/hda2 6.8G 3.6G 2.9G 55% /var
/dev/hda1 251M 16M 222M 7% /boot
tmpfs 496M 0 496M 0% /dev/shm
[root@linuxtest01 ~]#

Parted command output is showing the added 1GB space:
[root@linuxtest01 ~]# parted
GNU Parted 1.8.1
Using /dev/hda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print

Model: QEMU HARDDISK (ide)
Disk /dev/hda: 22.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 271MB 271MB primary ext3 boot
2 271MB 7789MB 7518MB primary ext3
3 7789MB 15.3GB 7518MB primary ext3
4 15.3GB 21.5GB 6161MB extended
5 15.3GB 18.5GB 3224MB logical ext3
6 18.5GB 20.7GB 2147MB logical linux-swap


How to add the extra 1GB space to / (root) partition (i.e. /dev/hda3)? Please guide me.

Thanks in advance.
Old 09-30-2009, 01:58 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Before you do anything else, backup your partitions.

Option 1
Decrease the size of hda2 by 1 gig, and increase hda3 to take up the free space. Commit the changes, then reboot to load the new partition into the kernel.

Option 2
Decrease the size of hda5 by one gig, then decrease hda4 (the extended partition) by one gig. Then increase hda3 to take up the free space, Commit the changes, then reboot.

I'm assuming this works in a Xen virtual environment as it does outside the virtual environment.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase Partition Size shifflav Linux - Newbie 5 02-26-2009 10:09 PM
Increase partition size bmstephan Linux - Newbie 3 01-09-2009 12:31 AM
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 03:35 PM
Increase Partition Size shane200_ Linux - Hardware 1 08-24-2006 01:06 PM
Increase my root partition size? fintan.moloney Linux - Newbie 3 05-30-2006 02:01 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration