Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
Василий Толстов 2015-06-30 16:04:41 +03:00
parent 8e1ce09b0d
commit 52fc61f2d1

View File

@ -159,10 +159,17 @@ func ResizeRootFS() error {
if err != nil {
return err
}
err = ioctl.BlkRRPart(w.Fd())
w.Close()
err = w.Sync()
if err != nil {
return err
}
blkerr := ioctl.BlkRRPart(w.Fd())
err = w.Close()
if err != nil {
return err
}
if blkerr != nil {
args := []string{}
for _, name := range []string{"partx", "partprobe", "kpartx"} {
if _, err = exec.LookPath(name); err == nil {