Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(resize): adding Online volume expansion support for ZFSPV #51

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Mar 2, 2020

We can resize the volume by updating the PVC yaml to
the desired size and apply it. The ZFS Driver will take care
of updating the quota in case of dataset. If we are using a
Zvol and have mounted it as ext2/3/4 or xfs filesystem, the driver will take
care of expanding the volume via reize2fs/xfs_growfs binaries.

For resize, storageclass that provisions the pvc must support resize. We should have allowVolumeExpansion as true in storageclass

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-zfspv
allowVolumeExpansion: true
parameters:
  poolname: "zfspv-pool"
provisioner: zfs.csi.openebs.io

```

Signed-off-by: Pawan pawan@mayadata.io

@pawanpraka1 pawanpraka1 requested a review from kmova March 2, 2020 16:04
@pawanpraka1 pawanpraka1 changed the title [WIP] feat(resize): adding Online volume expansion support for ZFSPV feat(resize): adding Online volume expansion support for ZFSPV Mar 2, 2020
return nil
}

// HandleVolResize resizes the filesystem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does resize get handled for ZFS datasets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for zfs dataset, we just have to set the quota, nothing else needs to be done.

@codecov-io
Copy link

codecov-io commented Mar 3, 2020

Codecov Report

Merging #51 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #51   +/-   ##
=======================================
  Coverage   23.57%   23.57%           
=======================================
  Files          14       14           
  Lines         475      475           
=======================================
  Hits          112      112           
  Misses        362      362           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc5edb9...ad99a8f. Read the comment docs.

We can resize the volume by updating the PVC yaml to
the desired size and apply it. The ZFS Driver will take care
of updating the quota in case of dataset. If we are using a
Zvol and have mounted it as ext4 or xfs filesystem, the driver will take
care of expanding the volume via reize2fs/xfs_growfs binaries.

For resize, storageclass that provisions the pvc must suppo
rt resize. We should have allowVolumeExpansion as true in storageclass

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-zfspv
allowVolumeExpansion: true
parameters:
  poolname: "zfspv-pool"
provisioner: zfs.csi.openebs.io

```

Signed-off-by: Pawan <pawan@mayadata.io>
@kmova kmova merged commit 86e623a into openebs:master Mar 4, 2020
@kmova kmova added this to Done in ZFS Local PV via automation Mar 4, 2020
@kmova kmova added this to Done in 1.8 Release Tracker - Due Mar 15th. via automation Mar 4, 2020
@pawanpraka1 pawanpraka1 deleted the resize branch March 4, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
ZFS Local PV
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants