xfs_{admin,repair},man5: tell the user to mount with nouuid for snapshots
PATCH 1/1 xfs_{admin,repair},man5: tell the user to mount with nouuid for snapshots
From: Darrick J. Wong <[email protected]>
Augment the messaging in xfs_admin and xfs_repair to advise the user to replay a dirty log on a snapshotted filesystem by mounting with nouuid if the origin filesystem is still mounted. A user accidentally zapped the log when trying to mount a backup snapshot because the instructions we gave them weren't sufficient.
--- db/sb.c | 9 +++++---- man/man5/xfs.5 | 5 +++++ repair/phase2.c | 9 +++++---- 3 files changed, 15 insertions(+), 8 deletions(-)
db/sb.c +5 -4
@@ -266,10 +266,11 @@ sb_logcheck(void)dbprintf (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running %s. If you are unable to mount the filesystem, then use\n" -"the xfs_repair -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" ), progname); +"re-running %s. If the filesystem is a snapshot of a mounted filesystem,\n" +"you may need to give mount the nouuid option. If you are unable to mount\n" +"the filesystem, then use the xfs_repair -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ), progname);return 0 ; }/* Log is clean */
man/man5/xfs.5 +5 -0
@@ -91,6 +91,11 @@ .SH DESCRIPTION and .BR xfsrestore (8) are recommended for making copies of XFS filesystems. +To mount a snapshot of an already-mounted filesystem, you may need to supply +the +.B nouuid +option to +.BR mount " (8)." .SH OPERATIONS Some functionality specific to the XFS filesystem is accessible to applications through the
repair/phase2.c +5 -4
@@ -72,10 +72,11 @@ zero_log(do_warn (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running xfs_repair. If you are unable to mount the filesystem, then use\n" -"the -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" )); +"re-running xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n" +"to mount the filesystem, then use the -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ));exit (2 ); } }
Quoted 10 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Augment the messaging in
xfs_adminandxfs_repairto advise the user to replay a dirty log on a snapshotted filesystem by mounting with nouuid if the origin filesystem is still mounted. A user accidentally zapped the log when trying to mount a backup snapshot because the instructions we gave them weren't sufficient.Reported-by Kjetil Torgrim Homme <[email protected]>Signed-off-by "Darrick J. Wong" <[email protected]>
Quoted 62 lines
--- db/sb.c | 9 +++++---- man/man5/xfs.5 | 5 +++++ repair/phase2.c | 9 +++++---- 3 files changed, 15 insertions(+), 8 deletions(-)db/sb.c +5
-4@@ -266,10 +266,11 @@ sb_logcheck(void)dbprintf (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running %s. If you are unable to mount the filesystem, then use\n" -"the xfs_repair -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" ), progname); +"re-running %s. If the filesystem is a snapshot of a mounted filesystem,\n" +"you may need to give mount the nouuid option. If you are unable to mount\n" +"the filesystem, then use the xfs_repair -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ), progname);return 0 ; }/* Log is clean */ man/man5/xfs.5 +5
-0@@ -91,6 +91,11 @@ .SH DESCRIPTION and .BR xfsrestore (8) are recommended for making copies of XFS filesystems. +To mount a snapshot of an already-mounted filesystem, you may need to supply +the +.B nouuid +option to +.BR mount " (8)." .SH OPERATIONS Some functionality specific to the XFS filesystem is accessible to applications through therepair/phase2.c +5
-4@@ -72,10 +72,11 @@ zero_log(do_warn (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running xfs_repair. If you are unable to mount the filesystem, then use\n" -"the -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" )); +"re-running xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n" +"to mount the filesystem, then use the -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ));exit (2 ); } }
Quoted 10 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Augment the messaging in
xfs_adminandxfs_repairto advise the user to replay a dirty log on a snapshotted filesystem by mounting with nouuid if the origin filesystem is still mounted. A user accidentally zapped the log when trying to mount a backup snapshot because the instructions we gave them weren't sufficient.Reported-by Kjetil Torgrim Homme <[email protected]>Signed-off-by "Darrick J. Wong" <[email protected]>
Quoted 63 lines
--- db/sb.c | 9 +++++---- man/man5/xfs.5 | 5 +++++ repair/phase2.c | 9 +++++---- 3 files changed, 15 insertions(+), 8 deletions(-)db/sb.c +5
-4@@ -266,10 +266,11 @@ sb_logcheck(void)dbprintf (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running %s. If you are unable to mount the filesystem, then use\n" -"the xfs_repair -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" ), progname); +"re-running %s. If the filesystem is a snapshot of a mounted filesystem,\n" +"you may need to give mount the nouuid option. If you are unable to mount\n" +"the filesystem, then use the xfs_repair -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ), progname);return 0 ; }/* Log is clean */ man/man5/xfs.5 +5
-0@@ -91,6 +91,11 @@ .SH DESCRIPTION and .BR xfsrestore (8) are recommended for making copies of XFS filesystems. +To mount a snapshot of an already-mounted filesystem, you may need to supply +the +.B nouuid +option to +.BR mount " (8)." .SH OPERATIONS Some functionality specific to the XFS filesystem is accessible to applications through therepair/phase2.c +5
-4@@ -72,10 +72,11 @@ zero_log(do_warn (_ ("ERROR: The filesystem has valuable metadata changes in a log which needs to\n" "be replayed. Mount the filesystem to replay the log, and unmount it before\n" -"re-running xfs_repair. If you are unable to mount the filesystem, then use\n" -"the -L option to destroy the log and attempt a repair.\n" -"Note that destroying the log may cause corruption -- please attempt a mount\n" -"of the filesystem before doing this.\n" )); +"re-running xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n" +"to mount the filesystem, then use the -L option to destroy the log and\n" +"attempt a repair. Note that destroying the log may cause corruption --\n" +"please attempt a mount of the filesystem before doing this.\n" ));exit (2 ); } }
Quoted 2 lines · Darrick J. Wong
+"re-running
xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n"
mega nitpick: it looks like a space was missing before 'If'
Quoted 1 line
+"to mount the filesystem, then use the -L option to destroy the log and\n"
Quoted 5 lines · John Garry
Quoted 2 lines · Darrick J. Wong
+"re-running
xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n"mega nitpick: it looks like a space was missing before 'If'
will fix it when applying
Quoted 3 lines
Quoted 2 lines
+"to mount the filesystem, then use the -L option to destroy the log and\n"
Signature · 1 line
- Andrey
Quoted 8 lines · Andrey Albershteyn
Quoted 5 lines · John Garry
Quoted 2 lines · Darrick J. Wong
+"re-running
xfs_repair. If the filesystem is a snapshot of a mounted\n" +"filesystem, you may need to give mount the nouuid option.If you are unable\n"mega nitpick: it looks like a space was missing before 'If'
will fix it when applying
Cool, thank you!
--D
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
+"to mount the filesystem, then use the -L option to destroy the log and\n"
Signature · 1 line
- Andrey