changing partition sizes?

ME dugan at passwall.com
Thu Mar 8 15:50:41 PST 2001


On Thu, 8 Mar 2001, Moss Collum wrote:
> When I first partitioned my hard drive, I seem to have underestimated the
> amount of space I'd need in /usr.  Does anyone know of a safe way to
> change the size of a partition after it's been created?
> 
> Alternately, my /var partition would be happy with less space, and is as
> large as I need /usr to be... would it work to switch them with each
> other?
> 
> (I'm thinking something like this: move everything from /usr and
> everything from /var into subdirectories under /home, unmount them, switch
> them, and move everything back... but this seems like it might be a bit
> risky. Anyone?)

Though symlinks are an option, it creates a more standard procedure to
actually set it up properly to avoid problems that might exist when a web
server looks to reference /var/www/blah to a new place and you have forgot
to enable "follow-sym-link" in the httpd.conf... (may not be a problem
depending upon nesting and what services you offer and how they may be
affected by traversing a sym link.

if you have *lots* of space on both (free space per each is more than 50%
of used space) you can tar up both trees and store the tar in each
relative location, and then boot up in single user mode or with the init=
LILO directive to untar the files in their right places. (done in single
user mode or with init= to make sure nothing that might need to log
(/var/log) or write to files prevents a rm -rf of the trees from going
forward or a tar -xvf from over-writing a file.

Then you could modify /etc/fstab to mount your different partitions /var
for /usr and devices... sync and then reboot.

If you want to back up all the stuff off these partitions, there are
repartitions systems out there. I set up a page a long time ago for
setting up linu on a fujitsu and it made it into the laptop FAQ for the
refs to partition utils. (read the top partg for links to a few that you
may want to try)

http://mike.passwall.com/fujitsu/
(FIPS , Partition Magic ($/Proprieraty/Commercial), Ranish Partition
Manager, parted, etc.)

Though I have used partition resizing tool, I generally avoid them when
there are alternatives. The suggestion of just trading stored stuff for
/var and /usr is a choice I might use 'cause it is less risky. If you have
the space for it, I'd try that. (Others may feel differently.)

If you need better descriptions of any of this, or something does not
make sense, let me know.


-ME





More information about the talk mailing list