Skip to content

Instantly share code, notes, and snippets.

@Abhinandan-Purkait
Created June 14, 2024 09:58
Show Gist options
  • Save Abhinandan-Purkait/2825853a4499f21ff883ae5c031dcaeb to your computer and use it in GitHub Desktop.
Save Abhinandan-Purkait/2825853a4499f21ff883ae5c031dcaeb to your computer and use it in GitHub Desktop.
I0614 09:28:32.931819       1 snapshot.go:114] Got add event for Snap zfspool/snapshot-67978615-6236-4fae-ac00-bf20ecceb50e
I0614 09:28:32.961458       1 zfs_util.go:699] created snapshot pvc-11ddae92-e2d5-440d-af3b-0e490d1c1b0b@snapshot-67978615-6236-4fae-ac00-bf20ecceb50e
I0614 09:28:32.966000       1 snapshot.go:243] Successfully synced 'openebs/snapshot-67978615-6236-4fae-ac00-bf20ecceb50e'
I0614 09:29:00.008370       1 zfsnode.go:100] zfs node controller: node pools updated current=[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:9040680448 scale:0} d:{Dec:<nil>} s:9040680448 Format:DecimalSI} Used:{i:{value:841099776 scale:0} d:{Dec:<nil>} s:841099776 Format:DecimalSI}}], required=[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:8200629760 scale:0} d:{Dec:<nil>} s: Format:BinarySI} Used:{i:{value:1681150464 scale:0} d:{Dec:<nil>} s: Format:BinarySI}}]
I0614 09:29:00.008424       1 zfsnode.go:110] zfs node controller: updating node object with &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:abhinandan-dev-vm GenerateName: Namespace:openebs SelfLink: UID:815b4d81-0bd5-4abd-bf86-1f003029fd8e ResourceVersion:20517 Generation:37 CreationTimestamp:2024-06-14 07:00:59 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[{APIVersion:v1 Kind:Node Name:abhinandan-dev-vm UID:978e0c67-6d8c-429a-9003-bf395c4a8915 Controller:0xc0005920e0 BlockOwnerDeletion:<nil>}] Finalizers:[] ManagedFields:[{Manager:zfs-driver Operation:Update APIVersion:zfs.openebs.io/v1 Time:2024-06-14 09:28:00 +0000 UTC FieldsType:FieldsV1 FieldsV1:{"f:metadata":{"f:ownerReferences":{".":{},"k:{\"uid\":\"978e0c67-6d8c-429a-9003-bf395c4a8915\"}":{}}},"f:pools":{}} Subresource:}]} Pools:[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:8200629760 scale:0} d:{Dec:<nil>} s: Format:BinarySI} Used:{i:{value:1681150464 scale:0} d:{Dec:<nil>} s: Format:BinarySI}}]}
I0614 09:29:00.013433       1 zfsnode.go:139] Got update event for zfs node openebs/abhinandan-dev-vm
I0614 09:29:00.013499       1 zfsnode.go:114] zfs node controller: updated node object openebs/abhinandan-dev-vm
I0614 09:30:33.796174       1 volume.go:123] Got add event for ZV zfspool/pvc-3ba41571-e703-40c4-8719-00e0013de608
I0614 09:30:33.846216       1 zfs_util.go:473] created clone zfspool/pvc-3ba41571-e703-40c4-8719-00e0013de608
I0614 09:30:33.851607       1 volume.go:254] Successfully synced 'openebs/pvc-3ba41571-e703-40c4-8719-00e0013de608'
I0614 09:31:00.010742       1 zfsnode.go:100] zfs node controller: node pools updated current=[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:8200629760 scale:0} d:{Dec:<nil>} s:8200629760 Format:DecimalSI} Used:{i:{value:1681150464 scale:0} d:{Dec:<nil>} s:1681150464 Format:DecimalSI}}], required=[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:8200602624 scale:0} d:{Dec:<nil>} s: Format:BinarySI} Used:{i:{value:1681177600 scale:0} d:{Dec:<nil>} s: Format:BinarySI}}]
I0614 09:31:00.010781       1 zfsnode.go:110] zfs node controller: updating node object with &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:abhinandan-dev-vm GenerateName: Namespace:openebs SelfLink: UID:815b4d81-0bd5-4abd-bf86-1f003029fd8e ResourceVersion:20669 Generation:38 CreationTimestamp:2024-06-14 07:00:59 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[{APIVersion:v1 Kind:Node Name:abhinandan-dev-vm UID:978e0c67-6d8c-429a-9003-bf395c4a8915 Controller:0xc00003a54f BlockOwnerDeletion:<nil>}] Finalizers:[] ManagedFields:[{Manager:zfs-driver Operation:Update APIVersion:zfs.openebs.io/v1 Time:2024-06-14 09:29:00 +0000 UTC FieldsType:FieldsV1 FieldsV1:{"f:metadata":{"f:ownerReferences":{".":{},"k:{\"uid\":\"978e0c67-6d8c-429a-9003-bf395c4a8915\"}":{}}},"f:pools":{}} Subresource:}]} Pools:[{Name:zfspool UUID:9597344077012506440 Free:{i:{value:8200602624 scale:0} d:{Dec:<nil>} s: Format:BinarySI} Used:{i:{value:1681177600 scale:0} d:{Dec:<nil>} s: Format:BinarySI}}]}
I0614 09:31:00.015331       1 zfsnode.go:114] zfs node controller: updated node object openebs/abhinandan-dev-vm
I0614 09:31:00.015457       1 zfsnode.go:139] Got update event for zfs node openebs/abhinandan-dev-vm

Restored PV Description

➜  zfs kubectl describe pv pvc-3ba41571-e703-40c4-8719-00e0013de608
Name:              pvc-3ba41571-e703-40c4-8719-00e0013de608
Labels:            <none>
Annotations:       pv.kubernetes.io/provisioned-by: zfs.csi.openebs.io
                   volsync.backube/populated-from: default/volsync-datavol-dest-dest-20240614092832
                   volume.kubernetes.io/provisioner-deletion-secret-name:
                   volume.kubernetes.io/provisioner-deletion-secret-namespace:
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      openebs-zfspv
Status:            Bound
Claim:             default/restored-pvc
Reclaim Policy:    Delete
Access Modes:      RWO
VolumeMode:        Filesystem
Capacity:          4Gi
Node Affinity:
  Required Terms:
    Term 0:        openebs.io/nodeid in [abhinandan-dev-vm]
Message:
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            zfs.csi.openebs.io
    FSType:            zfs
    VolumeHandle:      pvc-3ba41571-e703-40c4-8719-00e0013de608
    ReadOnly:          false
    VolumeAttributes:      openebs.io/cas-type=localpv-zfs
                           openebs.io/poolname=zfspool
                           storage.kubernetes.io/csiProvisionerIdentity=1718348463068-3913-zfs.csi.openebs.io
Events:                <none>

Restored PV's ZV Description

➜  zfs kubectl describe zv pvc-3ba41571-e703-40c4-8719-00e0013de608 -n openebs
Name:         pvc-3ba41571-e703-40c4-8719-00e0013de608
Namespace:    openebs
Labels:       kubernetes.io/nodename=abhinandan-dev-vm
Annotations:  <none>
API Version:  zfs.openebs.io/v1
Kind:         ZFSVolume
Metadata:
  Creation Timestamp:  2024-06-14T09:30:33Z
  Finalizers:
    zfs.openebs.io/finalizer
  Generation:        2
  Resource Version:  20854
  UID:               99bdc6b6-f4f0-47ef-96b7-401cea5f7a5c
Spec:
  Capacity:        4294967296
  Compression:     zstd-6
  Dedup:           off
  Fs Type:         zfs
  Owner Node ID:   abhinandan-dev-vm
  Pool Name:       zfspool
  Recordsize:      64k
  Snapname:        pvc-11ddae92-e2d5-440d-af3b-0e490d1c1b0b@snapshot-67978615-6236-4fae-ac00-bf20ecceb50e
  Thin Provision:  yes
  Volume Type:     DATASET
Status:
  State:  Ready
Events:   <none>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment