* [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount
@ 2013-11-12 17:13 Eric Sandeen
2013-11-13 12:59 ` Carlos Maiolino
2013-11-18 16:02 ` [PATCH V2] " Eric Sandeen
0 siblings, 2 replies; 8+ messages in thread
From: Eric Sandeen @ 2013-11-12 17:13 UTC (permalink / raw)
To: xfs-oss
How dangerous is dangerous?
We could offer the suggestion of a "-d" repair, if we're
in single-user mode with the root fs mounted readonly.
This change suggests -d to repair any RO mounted fs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/repair/init.c b/repair/init.c
index c3f380b..a7a7613 100644
--- a/repair/init.c
+++ b/repair/init.c
@@ -97,8 +97,17 @@ xfs_init(libxfs_init_t *args)
else
args->isreadonly = LIBXFS_EXCLUSIVELY;
- if (!libxfs_init(args))
+ if (!libxfs_init(args)) {
+ /* would -d be an option? */
+ if (!no_modify && !dangerously) {
+ args->isreadonly = (LIBXFS_ISINACTIVE |
+ LIBXFS_DANGEROUSLY);
+ if (libxfs_init(args))
+ fprintf(stderr,
+_("Unmount or use -d to repair a read-only mounted filesystem\n"));
+ }
do_error(_("couldn't initialize XFS library\n"));
+ }
ts_create();
increase_rlimit();
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-12 17:13 [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount Eric Sandeen
@ 2013-11-13 12:59 ` Carlos Maiolino
2013-11-14 18:55 ` Eric Sandeen
2013-11-18 16:02 ` [PATCH V2] " Eric Sandeen
1 sibling, 1 reply; 8+ messages in thread
From: Carlos Maiolino @ 2013-11-13 12:59 UTC (permalink / raw)
To: xfs
Hm, even in single user with a RO root filesystem, changing filesystem
on-disk filesystem structures without have them replied in memory looks
dangerous to me, you will keep data consistency since the fs is RO, but how
about memory? You might have a discrepancy between memory and disk metadata
contents causing in-memory only problems?
On Tue, Nov 12, 2013 at 11:13:17AM -0600, Eric Sandeen wrote:
> How dangerous is dangerous?
>
> We could offer the suggestion of a "-d" repair, if we're
> in single-user mode with the root fs mounted readonly.
>
> This change suggests -d to repair any RO mounted fs.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/repair/init.c b/repair/init.c
> index c3f380b..a7a7613 100644
> --- a/repair/init.c
> +++ b/repair/init.c
> @@ -97,8 +97,17 @@ xfs_init(libxfs_init_t *args)
> else
> args->isreadonly = LIBXFS_EXCLUSIVELY;
>
> - if (!libxfs_init(args))
> + if (!libxfs_init(args)) {
> + /* would -d be an option? */
> + if (!no_modify && !dangerously) {
> + args->isreadonly = (LIBXFS_ISINACTIVE |
> + LIBXFS_DANGEROUSLY);
> + if (libxfs_init(args))
> + fprintf(stderr,
> +_("Unmount or use -d to repair a read-only mounted filesystem\n"));
> + }
> do_error(_("couldn't initialize XFS library\n"));
> + }
>
> ts_create();
> increase_rlimit();
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
--
Carlos
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-13 12:59 ` Carlos Maiolino
@ 2013-11-14 18:55 ` Eric Sandeen
2013-11-17 19:56 ` Dave Chinner
0 siblings, 1 reply; 8+ messages in thread
From: Eric Sandeen @ 2013-11-14 18:55 UTC (permalink / raw)
To: xfs
On 11/13/13, 6:59 AM, Carlos Maiolino wrote:
> Hm, even in single user with a RO root filesystem, changing filesystem
> on-disk filesystem structures without have them replied in memory looks
> dangerous to me, you will keep data consistency since the fs is RO, but how
> about memory? You might have a discrepancy between memory and disk metadata
> contents causing in-memory only problems?
>
The possibility is already there; it's just a question of whether we
suggest using it. And my other patch suggests an immediate reboot
when it's done, for just those reasons.
A user needs some way to repair their root disk if they can't boot
a rescue environment... and ext2/3/4 have been doing this since forever.
I know, none of the above are exactly arguments that its' safe... :)
-Eric
> On Tue, Nov 12, 2013 at 11:13:17AM -0600, Eric Sandeen wrote:
>> How dangerous is dangerous?
>>
>> We could offer the suggestion of a "-d" repair, if we're
>> in single-user mode with the root fs mounted readonly.
>>
>> This change suggests -d to repair any RO mounted fs.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> diff --git a/repair/init.c b/repair/init.c
>> index c3f380b..a7a7613 100644
>> --- a/repair/init.c
>> +++ b/repair/init.c
>> @@ -97,8 +97,17 @@ xfs_init(libxfs_init_t *args)
>> else
>> args->isreadonly = LIBXFS_EXCLUSIVELY;
>>
>> - if (!libxfs_init(args))
>> + if (!libxfs_init(args)) {
>> + /* would -d be an option? */
>> + if (!no_modify && !dangerously) {
>> + args->isreadonly = (LIBXFS_ISINACTIVE |
>> + LIBXFS_DANGEROUSLY);
>> + if (libxfs_init(args))
>> + fprintf(stderr,
>> +_("Unmount or use -d to repair a read-only mounted filesystem\n"));
>> + }
>> do_error(_("couldn't initialize XFS library\n"));
>> + }
>>
>> ts_create();
>> increase_rlimit();
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-14 18:55 ` Eric Sandeen
@ 2013-11-17 19:56 ` Dave Chinner
2013-11-18 15:56 ` Eric Sandeen
0 siblings, 1 reply; 8+ messages in thread
From: Dave Chinner @ 2013-11-17 19:56 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Thu, Nov 14, 2013 at 12:55:37PM -0600, Eric Sandeen wrote:
> On 11/13/13, 6:59 AM, Carlos Maiolino wrote:
> > Hm, even in single user with a RO root filesystem, changing filesystem
> > on-disk filesystem structures without have them replied in memory looks
> > dangerous to me, you will keep data consistency since the fs is RO, but how
> > about memory? You might have a discrepancy between memory and disk metadata
> > contents causing in-memory only problems?
> >
>
> The possibility is already there; it's just a question of whether we
> suggest using it. And my other patch suggests an immediate reboot
> when it's done, for just those reasons.
If you make the suggestion of using -d, then it should mention at
that point in time it's dangerous.
> A user needs some way to repair their root disk if they can't boot
> a rescue environment... and ext2/3/4 have been doing this since forever.
>
> I know, none of the above are exactly arguments that its' safe... :)
Right, so let's make sure we don't give people any impression it is
safe :)
> >> +_("Unmount or use -d to repair a read-only mounted filesystem\n"));
_("Unmount or use the dangerous (-d) option to repair a read-only mounted filesystem\n"));
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-17 19:56 ` Dave Chinner
@ 2013-11-18 15:56 ` Eric Sandeen
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sandeen @ 2013-11-18 15:56 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On 11/17/13, 1:56 PM, Dave Chinner wrote:
<snip>
> Right, so let's make sure we don't give people any impression it is
> safe :)
>
>>>> +_("Unmount or use -d to repair a read-only mounted filesystem\n"));
>
> _("Unmount or use the dangerous (-d) option to repair a read-only mounted filesystem\n"));
Good idea, will send V2.
> Cheers,
>
> Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V2] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-12 17:13 [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount Eric Sandeen
2013-11-13 12:59 ` Carlos Maiolino
@ 2013-11-18 16:02 ` Eric Sandeen
2013-11-18 22:26 ` Dave Chinner
2013-12-03 14:42 ` Rich Johnston
1 sibling, 2 replies; 8+ messages in thread
From: Eric Sandeen @ 2013-11-18 16:02 UTC (permalink / raw)
To: Eric Sandeen, xfs-oss
We can offer the suggestion of a "-d" repair, if we're
in single-user mode with i.e. the root fs mounted readonly.
This change suggests -d to repair any RO mounted fs.
e2fsck allows this, and users are used to being able to
do it in single-user mode. A separate patch will recommend
a reboot after repair completes.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
V2: Now with more danger!
diff --git a/repair/init.c b/repair/init.c
index c3f380b..a7a7613 100644
--- a/repair/init.c
+++ b/repair/init.c
@@ -97,8 +97,17 @@ xfs_init(libxfs_init_t *args)
else
args->isreadonly = LIBXFS_EXCLUSIVELY;
- if (!libxfs_init(args))
+ if (!libxfs_init(args)) {
+ /* would -d be an option? */
+ if (!no_modify && !dangerously) {
+ args->isreadonly = (LIBXFS_ISINACTIVE |
+ LIBXFS_DANGEROUSLY);
+ if (libxfs_init(args))
+ fprintf(stderr,
+_("Unmount or use the dangerous (-d) option to repair a read-only mounted filesystem\n"));
+ }
do_error(_("couldn't initialize XFS library\n"));
+ }
ts_create();
increase_rlimit();
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V2] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-18 16:02 ` [PATCH V2] " Eric Sandeen
@ 2013-11-18 22:26 ` Dave Chinner
2013-12-03 14:42 ` Rich Johnston
1 sibling, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2013-11-18 22:26 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss
On Mon, Nov 18, 2013 at 10:02:05AM -0600, Eric Sandeen wrote:
> We can offer the suggestion of a "-d" repair, if we're
> in single-user mode with i.e. the root fs mounted readonly.
>
> This change suggests -d to repair any RO mounted fs.
>
> e2fsck allows this, and users are used to being able to
> do it in single-user mode. A separate patch will recommend
> a reboot after repair completes.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> V2: Now with more danger!
Exciting! Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2] xfsprogs: suggest "-d" option for repair of RO mount
2013-11-18 16:02 ` [PATCH V2] " Eric Sandeen
2013-11-18 22:26 ` Dave Chinner
@ 2013-12-03 14:42 ` Rich Johnston
1 sibling, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2013-12-03 14:42 UTC (permalink / raw)
To: Eric Sandeen, Eric Sandeen, xfs-oss
This has been committed.
Thanks
--Rich
commit 03091fc253963891c728cf362c0f9700294b6dfd
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Mon Nov 18 16:02:05 2013 +0000
xfsprogs: suggest "-d" option for repair of RO mount
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-12-03 14:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-12 17:13 [PATCH RFC] xfsprogs: suggest "-d" option for repair of RO mount Eric Sandeen
2013-11-13 12:59 ` Carlos Maiolino
2013-11-14 18:55 ` Eric Sandeen
2013-11-17 19:56 ` Dave Chinner
2013-11-18 15:56 ` Eric Sandeen
2013-11-18 16:02 ` [PATCH V2] " Eric Sandeen
2013-11-18 22:26 ` Dave Chinner
2013-12-03 14:42 ` Rich Johnston
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.