The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 migrate the home directory to a new partition
Author: Erik 
Date:   09-09-00 05:13


I want to migrate the /var and home directory of all the users (excluding the root) on a production system (a FreeBSD 4.1 Stable machine) to a new partition on another harddisk.

The current config is that everything is mounted from a single partition
i.e. on fstab

#Device Mountpoint FSType Options
/dev/ad0s3a / ufs rw

I find that the home directory /home is a symlink to /usr/home. Can I just move the /var and the /usr/home to the new partition?

For /usr/home, a symlink, home, pointing to it will be created on the new partition as well.

So the new fstab looks like this.

#Device Mountpoint FSType Options
/dev/ad0s3a / ufs rw
/dev/ad1s1e /var ufs rw
/dev/ad1s2e /home ufs rw

It sounds correct to me but I wanna ask experienced FreeBSD mates if it works before I commit.


Hong Kong

Reply To This Message
 RE: migrate the home directory to a new partition
Author: elliot 
Date:   13-09-00 01:49

/dev/ad0s3a / ufs rw
/dev/ad1s1e /var ufs rw
/dev/ad1s2e /home ufs rw

if you slice it up, i believe it will look like this

/dev/ad1s1e /var ufs rw
/dev/ad1s1f /home ufs rw

when you make the slices with stand sysinstall (which you should do) you can make sure before taking note and adding those to the fstab

shutdown in to single user mode
then mount them to a different place (/mnt/home) and copy them over. then unmount, update fstab
exit and you're finished

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum