From: Alexey Fisher <bug-track@fisher-privat.net>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Greg Freemyer <greg.freemyer@gmail.com>,
Ted Augustine <taugustine@techpathways.com>,
linux-ext4@vger.kernel.org
Subject: Re: xt4 - True Readonly mount [WAS - Re: [Bug 14354] Bad corruption with 2.6.32-rc1 and upwards]
Date: Fri, 30 Oct 2009 17:52:25 +0100 [thread overview]
Message-ID: <1256921545.3145.51.camel@mini> (raw)
In-Reply-To: <4AEB10DF.6090106@redhat.com>
Am Freitag, den 30.10.2009, 11:14 -0500 schrieb Eric Sandeen:
> Alexey Fisher wrote:
> > Am Freitag, den 30.10.2009, 10:14 -0500 schrieb Eric Sandeen:
>
> ...
>
> >> After a little brief digging I'm not sure when the xfs mount option went
> >> in or why...
> >>
> >> But for both
> >>
> >> xfs: mount -o ro,norecovery
> >>
> >> and
> >>
> >> ext[34]: mount -o ro,noload
> >>
> >> I don't think either one should touch the disk.
> >>
> >> Also, both should skip journal replay if you set the block device
> >> readonly prior to mount (hdparm -r can do this).
> >
> > Interesting tip, thank you.
> > But there is some problems:
> > 1. "hdparm -r" will set complete drive to ro mode. This is bad if i
> > use /dev/sda1 for root and /dev/sda5 need to be forced readonly.
>
> So point it at the partition not the drive:
>
> [root@neon ~]# hdparm -r 1 /dev/sda1
>
> /dev/sda1:
> setting readonly to 1 (on)
> readonly = 1 (on)
> [root@neon ~]# hdparm -r /dev/sda2
>
> /dev/sda2:
> readonly = 0 (off)
>
> It doesn't change the hardware, it sets a flag on the kernel's block
> device structure.
ok, got it. Every day learning something new.
It was not clear for me, after i read man hdparm: "Get/set read-only
flag for the device. When set, Linux disallows write operations on
the device."
> > 2. the fact xfs and ext[3,4] use different options for true_ro make
> > things complicated.
>
> the hazards of being an open source sysadmin I guess.
:( are there any plans to unify mount options?
> > 3. the definition of ro is broken.
>
> depends on what you mean by ro. A user can only read from the
> filesystem so it is accurate in that respect. Is "ro" for the fs or the
> bdev? Semantic differences but not necessarily broken.
Hmm... bdev. any chance to do temporary recovery and load it as external
journal if ro used? Anyway, you already pointed me to hdparm, so i can
use it too.
> > 4. many frustrated admins who mounted part of raid1 only with "-o ro"
>
> Dunno what you mean by that ...
raid1 is down, so you need for some reasons to mount ro only one disk of
the array. Needed to do it for short time (i used -o ro), now i know
this probably was a bad idea (bad me, should read documentation). Need
to check my raid now. Suddenly i'm not alone who doing this :(
> -Eric
>
> > Regards,
> > Alexey
Eric, Greg,
Thank you
Regards,
Alexey.
next prev parent reply other threads:[~2009-10-30 16:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 14:20 xt4 - True Readonly mount [WAS - Re: [Bug 14354] Bad corruption with 2.6.32-rc1 and upwards] Greg Freemyer
2009-10-30 15:14 ` Eric Sandeen
2009-10-30 15:31 ` Alexey Fisher
2009-10-30 16:14 ` Eric Sandeen
2009-10-30 16:52 ` Alexey Fisher [this message]
2009-10-30 17:13 ` Eric Sandeen
2009-10-30 17:43 ` Duane Griffin
2009-10-30 15:47 ` Alexey Fisher
2009-11-01 5:45 ` Theodore Tso
2009-11-02 21:59 ` Greg Freemyer
2009-11-02 22:53 ` Andreas Dilger
2009-11-02 23:02 ` Eric Sandeen
2009-11-04 8:05 ` Andreas Dilger
2009-11-04 16:20 ` Eric Sandeen
2009-11-03 13:52 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256921545.3145.51.camel@mini \
--to=bug-track@fisher-privat.net \
--cc=greg.freemyer@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=taugustine@techpathways.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox