/home not in right place

hpman28

Verified User
Joined
Aug 11, 2006
Messages
19
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..

Code:
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?
 
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:
Code:
mkdir /usr/home
cd /home
cp -rp * /usr/home/
cd /
mv home home2
ln -s /usr/home home
Only 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
 
Back
Top