Resizing reiserfs paritions in Linux

First things first: My experience with paritioning amounts to sticking the RedHat or SuSE disk in and clicking buttons.

I’ve got a 20GB - well, 18.7GB - drive in my notebook with the following partition scheme:



/dev/hda1		swap		184.2MB
/dev/hda2	/	reiserfs	6.2GB	3.1GB free
/dev/hda3	/home	reiserfs	11.7GB	2.0GB free


That sorry amount of free space on my home partition is largely thanks to my Emusic.com subscription.

Now when I can swing the dough for a bigger drive (and notebook drives don’t come cheap), I’m also going to buy an IDE/USB enclosure to stick my old drive in and transfer all my files over.

In the mean time, I’d like to scavenge two gigs or so from the root partition to mount at /home/*, since I’ve already installed most of the big packages that I want or need.

Backing up everything on my 8X CD burner and reinstalling would be tedious, and besides, I’ll be getting that new drive in six months or so, so why bother?

So how can I grab that extra space?

My plan so far is to fire up a bootable CD distro of some kind and use parted.

A cursory glance at the parted documentation reveals that you can only resize Reiser (and ext2 and ext3, for that matter) partitions if you start at the same cylinder, so I won’t be able to just “resize” the two, correct? I mean, if I could, that would really kick ass, but I’m not counting on it.

Alternately, I suppose I could just resize the root partition and mount the extra space somewhere in my home directory, which would be slightly less kickass, but still workable.

Is there something other than parted I should be looking at?

Will any of this destroy my pwecious pwecious tunes?

A little help?

Thanks.

No safe way that ensures you will not lose any music in your home directory. You could resize / and take the two gig, but then /home would start at an earlier cylinder.

Try this (ugly, but it’s only for six months or so): soft links.

Make a directory in /. For example:

mkdir /more-music

Then create a soft link in your home directory to that directory:

ln -s /more-music /home/black455/more-music

Now, whenever you write to /home/black455/more-music, you are actually writing to /more-music. Be very, very careful not to fill up your root partition or else you will have to boot from cd (or alternate media) and clear some files.

Man ln. It will get you through to the bigger disk.

resize_reiserfs come with a big “this is a BETA program and may corrupt filesystems”. It’s probably fine, but that has scared me enough to not attempt resizing ReiserFS partitions.

A quick-and-dirty solution with no risk to your data is to make a symbolic link to a directory on the root partition. It may not kick ass, but it’s extremely easy and considerably more safe.

Oh. Yeah. D’oh.

I should have thought of that.

Thanks fellas.