ZFS - Migrating users to it... - Solaris

This is a discussion on ZFS - Migrating users to it... - Solaris ; Okay, I've got a ZFS raidz setup, using an Addonics ADSA4R5 and 4 x Seagate 320GB, and I am trying to work out *how* to migrate my existing users to it. I presume I should do something like: # zfs ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: ZFS - Migrating users to it...

  1. ZFS - Migrating users to it...

    Okay, I've got a ZFS raidz setup, using an Addonics ADSA4R5 and 4 x
    Seagate 320GB, and I am trying to work out *how* to migrate my existing
    users to it.

    I presume I should do something like:
    # zfs create uu/home
    # zfs create uu/home/user1
    # ...

    But I have no idea what magic needs to be done when copying their
    existing data across or how to make things automagically mount in /home
    and anything *else* I may need to do, (apart from using vipw to change
    the /etc/passwd entries).

    I've searched for a cookbook, but haven't spotted what I don't know.
    (And yes, I've read the ZFS Administration Guide, and various blogs, and
    so on).

    Cheers,
    Gary B-)

  2. Re: ZFS - Migrating users to it...

    Gary R. Schmidt wrote:
    > Okay, I've got a ZFS raidz setup, using an Addonics ADSA4R5 and 4 x
    > Seagate 320GB, and I am trying to work out *how* to migrate my existing
    > users to it.
    >
    > I presume I should do something like:
    > # zfs create uu/home
    > # zfs create uu/home/user1
    > # ...
    >
    > But I have no idea what magic needs to be done when copying their
    > existing data across or how to make things automagically mount in /home
    > and anything *else* I may need to do, (apart from using vipw to change
    > the /etc/passwd entries).
    >
    > I've searched for a cookbook, but haven't spotted what I don't know.
    > (And yes, I've read the ZFS Administration Guide, and various blogs, and
    > so on).



    ? If you have come that long you must be somewhat familiar with un*x
    like stuff and then you must have heard of tar, or?

    cd /home/user1;tar cf - .|(cd /uu/home/user1; tar xfBp -)

    For the rest there are plenty of examples in the man page

    Or try this approach maybe (from man page)
    # zfs set mountpoint=/export/home pool/home
    # zfs create pool/home/bob


    If using files as "nameservice", then add this line in /etc/auto_home
    * localhost:/export/home/&

    and set field 6 in /etc/passwd like /home/user1




    HTH,

    /Thommy M.

  3. Re: ZFS - Migrating users to it...

    On 2007-03-23 06:51:02 +0000, "Gary R. Schmidt" said:

    > But I have no idea what magic needs to be done when copying their
    > existing data across or how to make things automagically mount in /home
    > and anything *else* I may need to do, (apart from using vipw to change
    > the /etc/passwd entries).


    data can be copied across using tar, rsync, or what ever.

    The easiest way to move home dirs is to use the automounter to loop
    /home/x back to the appropriate place. If your zfs is rooted at
    /export you want an entry in the auto_home / auto.home map like:

    * /export/home/&

    If you migrate users incrementally you can obviously put more specific
    entries in there.

    --tim


  4. Re: ZFS - Migrating users to it...

    Tim Bradshaw wrote:

    > On 2007-03-23 06:51:02 +0000, "Gary R. Schmidt" said:
    >
    >> But I have no idea what magic needs to be done when copying their
    >> existing data across or how to make things automagically mount in /home
    >> and anything *else* I may need to do, (apart from using vipw to change
    >> the /etc/passwd entries).

    >
    >
    > data can be copied across using tar, rsync, or what ever.
    >
    > The easiest way to move home dirs is to use the automounter to loop
    > /home/x back to the appropriate place. If your zfs is rooted at /export
    > you want an entry in the auto_home / auto.home map like:
    >
    > * /export/home/&

    I don't understand what this means. :-( And "man automount" has
    confused me even further! I will let it digest for a while...

    > If you migrate users incrementally you can obviously put more specific
    > entries in there.

    Uh huh.
    My /etc/automount has:
    user1 127.0.0.1:/u/user1
    Is that what you mean?

    Cheers,
    Gary B-)

    --
    __________________________________________________ ____________________________
    Armful of chairs: Something some people would not know
    whether you were up them with or not
    - Barry Humphries

  5. Re: ZFS - Migrating users to it...

    Thommy M. Malmström wrote:
    [SNIP]
    > ? If you have come that long you must be somewhat familiar with un*x
    > like stuff and then you must have heard of tar, or?
    >
    > cd /home/user1;tar cf - .|(cd /uu/home/user1; tar xfBp -)

    That bit's easy. Although I tend to use "cp -r -P -p original new".

    > For the rest there are plenty of examples in the man page
    >
    > Or try this approach maybe (from man page)
    > # zfs set mountpoint=/export/home pool/home

    *That's* the bit I couldn't remember or see!! No idea why!

    > # zfs create pool/home/bob
    >
    >
    > If using files as "nameservice", then add this line in /etc/auto_home
    > * localhost:/export/home/&

    Hmmm, my /etc/auto_home has lines like:
    user1 127.0.0.1:/u/user1
    Should I edit these to be /pool/home/user1 ?? Or is that what the "*
    localhost:..." does?

    > and set field 6 in /etc/passwd like /home/user1

    Obviously :-)

    Thanks for all this.

    Cheers,
    Gary B-)

    --
    __________________________________________________ ____________________________
    Armful of chairs: Something some people would not know
    whether you were up them with or not
    - Barry Humphries

  6. Re: ZFS - Migrating users to it...

    On 2007-03-25 13:42:07 +0100, "Gary R. Schmidt" said:

    > My /etc/automount has:
    > user1 127.0.0.1:/u/user1
    > Is that what you mean?


    Probably you mean /etc/auto_home? But yes, that's what I meant. I
    think I was wrong in that you always need the hostname / IP. so the
    most general entry would be something like:

    * localhost:/u/&

    Here * is a wildcard and & is replaced by the left hand side of the
    rule. This would mean that /home/foo would translate to /u/foo say.
    Obviously you can then have more specific rules:

    user1 host1:/export/spot/&
    user2 host2:/export/spat/&

    & so on.

    By using the automounter you can stitch together what you want the
    filesystem to look like in a much more fine-grained way than was
    traditionally possible with filesystems. You can do this by specifying
    ZFS mountpoints too, but I'd still do it with the automounter I think
    (using a ZFS filesystem per user, but leaving the mountpoints in the
    default place).

    --tim





  7. Re: ZFS - Migrating users to it...

    On Mar 25, 2:39 pm, "Gary R. Schmidt" wrote:
    > Thommy M. Malmström wrote:
    >
    > [SNIP]> ? If you have come that long you must be somewhat familiar with un*x
    > > like stuff and then you must have heard of tar, or?

    >
    > > cd /home/user1;tar cf - .|(cd /uu/home/user1; tar xfBp -)

    >
    > That bit's easy. Although I tend to use "cp -r -P -p original new".


    Try to avoid cp for this. It don't handle links to well...

    > > For the rest there are plenty of examples in the man page


    [...]

    > > If using files as "nameservice", then add this line in /etc/auto_home
    > > * localhost:/export/home/&

    >
    > Hmmm, my /etc/auto_home has lines like:
    > user1 127.0.0.1:/u/user1
    > Should I edit these to be /pool/home/user1 ?? Or is that what the "*
    > localhost:..." does?
    >


    localhost is the same as 127.0.0.1

    The * is for 'all users' and the & is just to expand the user name
    So your's should go

    * localhost:/u/&


    > Thanks for all this.


    You're welcome


+ Reply to Thread