[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: repartitioning: joining two partitions



On Mon, Mar 24, 2003 at 11:37:59AM -0800, Joris Huizer wrote:
| Hello everybody,
| 
| I have the following question:
| I have four partitions:
| /, /tmp, /usr, /home
| 
| Is it possible to change the situation so that the
| /tmp partition space becomes part of the /home (so the
| /tmp is a normal folder in / ) ? It's usually hardly
| used and I could use some space for my personal stuff.

Yes.  I recommend using lvm for this.

First you'll need to unmount /tmp (but be sure it isn't in use when
you do that).  Then comment out the entry in /etc/fstab.  Move all of
your data currently in /home to somewhere else and unmount it like
with /tmp.

Then use the lvm tools to create a volume group that contains the
physical partitions currently used for /home and /tmp.  In that volume
group, create a logical volume which you'll create a filesystem on and
then mount as /home.

Once you've done that you can move your data back to /home.  The lvm
system will handle distribution of the data across the physical
paritions (and disks, if you have multiple disks in the volume group)
transparently to the rest of the file system handling.

| Oh, and what is the name of the partition program
| Debian uses during the installation? If possible, I'd
| like to use that one for this

Probably 'cfdisk'.  In any case it's the one I often use.  Note,
though, that with a traditional disk partitioner, you must destroy the
current partitions in order to reallocate the space.

'parted' will allow limited editing of partitions without destroying
them.

One prerequisite for merging two physical partitions (without using
lvm) is that they are adjacent.

HTH,
-D

-- 
"Don't use C;  In my opinion,  C is a library programming language
 not an app programming language."  - Owen Taylor (GTK+ developer)
 
http://dman.ddts.net/~dman/

Attachment: pgpA68hxOMfIk.pgp
Description: PGP signature


Reply to: