resizing partitions

Philip Hallstrom freebsd at philip.pjkh.com
Thu Apr 21 07:35:26 PDT 2005



On Thu, 21 Apr 2005, Jerry McAllister wrote:

>>
>> Hello,
>>     I've got a 5.3-RELEASE box which has a /usr partition /dev/ad0s1e that
>> is to small by approximately 700 mb. I've got the space on /var /dev/ad0s1d
>> to do a resize, but i am unsure as to the procedure. I tried this once a
>> while back on a test box and lost everything. If anyone has done this or has
>> a procedure i'd be interested.
>
> Instead of actually resizing the partition, you can just move some
> of the stuff to a partition where you have plenty of room and then
> make sym-links to it.   /usr/local  and  /usr/ports are good
> candidates.   Tar the whole directory tree up and put it where
> you want and untar it.   Then make links and rm the old one.

Probably worth making sure you add the 'pS' options to tar as well...

-p
--same-permissions
--preserve-permissions  Extract all protection information.

-S
--sparse                Handle ``sparse'' files efficiently.

I find whenever I do something like this and forget those -- particularly 
-p -- I end up regretting it when users whine at me because they can't 
write to their files :-)


More information about the freebsd-questions mailing list