tarballed
October 6th, 2004, 17:28
Hey everyone.

I need to redistribute some space between a few of my partitions on my test machine at work. Here is a quick snip of my current layout:

/dev/ad0s1a 345M 149M 168M 47% /
/dev/ad0s1h 15G 1.1G 13G 8% /home
/dev/ad0s1f 394M 42K 362M 0% /tmp
/dev/ad0s1e 11G 6.4G 3.8G 63% /usr
/dev/ad0s1g 3.4G 19M 3.1G 1% /var
procfs 4.0K 4.0K 0B 100% /proc


I need to move some of the /home space and distribute it to /tmp and /usr.

I vaguely remember seeing an article about how to do this, but have no idea where I saw it.

I was curious if anyone had a good method and procedure for doing this. Like I said: test machine. Just stuff im screwing around with today. :)

Tarballed

bsdjunkie
October 6th, 2004, 19:19
Check out fips.
http://www.igd.fhg.de/~aschaefe/fips/

bmw
October 6th, 2004, 21:23
bsdjunkie: I think fips is a slice-level tool. In FreeBSD "slices" are the DOS partitions that are created by FDISK. That's not going to help tarballed because he's trying to manipulate FreeBSD mounted filesystems (volumes). An entire *BSD filesystem layout (multiple volumes) is contained inside a single DOS FDISK partition.

tarballed: the usual way to handle mis-sized mounts (/var, /usr, etc.) is with symlinks. So it looks like you have more space in places like /var/tmp but you are faking it by sym-linking the stuff over to the bigger volume.

If symlinks don't float yer boat, then you pretty-well need to backup, re-newfs your filesystems and restore. But hey! Drives are cheap these days. Hookup a 2nd drive, newfs that in the shape you need, cp -Rp everything over to it, make it bootable, swap drives and Bob's Your Auntie.

I heard a rumour in very recent FreeBSD dox that one of the fs tools can now do some resizing under favourable conditions (eg adjacant fs'es, unused space at the end of a fs, etc.) Unfortunately I can't find any reference to that now. Frzzt!