Zfs CLONE sous Solaris

De Le Wiki de Bibiche Solaris Sun Sparc Veritas San Nas Svm Sds Vxfs Vxvm Vmware Zone LiveUpgrade Cfengine OcsInventory Flar Pool Jumpstart Zfs
Aller à : navigation, rechercher

 Zfs creation clone d'un snapshot et partage nfs :

bash-3.2# zfs list -o space -r zfsshare
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zfsshare 2,89G 2,00G 0 32K 0 2,00G
zfsshare/sharezfs 2,89G 2,00G 0 2,00G 0 0
zfsshare/sharezfs@mardi - 0 - - - -

bash-3.2# zfs clone zfsshare/sharezfs@mardi zfsshare/sharezfsclone

bash-3.2# zfs list -o space -r zfsshare
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zfsshare 2,89G 2,00G 0 32K 0 2,00G
zfsshare/sharezfs 2,89G 2,00G 161K 2,00G 0 0
zfsshare/sharezfs@mardi - 161K - - - -
zfsshare/sharezfsclone 2,89G 1K 0 1K 0 0
bash-3.2#

bash-3.2# zfs set sharenfs=on zfsshare/sharezfsclone

bash-3.2# zfs share -a

bash-3.2# zfs set quota=1G zfsshare/sharezfsclone

bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zfsshare 2,00G 2,89G 33K /zfsshare
zfsshare/sharezfs 2,00G 2,89G 2,00G /zfsshare/sharezfs
zfsshare/sharezfs@mardi 161K - 2,00G -
zfsshare/sharezfsclone 1K 2,89G 2,00G /zfsshare/sharezfsclone

bash-3.2# dfshares localhost
RESOURCE SERVER ACCESS TRANSPORT
localhost:/zfsshare/sharezfsclone localhost - -

AND DESTROY :

bash-3.2# zfs destroy zfsshare/sharezfsclone

bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zfsshare 2,00G 2,89G 33K /zfsshare
zfsshare/sharezfs 2,00G 2,89G 2,00G /zfsshare/sharezfs
zfsshare/sharezfs@mardi 161K - 2,00G -



Remplacement d'un FS zfs par un clone zfs :

FS must be UNUSED !!! before doing this :

bash-3.2# zfs list -r zfsshare
NAME USED AVAIL REFER MOUNTPOINT
zfsshare 2,00G 2,89G 33K /zfsshare
zfsshare/sharezfs 2,00G 2,89G 2,00G /zfsshare/sharezfs
zfsshare/sharezfs@mardi 161K - 2,00G -
zfsshare/sharezfsclone 1K 2,89G 2,00G /zfsshare/sharezfsclone

bash-3.2# zfs promote zfsshare/sharezfsclone

bash-3.2# zfs list -r zfsshare
NAME USED AVAIL REFER MOUNTPOINT
zfsshare 2,00G 2,89G 33K /zfsshare
zfsshare/sharezfs 161K 2,89G 2,00G /zfsshare/sharezfs
zfsshare/sharezfsclone 2,00G 2,89G 2,00G /zfsshare/sharezfsclone
zfsshare/sharezfsclone@mardi 1K - 2,00G -

bash-3.2# zfs rename zfsshare/sharezfs zfsshare/sharezfs_old

bash-3.2# zfs rename zfsshare/sharezfsclone zfsshare/sharezfs

bash-3.2# zfs destroy zfsshare/sharezfs_old