Popular Posts

Apr 20, 2018

MOVING ZFS FILESYSTEMS BETWEEN POOLS

MOVING ZFS FILESYSTEMS BETWEEN POOLS

APPLIES TO : Solaris zpool and zfs

GOAL :  Move a user's home directory from zfs root pool to another zpool, In this example a users home directory is mapped under root pool and it contains 6GB of data, now they need 500GB space for their home directory,

SOLUTION : Create another zpool with new 500Gb disks, Take sanpshot of existing zfs volume, use zfs send and receive command to send the snapshot data to the new zpool, Modify the mount point to new zfs volume.


1.     Create a new zpool zfs volume with 500GB new disk
                    zpool create -f -m /appuser_home appuser_home c1d25
                           
2.     Take snapshot of existing zfs volume.
                    zfs snapshot rpool/export/home/appuser@snapshot1

3.     Send the snapshot data to the new zfs volume.
                    zfs send rpool/export/home/appuser@snapshot1 | pv | zfs receive -F appuser_home
                                        # The pv command will show the status of data copy
                                        # 6.5GB of data copied in less than two minutes
                                                6.51GB 0:01:59 [  56MB/s] [                  <=>                               ]

4.     Unmount the existing volume.
                    zfs unmount rpool/export/home/appuser

5.     Set the mount point to new zfs volume
                    zfs set mountpoint=/export/home/appuser appuser_home



~Judi~








2 comments:

  1. Excellent, this is what I'm looking for... great. Many thanks. Really works.

    ReplyDelete
    Replies
    1. Thanks for your feedback. Glad it made your task easy :)

      Delete

Popular Posts