Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-04-2003, 12:02 AM
|
#1
|
LQ Newbie
Registered: Dec 2002
Posts: 15
Rep:
|
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
commuter
|
|
|
01-04-2003, 12:06 AM
|
#2
|
LQ Newbie
Registered: Dec 2002
Posts: 15
Original Poster
Rep:
|
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
|
|
|
01-04-2003, 12:19 AM
|
#3
|
LQ Newbie
Registered: Dec 2002
Posts: 15
Original Poster
Rep:
|
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
Last edited by commuter; 01-04-2003 at 12:20 AM.
|
|
|
01-04-2003, 01:52 AM
|
#4
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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.
|
|
|
01-04-2003, 04:44 AM
|
#5
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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".
Cool
|
|
|
01-04-2003, 09:50 AM
|
#6
|
LQ Newbie
Registered: Dec 2002
Posts: 15
Original Poster
Rep:
|
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
|
|
|
01-04-2003, 01:38 PM
|
#7
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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!
|
|
|
01-04-2003, 07:39 PM
|
#8
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
That's one step further than I've gotten, p2p still drives me back to the dual boot I live in shame
Cool
|
|
|
01-04-2003, 10:53 PM
|
#9
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
What p2p program do you use Chief?
|
|
|
01-04-2003, 11:22 PM
|
#10
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Don't use cp. Use tar:
Code:
cd /usr
tar cf - . | (cd /newdisk/usr; tar xvf -)
|
|
|
01-04-2003, 11:29 PM
|
#11
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
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.
|
|
|
01-05-2003, 03:43 AM
|
#12
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
01-05-2003, 08:57 AM
|
#13
|
LQ Newbie
Registered: Dec 2002
Posts: 15
Original Poster
Rep:
|
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 04:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|