Re: Offtopic disk partition question



> This is definitely an off-topic post, but I'm not sure where to look for
> the answer, so if someone is willing to answer the question off-list or
> point me in the right direction, I'd appreciate it.
> 
> We've got a Linux box running here at work that was partitioned kinda
> awkwardly and we'd like to correct it. Current setup is:
> [murphy]$df -h
> Filesystem            Size    Used   Avail   Use% Mounted on
> /dev/hda1             1.9G  1.2G  607M    68%      /
> /dev/hda5             1.8G   54k  1.7G         0%      /tmp
> 
> Obviously there is no reason /tmp need to be that big, so I'd like to
> change it's mount point (maybe to /usr or /home? - any suggestions here
> would help also), but I'm unsure how to do it CORRECTLY.  I know I need
> change the entry in /etc/fstab to be what I want, but what is the right
> way to get the data in the correct place before I make the change?
> 
> Let's assume I want to make hda5 mount as /usr, I'm envisioning I need
> to do something like:
> As root, cp -R /usr/* /tmp
> change the entry in /etc/fstab to mount hda5 as /usr
> reboot

Here's what I'd do :

* mkdir /usr.new
* umount /tmp 
* mount /dev/hda5 /usr.new
* rm -Rf /usr.new/*
* mv /usr/* /usr.new/
* umount /usr.new
* mount /dev/hda5 /usr
* rmdir /usr.new
* -> edit /etc/fstab to be
	/dev/hda1       /	....
	/dev/hda5       /usr	....
* I'm not sure if you need a reboot. Basically
	- If the system is unstable because all the files in /tmp just
	  disappeared all of a sudden, then reboot.
	- Otherwise, the system should work fine.

		= L

PS. You are right, this IS off-topic. Next time, look at the mailing lists
listed at redhat.com, linux.org, or linux.com for example. Good luck.

/-------------------------------------------------------------------\
|   LOBAN AMAAN RAHMAN  <-- anagram of -->  AHA! AN ABNORMAL MAN!   |
|  MSC #763, Caltech, Pasadena, CA 91126, USA. Tel: 1-626-395-1407  |
|     loban@earthling.net, loban@caltech.edu, http://i.am/loban     |
\-------------------------------------------------------------------/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]