D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Linux partitions



On Mon, Oct 15, 2001 at 08:02:04PM +0100, Neil Williams wrote:
> Is there any way of merging two adjacent Linux partitions?
> 
> I have a server that used to be dual-boot, until I wiped Windoze (!!) and 
> formatted the once FAT partition in ext2. That now holds the /home directory 
> but there is a lot of space that could be better used if the drive was back 
> to one single partition (with the swap space still).
> 
I don't think you can literally do this, unless you can back everything up
somewhere and repartition the whole disk. But there are devious ways of
getting the same effect.

> I say adjacent, but Linux lists these partitions as hda1 and hda5 because of 
> previous partitioning problems. Will that affect it? (Swap space is hda6)
> 

Well, if you can still squeeze everything back on to hda1 (try tarballing
anything non-esential), then you could zap hda5 & 6 and the "real" partition
that contains them for good measure. Then re-create your swap partition
as hda3, and use all the remaining space for a second ext2 partition (hda2).
The best directory to offload onto this new partition would probably be
\usr. But if you needed to put two or more directories on the new partition
(eg \usr and \home, or \usr and \var or whatever) you could mount hda2 as say 
\drive2 and then make a symlink from \usr to \drive2\usr, I think that
would work. I thought this plan out a while ago when I was in a similar
situation to you, but in the end I only needed to put /usr on to the
second hard drive.

Keith

NB make any critical file system switches working from a boot/rescue floppy
so that you're not messing with a live system!





--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly