How to combine volumes on hard drive

Asked by randy edens

I have an acer computer with a 250 gb hard drive. The first volume is a 90g ntfs that has windows vista on it that came on the machine. The next volume is 86g consisting of 82g ext4 and 3.5g swap that my ubuntu 11.04 is on. The third volume is 62g ext 4 and the fourth is 11g ext 4. I would like to reformat the windows and combine somehow the others to make one big ubuntu drive. I keep running out of space. Any advice as to how the best way to do this would be appreciated...thanks....randy

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

One procedure is this. I assume that you have the volume ordering striclty correct as they are laid out in the disk. You can check this with gparted, or fdisk.

I am unsure if ext can resize into space preceding it (I haven't tried this, i must admit), so I am going to assume you cant, and suggest one possible method. Others may have better methods.

* Delete your ntfs volume
* Duplicate your ext4 volume to this new space
* Re-run os-prober and update GRUB to correctly identify the new partition in your boot record
* Delete the original ext4 volume.
* Resize your new ext4 volume to the new space.

Thats it (actually, thats a little involved, but entirely doable). This would leave you with one large ext4 volume, with your existing 11.04, and your two other ext partitions.

You should absolutely back up your essential data to ANOTHER disk, as its easy to mess up a partitioning procedure and wipe critical data (I have done this :(, but was able to recover most, but not all, of it after much lost time ).

Revision history for this message
mycae (mycae) said :
#2

Note, I should mention:

* gparted can be used for expanding disks
* dd can duplicate partitions at the disk level, though it is command line only.
* You may need to re-run os-prober and reupdate grub when you are complete to remove any dud boot records.

Revision history for this message
marcus aurelius (adbiz) said :
#3

if you don't want to look at windoze ever again, you might want to try lvm (logical volume management). some people hate it, but it supposedly provides seamless integration of all your drives and is easier to set up and use.

Can you help with this problem?

Provide an answer of your own, or ask randy edens for more information if necessary.

To post a message you must log in.