LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Move my Home directory... (https://www.linuxquestions.org/questions/linux-general-1/move-my-home-directory-341112/)

it-s 07-07-2005 09:06 PM

Move my Home directory...
 
Hi all,

I have e question here - How do I move my user Home directory to a different partition (say I have a larger one freed up just recently). I'm on Suse 9.2 and so far I used Yast2 to reformat the new partition to Reiser. Now, if mount it, I can only write to it as root, but if I comy/move my user files there in root accout all files will change to root ownership! What do I do? Is there a software that would help me?

Thanks in advance.

it-s

Pcghost 07-07-2005 09:20 PM

First, make sure the directory where you are mounting the partition is owned by the user.
chown it-s:users <pathtomountpoint>

Next, when you make the entry in /etc/fstab to mount it, include user in the options section.

Third, if the mount point is not /home/it-s, then make a symlink from /home/it-s to the location, in case apps looking for it can't find it.

ln -s <pathtomountpoint> /home/it-s

That should do it.
The quickest way is to move your data out of /home/it-s, set up the mount point of the new partition in /etc/fstab to mount at /home/it-s, mount it (mount -a), then move your data back. That will prevent you from having to change anything in your user profile. I hope all that made sense.

J.W. 07-07-2005 11:00 PM

IBM put together a really good tutorial on moving the /home partition. Good luck with it -- J.W.

it-s 07-08-2005 08:40 AM

Pcghost, J.W. thanks a lot. You bouth were very helpfull. All my files are seccessfuly transfered :)
Now, is it just me or ReiserFS is slower then ext3???

But, that's not important. An important thing is that I have done what I wanted.

Now just one more thing. I want to merge my old /home partition with my existing / (root) partition without destroying the later.
In other words:
Code:

fstab>>
...
/dev/hda7            /        reiserfs  (my root partition)
/dev/hda6            /home/it-s/archive    ext3      (my old 'home' partition)
/dev/hda5            /home      reiserfs  (my new 'home' partition)
...
>>

I want: hda7+hda6=hda? without loosing content of hda7!!! (don't care for hda6)

Hope I make any sence here :)

Thanks for your help once more.

Eugene

Pcghost 07-08-2005 09:19 AM

You'll want to remove the old home partition (using fdisk, cfdisk, etc), and then resize hda7 to take up the free space. Reiser is supposedly a little slower than ext3, but not enough to notice, and I have found reiser to be much more tolerant of power failures. I started using Reiser when I was a SuSE user, and have stuck with it through all the Debians as well for the reason stated above.

J.W. 07-08-2005 11:34 AM

I agree 100% with Pcghost. I originally used ext3 but switched to reiserfs due to reading/hearing good things about from people I respect, and now it's my file system of choice. That is not to say that there necessarily is anything wrong with ext3, but this past year the area I live in has been soaked with rain, and there were a number of blackouts. Fortunately, none of my machines complained at all, and no data was lost. -- J.W.


All times are GMT -5. The time now is 04:24 PM.