mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
force-format xfs-filesystems too
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
parent
1e607a500f
commit
ca1d25d038
@ -30,7 +30,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
utilexec "k8s.io/utils/exec"
|
utilexec "k8s.io/utils/exec"
|
||||||
utilio "k8s.io/utils/io"
|
utilio "k8s.io/utils/io"
|
||||||
)
|
)
|
||||||
@ -439,6 +439,11 @@ func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target
|
|||||||
"-m0", // Zero blocks reserved for super-user
|
"-m0", // Zero blocks reserved for super-user
|
||||||
source,
|
source,
|
||||||
}
|
}
|
||||||
|
} else if fstype == "xfs" {
|
||||||
|
args = []string{
|
||||||
|
"-f", // force flag
|
||||||
|
source,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args)
|
klog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args)
|
||||||
|
Loading…
Reference in New Issue
Block a user