Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2005 09:55:23 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        dmehler26@woh.rr.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: resizing partitions
Message-ID:  <200504211355.j3LDtNLZ016550@clunix.cl.msu.edu>
In-Reply-To: <000501c54620$63158660$0200a8c0@satellite>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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.

For example, I often make a partition and mount it as /work that contains
all my spare disk space in a slice.   If I put /usr/ports over there
it would look something like this:

  cd /usr/ports
  tar cvf /work/ports.tar *
  cd /work
  mkdir usr.ports
  cd usr.ports
  tar xvf ../ports.tar
Then look around in /work/usr.ports a bit to make sure it looks ok
  cd /usr
  ----------------------------
  mv ports ports.old            if you are really nervous, else just rm it
  ----------------------------
  ln -s /work/usr.ports ports
Try out the link by doing something like cd /usr/ports and looking around
It should put you in /work/usr.ports/wherever
  cd /usr
  rm -rf ports.old
  cd /work
  rm ports.tar

Works just fine.   I am always nervous about my typing so I normally 
do the extra steps of mv-ing the old one and checking things before
actuall rm-ing the old stuff.   But it can be skipped if you don't
have that problem.

You can call your extra partition mount point whatever you like.
Since /var can fill up with stuff such as mail and logs and spools
and db if you are running a database, you might not want to use
it to house the extra stuff unless you have a really big /var - well
beyond what you think you might ever need.   I reserve /var for those
things that grow unexpectedly so they can sort of be isolated there
and make another space (/work or whatever) for space manipulation
and other work - just a comment.

////jerry

> Thanks.
> Dave.
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504211355.j3LDtNLZ016550>