mirror of
https://github.com/rancher/os.git
synced 2025-09-02 07:15:41 +00:00
Auto resize root disk on AWS (#2191)
This commit is contained in:
@@ -184,7 +184,11 @@ func resizeDevice(cfg *rancherConfig.CloudConfig) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd = exec.Command("resize2fs", fmt.Sprintf("%s1", cfg.Rancher.ResizeDevice))
|
||||
targetPartition := fmt.Sprintf("%s1", cfg.Rancher.ResizeDevice)
|
||||
if strings.Contains(cfg.Rancher.ResizeDevice, "nvme") {
|
||||
targetPartition = fmt.Sprintf("%sp1", cfg.Rancher.ResizeDevice)
|
||||
}
|
||||
cmd = exec.Command("resize2fs", targetPartition)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
err = cmd.Run()
|
||||
|
Reference in New Issue
Block a user