[Linux] Combining partitions

Robert Citek linux@flux.org
Tue, 19 Aug 2008 12:17:01 -0500


Are these partitions all on the same drive?

If so and assuming they are adjacent (e.g. photo=/dev/sda5,
free=/dev/sda6), then one solution would be to put everything into one
partition like so:

 - create a subdir under photo, e.g. ./photos/foo
 - move files from ./free to ./photos/foo
 - delete the ./free partition
 - expand the ./photos partition
 - rename ./photos/foo to ./photos/free

If they are not adjacent partitions, then you'll have some juggling to
do with gparted.

If ./photos doesn't have enough room, then you'll have to use some
temporary storage place like an external USB drive.

If the partitions are on separate drives, then you probably want LVM
or RAID.  LVM is great for dynamically expanding and shrinking
partitions.  The disadvantage is that if an underlying drive goes bad,
it's quite challenging to recover data.  And if you have more than one
drive forming the LVM, then the likelihood of a single drive failure
increases with each new drive.  Same with RAID unless you go with RAID
other than RAID0.

With either LVM or RAID, you'll have to repartition the drive.

Regards,
- Robert

On Mon, Aug 18, 2008 at 1:31 PM, David Williams
<dwilliams@dtw-consulting.com> wrote:
> I know that I've heard about this in the past, but don't recall the exact
> name.  It is possible to combine two separate partitions into one larger
> 'virtual' partition right ?  So, if I had the following: