mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-31 21:12:07 +08:00
fix: do not resize LVM paritition and skip and return success
This commit is contained in:
@@ -207,6 +207,10 @@ func (d *SLibguestfsDriver) Zerofree() {
|
||||
}
|
||||
|
||||
func (d *SLibguestfsDriver) ResizePartition() error {
|
||||
if d.IsLVMPartition() {
|
||||
// do not try to resize LVM partition
|
||||
return nil
|
||||
}
|
||||
return fsutils.ResizeDiskFs(d.nbddev, 0)
|
||||
}
|
||||
|
||||
|
||||
@@ -241,6 +241,10 @@ func (d *NBDDriver) FormatPartition(fs, uuid string) error {
|
||||
}
|
||||
|
||||
func (d *NBDDriver) ResizePartition() error {
|
||||
if d.IsLVMPartition() {
|
||||
// do not resize LVM partition
|
||||
return nil
|
||||
}
|
||||
return fsutils.ResizeDiskFs(d.nbdDev, 0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user