diff mbox

[2/6] btrfs-progs: let user know that devid can be used if path is missing

Message ID 1374773730-29957-3-git-send-email-anand.jain@oracle.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Anand Jain July 25, 2013, 5:35 p.m. UTC
When the device disappear the path goes missing,
and that will be the one of the reason that user
will replace the device.

The devid of the missing btrfs device can be
obtained using the new cli option
 btrfs fi show --kernel

And which can be used in the replace command.

---
btrfs replace start /dev/sdc /dev/sde /btrfs
Error: Unable to open device '/dev/sdc'
	Try using the devid instead of the path
---

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-replace.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/cmds-replace.c b/cmds-replace.c
index 6397bb5..08a369a 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -244,6 +244,7 @@  static int cmd_start_replace(int argc, char **argv)
 		if (fdsrcdev < 0) {
 			fprintf(stderr, "Error: Unable to open device '%s'\n",
 				srcdev);
+			fprintf(stderr, "\tTry using the devid instead of the path\n");
 			goto leave_with_error;
 		}
 		ret = fstat(fdsrcdev, &st);