On Sat, Aug 2, 2008 at 2:01 PM, Emmanuel De Paepe <
[EMAIL PROTECTED]> wrote:

> I have a server with in total four hard disks.
> The first one 74 GB is used for system boot the second one is still not
> used.
> I have converted the other two (250 GB) into a mirrored tank.
> What is the proper way to attach this mirror to my "/export/home/username",
> so I can put data on those drives?
> I have been looking into the zfs manual, but it I'm not sure which is the
> correct
> procedure.
>

Hi Emmanuel,

Firstly, you need to temporarily be NOT USING the /export/home stuff,
because you need to migrate.

Log in as root.  A shell session would do fine, or you can use the X-windows
GUI because root has got a home in the root file system, and hence will not
be hogging the /export file system.

The easiest is to start by temporarily moving the data in /export/home to
somewhere else.  Example:
# cd /export
# mv home old_home

Then create a few new file systems
# zfs create tank/home
# zfs set mountpoint tank/home /export/home
# zfs create tank/home/username

Now examine your handi-work so far:  check it with
# df -h
# zfs list -R tank

Now to move the data from old_home into the user's homes
# cd /export/old_home/username
# find . |cpio -pdmV /export/home/username

Check that all the files transferred OK
# ls -la /export/home/username

Fix the directory ownership
# chown unsername:groupname /export/home/username


Delete the old stuff
# rm -r /export/old_home/username


Wait for it to finish moving the files.
For the next user (eg johan):
# zfs create tank/home/johan
# cd /export/old_home/johan
# find . | cpio -pdmV /export/home/johan

Then
> Check the files moved correctly
> Fix home dir permissions
> Remove the old files

Wash-rinse-lather for every user in old_home

Have fun.
  _Johan
_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to