mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11952 from zexi/automated-cherry-pick-of-#11951-upstream-release-3.7
Automated cherry pick of #11951: fix(host-deployer): XFS uuid冲突 无法 mount
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/utils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/hostman/guestfs/kvmpart"
|
||||
"yunion.io/x/onecloud/pkg/util/fileutils2"
|
||||
"yunion.io/x/onecloud/pkg/util/procutils"
|
||||
"yunion.io/x/onecloud/pkg/util/regutils2"
|
||||
@@ -255,6 +256,11 @@ func ResizePartitionFs(fpath, fs string, raiseError bool) (error, bool) {
|
||||
}
|
||||
}
|
||||
FsckXfsFs(fpath)
|
||||
uuid := uuids["UUID"]
|
||||
if len(uuid) > 0 {
|
||||
kvmpart.LockXfsPartition(uuid)
|
||||
defer kvmpart.UnlockXfsPartition(uuid)
|
||||
}
|
||||
cmds = [][]string{{"mkdir", "-p", tmpPoint},
|
||||
{"mount", fpath, tmpPoint},
|
||||
{"sleep", "2"},
|
||||
|
||||
Reference in New Issue
Block a user