Click to See Complete Forum and Search --> : Moving home dir?
AmbitiousWench
01-14-2001, 09:08 AM
I'm not where this question should be, so I'll post it here. If you know a better forum for it, please let me know.
I'd like to add another HD to my box. I've found the nhf to do so, but now I'd like to learn how to move my home dir to it. I'm running out of room on this partition! Can any of you point me to a good toot on how to do this?
TIA,
------------------
*****ious Wench
"Ignorance is curable. Stupidity isn't.
Now, having settled *that*,
how do I set my laser printer back to stun?"
posterboy
01-14-2001, 10:44 AM
Having done this several times, let me take a crack at it. Get the hardware issues behind you, fdisk to establish partition(s) and do a mke2fs on the partition of interest on the new HD. Mount it somewhere, say, /mnt/hdb. Then a cp-av will pull the present contents of /home over onto it. Next, mount it over /home and make sure things are as you expect. After confidence in what you have done occurs, the old /home can be rm'd. Fix up fstab to get the mount done at boot time, as you like. This is from memory, I haven't done it in a long time, having discovered the wonders of LVM, which allows resizing of drives on the fly, up or down, in an unending way. I don't think I have forgotten anything, others will correct me if i have. http://www.linuxnewbie.org/ubb/smile.gif Ray
------------------
ray@raymondjones.net
HTTP://www.raymondjones.net
AmbitiousWench
01-14-2001, 12:36 PM
Ray, we've added the HD, patitioned, formated, and tried to move /home over to it. I mounted it as /mnt/hdc. I copied everything from the current /home dir, to /mnt/hdc. It couldn't copy a particular link, but that's the only error we got. I edited /etc/fstab to mount the drive as /home. at that point I unmounted /mnt/hdc. then I did a mount -a. all looked ok, untill I tied to log in as user. The GUI log in would revert back to a blank field when the PW was entered. Just a repromt to log in, so to speak. :::scratching head::: I think we've missed something here. Running RedHat 7 w/Gnome.
------------------
*****ious Wench
"Ignorance is curable. Stupidity isn't.
Now, having settled *that*,
how do I set my laser printer back to stun?"
milanuk
01-14-2001, 02:24 PM
Not really an answer as an additional question: anyone out there w/ experience moving from a local /home to an NFS mounted /home? Any gotchas to watch out for?
Monte
------------------
There are basically three kinds of men. There
are the ones who learn by reading. Then there are
the few who learn by observation. The rest just
have to pee on the electric fence for themselves.
posterboy
01-14-2001, 04:40 PM
Hmm, if you don't mount the new HD over home, that is, using the original drive's contents, is everything OK? This seems like an issue involving passwords, and that's way over there in /etc. You can get this also, if no profile can be found, and it doesn't know what shell to bring up for the user. How many users are there, under /home, and does this happen to them all? cp -a "should" copy everything including symlinks, I wonder if that missed link had an effect. I've never seen this when I have done it, anybody else with some input? Ray
------------------
ray@raymondjones.net
HTTP://www.raymondjones.net
milanuk
01-15-2001, 06:38 PM
Howdy, folks. I was digging around the Debian Install Guide and found the following. Hope it helps someone.
Large-Scale Copying
Sometimes you may want to copy one directory to another location. Maybe you're adding a new hard disk and you want to copy /usr/local to it. There are several ways you can do this.
The first is to use cp. The command cp -a will tell cp to do a copy preserving all the information it can. So, you might use
cp -a /usr/local /destination
However, there are some things that cp -a won't catch(13.1). So, the best way to do a large copy job is to chain two tar commands together, like so:
tar -cSpf - /usr/local | tar -xvSpf - -C /destination
The first tar command will archive the existing directory and pipe it to the second. The second command will unpack the archive into the location you specify with -C.
For those interested in reference (13.1), here it is:
catch(13.1)
Sparse files and hard links are two examples.
And here is the url to the page where I found this nugget:
http://www.newriders.com/debian/html/noframes/node91.html
Enjoy,
Monte
------------------
There are basically three kinds of men. There
are the ones who learn by reading. Then there are
the few who learn by observation. The rest just
have to pee on the electric fence for themselves.