PDA

View Full Version : /home not in right place


hpman28
08-12-2006, 01:38 AM
Hi.

I used the auto filesystem of freebsd and now /home dir in a part of /.

How can I change it back to /usr, where most of my space is..


1. tar cvfp /usr/home-backup.tar /home
2. mkdir /usr/home
3. rm -rf /home
4. ln -s /usr/home /home
5. tar xvf /usr/home-backup.tar -C /usr


Will do the job and not destory data?

DirectAdmin Support
08-12-2006, 09:47 AM
Hello,

I'd use something similar to that, but perhaps less destructive in case something goes wrong.

On the assumption that /home is just a directory under the / partition and /home is not it's own partition, you could do:mkdir /usr/home
cd /home
cp -rp * /usr/home/
cd /
mv home home2
ln -s /usr/home homeOnly after you're sure it's all correct and working againg would you delete /home2.

Note that if /home is on it's own real partition, I wouldn't recommend doing this... deleting it would just waste space... you'd also have to remove the /home entry from you /etc/fstab file.

On a side note, if you move /home to /usr/home, you'd have to update your /usr/local/directadmin/conf/directadmin.conf and set:
quota_partition=/usr
and make sure there are quotas setup on /usr.

John