mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(resize): adding resize support for raw block volumes
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
8335440d4c
commit
88ad25ec9c
3 changed files with 25 additions and 3 deletions
|
|
@ -703,7 +703,7 @@ func GetVolumeDevPath(vol *apis.ZFSVolume) (string, error) {
|
|||
}
|
||||
|
||||
// ResizeZFSVolume resize volume
|
||||
func ResizeZFSVolume(vol *apis.ZFSVolume, mountpath string) error {
|
||||
func ResizeZFSVolume(vol *apis.ZFSVolume, mountpath string, resizefs bool) error {
|
||||
|
||||
volume := vol.Spec.PoolName + "/" + vol.Name
|
||||
args := buildVolumeResizeArgs(vol)
|
||||
|
|
@ -717,7 +717,11 @@ func ResizeZFSVolume(vol *apis.ZFSVolume, mountpath string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = handleVolResize(vol, mountpath)
|
||||
if resizefs == true {
|
||||
// resize the filesystem so that applications can use the expanded space
|
||||
err = handleVolResize(vol, mountpath)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue