home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / admin / 6707 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.7 KB  |  60 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!cs.utexas.edu!usc!rpi!ghost.dsi.unimi.it!serini
  3. From: serini@ghost.dsi.unimi.it (Piero Serini)
  4. Subject: Re: How to move a filesytem?
  5. References: <BzFBx0.ECD@encore.com>
  6. Organization: Computer Science Dep. - Milan University
  7. Date: Fri, 18 Dec 1992 11:08:17 GMT
  8. Message-ID: <1992Dec18.110817.6773@ghost.dsi.unimi.it>
  9. Lines: 49
  10.  
  11. tma@encore.com (Thanh Ma) writes:
  12.  
  13. >My /usr filesystem is full and I would like to move it to a newly-
  14. >installed second hard disk with the same name /usr. Please show
  15. >me how to do it. Also how do i reuse the space that /usr on the
  16. >1st disk occupied?
  17.  
  18. In single user mode:
  19.  
  20. # cd /
  21. # mkdir usr2
  22. # mount /dev/newdisk /usr2
  23. # cd usr
  24. # tar cf - . | compress | (cd /usr2 ; uncompress | tar xf - )
  25.  
  26. this will be quite long ...
  27. When tar is done, you get an exact copy of /usr on /usr2
  28. Then:
  29.  
  30. # sync ; sync
  31. # cd /
  32. # /bin/rm -rf /usr
  33. # sync ; sync
  34.  
  35. So you can "reuse" the space on the old disk)
  36. when done,
  37.  
  38. # umount /usr
  39. # umount /usr2
  40. # mount /dev/newdisk /usr
  41. # rmdir /usr2
  42. # mount /dev/olddisk /wherever/you/want
  43.  
  44. That's all.
  45. Be very careful, maybe this will not works for your particular system.
  46. Remember to put all /usr/bin stuff in you path before removing
  47. that file system, if needed.
  48. Think twice before each step.
  49. I shan't be liable for any  loss of data or profits, and/or
  50. for any other damage derived in any way from your acts. :)
  51.  
  52. Bye
  53. Piero
  54.  
  55. ------------------------------------------ Piero Serini -----------------
  56. Piero Serini                      E-mail: serini@ghost.dsi.unimi.it   
  57. Computer Science Dept.            or: piero@strider.st.dsi.unimi.it
  58. Univ. Statale - Milano - ITALY      ** mail me your .signature **
  59. -------------------------------------------------------------------------
  60.