diff --git a/cmd/torusblk/aoe.go b/cmd/torusblk/aoe.go index e94a9b3..cee0d35 100644 --- a/cmd/torusblk/aoe.go +++ b/cmd/torusblk/aoe.go @@ -116,7 +116,10 @@ func aoeAction(cmd *cobra.Command, args []string) error { if err = as.Serve(ai); err != nil { return fmt.Errorf("Failed to serve AoE: %v", err) } - return nil + + // aoe creates the block device as /dev/etherd/e... + // Calling flush() here cleans up the device each time process finished. + return flush(fmt.Sprintf("e%d.%d", minor, major)) } func flush(d string) error {