You are not logged in.

#1 2009-03-20 22:21:36

deicist
Member
Registered: 2009-03-17
Posts: 36

Move /home to new drive? And a kernel question.

Hi All,

I installed Arch on a secondary drive a couple of weeks ago, leaving my windows partition alone while I made sure I had everything I wanted off it.  Now though, I'd like to reformat the windows drive as a linux file system (ext3 probbaly) and mount it as my /home.

How would I go about doing this? 

Would it be simpler to just format the drive, mount it under /mnt and symlink that to /home somehow? 

Also, I'm feeling fairly confident about the whole Arch way now... After running Ubuntu for around 18 months and moving to Arch a month or so ago I'm happy enough hacking around in /etc and so on.  However, I'm now wondering about the Kernel.  I'm running Arch64 on a quad core intel Core 2.  Would I see any benefit from learning how to compile my own kernel and doing so with any processor specific flags there might be.... or is the stock Arch kernel as good as it gets for my chip? 

Thanks for any answers / thoughts / suggestions.

Offline

#2 2009-03-20 22:58:25

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Move /home to new drive? And a kernel question.

deicist wrote:

Would it be simpler to just format the drive, mount it under /mnt and symlink that to /home somehow?

A bit unconventional. What you'd want to do after formating your partition is to rsync or copy the contents of your existing /home partition to the new partition and then create an entry in /etc/fstab to have the new partition mounted at /home. Then, move/rename your existing /home to /home.old. Once that's done, mount -a and you're there.

Offline

#3 2009-03-20 23:11:16

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Move /home to new drive? And a kernel question.

I just did this last night on a production server. What I did was:

log out and log back in on console
cd to / (so you're not sitting on /home)
sudo -s
lsof +D /home (to see anything still running on /home, kill anything you see)
fdisk /dev/whatever (to change the partition type)
mke2fs -j /dev/your_partition
mv /home /home.old
edit /etc/fstab to mount your new filesystem on /home
mkdir /home
mount /home
cd /home.old
rsync -axiPAX * /home
du -sh /home /home.old (sanity check to make sure the sizes are about the same after the copy)
reboot (just to make sure nothing broke)
rm -rf /home.old (when you feel confident you don't need the old copy any more)

Last edited by ataraxia (2009-03-20 23:12:43)

Offline

Board footer

Powered by FluxBB