Skip to content

Commit

Permalink
Adding_Partprobe_cmd (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyamurthy authored Sep 13, 2023
1 parent f7f26c1 commit 76c6f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gofsutil_mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ func reReadPartitionTable(ctx context.Context, devicePath string) error {
if err := validatePath(path); err != nil {
return fmt.Errorf("Failed to validate path: %s error %v", devicePath, err)
}
args := []string{"--rereadpt", path}
_, err := exec.Command("blockdev", args...).CombinedOutput()
args := []string{path}
_, err := exec.Command("partprobe", args...).CombinedOutput()
if err != nil {
log.Errorf("Failed to execute blockdev on %s: %v", devicePath, err)
log.Errorf("Failed to execute partprobe on %s: %s", devicePath, err.Error())
return err
}
return nil
Expand Down

0 comments on commit 76c6f60

Please sign in to comment.