[PLUG] Moving /home directory
Rich Shepard
rshepard at appl-ecosys.com
Fri May 13 17:15:22 UTC 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 12 May 2005, Reid Leake wrote:
> I have freed another HD of dreaded NTFS, and want to use it (well a
> partition on it) as my /home directory. I added this to my /etc/fstab:
>
> /dev/hdb1 /home reiser4 notail,noatime 0 0
> Is there anything else I need to do besides move my files from the
> old /home to the new partition (hdb1) to make this transition?
Reid,
The entry in /etc/fstab does two things: 1) allows for automounts during
reboots and 2) allows root to mount the new filesystem manually.
What I suggest you do is a four-step process[1]:
1. 'mv /home /home-old' # this prevents having two filesystems with the
same name but mounted at different points.
2. (as root) 'mount /dev/hdb1 /home'
3. (as you) 'cd /home; cp -a /home-old/* .' # copy all from old to new.
4. 'rm -rf /home-old/*' # Once you're sure everything is where it should
be.
Then you can do as you wish with the home-old/, including rmdir.
HTH,
Rich
- --
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
[1] I know that if I've left off something important a bunch of other
PLUGgers will let you know, and let me have it for being clueless and
offering flawed advice. This message comes without warranty and as-is.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
iD8DBQFChOCxugEIjC001L0RAq1nAJ4j/AsEu3zlaHv4C/xl5TyYa21V8gCfRiT/
uYn6bipemfJfTtspkQP8R8o=
=mnw5
-----END PGP SIGNATURE-----
More information about the PLUG
mailing list