mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +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"
|
||||
"time"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/klog/v2"
|
||||
utilexec "k8s.io/utils/exec"
|
||||
utilio "k8s.io/utils/io"
|
||||
)
|
||||
@ -439,6 +439,11 @@ func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target
|
||||
"-m0", // Zero blocks reserved for super-user
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user