As the title suggests, I want to resize my /usr partition to occupy the free 20GB.

Please note:

1) I have no other drive to backup FreeBSD to
2) I am not connected to any other machine to which I can send the data
3) This is my laptop, and I'm willing to experiment anything that may lead to loss of data, as long as it might work
4) I am NOT willing to reinstall, I have just built too much from source and it has taken a long time..
5) I'm kinda new to FreeBSD...

I've searched around for a while, but found nothing interested..

Any help?

Thanks

Last edited by abdo88; 7th July 2008 at 04:12 PM.
Reason: Adding partitions in FreeBSD slice

Why would you like to resize /usr
Why not to use free space to create /home ?

p.s. I'm new to freebsd as well, but i don't think you can resize drive without using another drive to backup data....
Otherwise
you could use dump and restore (haven't tried to use it for resizing, but i think it should work)

Thanks for the reply... From your reply, you probably work on Linux... I'm not having any problem with home... However, my major concern is with /usr (this is where all the action goes on...) especially that I'm intending to build X and KDE..

About dumping, dump to where? I have no other hard disks and no network connections...

Thanks for the reply... From your reply, you probably work on Linux... I'm not having any problem with home... However, my major concern is with /usr (this is where all the action goes on...) especially that I'm intending to build X and KDE..

In situation like this I move /usr/ports (and if necessary /var/tmp) to /home and make symbolic link to them...
This is how i compiled OpenOffice on my PC
After that i move them back

How much you free space you got on Ubuntu drive????
If it's enough, you could use it to store /usr backup...
you will need 1 to 6 GB free space (depends if you will or not compress backup).... hmm, but restore works only on UFS, so you might need to use tar, but that might make some problems (with links maybe, idk, read man tar)

It's not exactly how I would do it but close enough. The reason for the reboot is because you may have programs stored in /usr that are running while doing this and it is best not to delete the data files while running the programs! Rebooting is not necessary but, you could say makes the process simpler to follow without bringing the system to single user mode (which would generally be best imho).

Note: I have not used FreeBSDs 'bsdlabel' in ages and of course assume no responsibility for the accuracy or inaccuracy of any of this.

If your not familiar with using bsdlabel you can always use the -n switch to it which will do a 'dry run' that won't *actually* write changes out, e.g. bsdlabel -ne ad0