moving /home and /usr to new partitions?
I did a long search but did not find the specific answer to my question?
I'm adding a second hard drive 6GIG and splitting it into 2 partitions. I would like to mount /home on /dev/hdb1 and /usr on /dev/hdb2 I installed the second hard drive and partitioned it. I understand how to write a filesystem using mke2fs -c drive size I also understand how to mount the partitions and edit fstab. Finally, my question if I use the mountpoints /home for /dev/hdb1 and /usr for /dev/hdb2 will this affect those directories that currently reside unde / on /dev/hda2 ? Is there anything special I need to do when issuing the mount command or will linux recognize the fact that I wish to relocate these directories? Thx I'm using RH8 My partition tables Device Boot Start End Blocks Id System /dev/hda1 * 1 25 100768+ 83 Linux /dev/hda2 26 657 2548224 83 Linux /dev/hda3 658 787 524160 82 Linux swap Device Boot Start End Blocks Id System /dev/hdb1 2 384 3076447+ 83 Linux /dev/hdb2 385 788 3245130 83 Linux If any further info is needed about my system please let me know. I just want to check before I make a big booboo :study: commuter |
Oh yeah and how do I move those directories!
In the book "Running Linux" under "tar Tricks" I found a referance to using tar to relocate directories preserving there integrity! I think I can work this out I'm just nervous about having duplicate directories during the move? thx again commuter |
OK I feel like an ASS because I just found the "Hard Disk Upgrade Mini How-To" but it say I need to mount the new drive with a mount point like "/newdisk" then continue after that.
I'm looking to have /home and /usr mounted directly under / . Is this possible without a complete reinstall? commuter |
I don't see why it wouldn't be possible to manually move your /home and /usr partitions to the new harddrive using the cp command. Check out "man cp" and make sure that you add the flags that preserve ownership/permissions AND links (-p or --preserve).
Then back up your /etc/fstab and put somewhere safe. Now edit fstab and change the entries for /home and /usr to the new settings. Reboot and cross your fingers. Only after you verify it worked should you remove the old /home and /usr. This should be possible in theory, although I have never tried it personally. Make sure everything important has been backed up. |
Reboot? ;) Reload your fstab: mount -a -o remount
I don't know when, or which thread, but I believe it was Aussie who said: "This is Linux, rebooting is for adding hardware". :D Cool |
Thanks guys I'm gonna give it a try as soon as I dig out from the more than 12" of snow I got last night! I love it though!
commuter |
Thanks MasterC, I guess I still suffer from windows rot. I am, however, proud of the fact that I chucked Windows and live in a 100% Linux world now!
|
;) That's one step further than I've gotten, p2p still drives me back to the dual boot :tisk: I live in shame :D
Cool |
What p2p program do you use Chief?
|
Don't use cp. Use tar:
Code:
cd /usr |
I used "cp -a" to move a complete slackware install to a new drive, have a look here for the blow by blow explanation on how I did it, you should be able to use the same method for shifting /home and /user to a new drive.
|
I've been referring to that how-to alot lately Aussie, very well written, even for a newb I believe.
As for my P2P, well in linux I finally caved and gave up LimeWire (although it was decent for finding files, they never transferred) and have since then given a go (yet again) on gtk-gnutella, still don't like the program at all (seems to be completely worthless IMO) and more recently, gave a new go at DC+ (DirectConnect) and it really seems like it's going to be the best thing that ever happened to P2P on linux. I really could give up my dual boot P2P (which on win is Grokster) for this if it would just make a little more sense. It does great on file transfer, finds files well, and eventually I'll figure out the interfaces. But until I can really figure out how to use it, and understand it well, I will keep a small (~4GB) dual boot going. I really hope I can figure it out faster, or it comes out with a new release that is easier to understand. :) Cool |
thks for all the tips guys later on this evening I should be able to find some time and give it a go!
I'll let u know how it turned out commuter |
All times are GMT -5. The time now is 10:32 PM. |