home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!ghost.dsi.unimi.it!serini
- From: serini@ghost.dsi.unimi.it (Piero Serini)
- Subject: Re: How to move a filesytem?
- References: <BzFBx0.ECD@encore.com>
- Organization: Computer Science Dep. - Milan University
- Date: Fri, 18 Dec 1992 11:08:17 GMT
- Message-ID: <1992Dec18.110817.6773@ghost.dsi.unimi.it>
- Lines: 49
-
- tma@encore.com (Thanh Ma) writes:
-
- >My /usr filesystem is full and I would like to move it to a newly-
- >installed second hard disk with the same name /usr. Please show
- >me how to do it. Also how do i reuse the space that /usr on the
- >1st disk occupied?
-
- In single user mode:
-
- # cd /
- # mkdir usr2
- # mount /dev/newdisk /usr2
- # cd usr
- # tar cf - . | compress | (cd /usr2 ; uncompress | tar xf - )
-
- this will be quite long ...
- When tar is done, you get an exact copy of /usr on /usr2
- Then:
-
- # sync ; sync
- # cd /
- # /bin/rm -rf /usr
- # sync ; sync
-
- So you can "reuse" the space on the old disk)
- when done,
-
- # umount /usr
- # umount /usr2
- # mount /dev/newdisk /usr
- # rmdir /usr2
- # mount /dev/olddisk /wherever/you/want
-
- That's all.
- Be very careful, maybe this will not works for your particular system.
- Remember to put all /usr/bin stuff in you path before removing
- that file system, if needed.
- Think twice before each step.
- I shan't be liable for any loss of data or profits, and/or
- for any other damage derived in any way from your acts. :)
-
- Bye
- Piero
-
- ------------------------------------------ Piero Serini -----------------
- Piero Serini E-mail: serini@ghost.dsi.unimi.it
- Computer Science Dept. or: piero@strider.st.dsi.unimi.it
- Univ. Statale - Milano - ITALY ** mail me your .signature **
- -------------------------------------------------------------------------
-