From: Milan Broz <gmazyland@gmail.com>
To: Dennis Birkholz <dm-crypt@dennis.birkholz.biz>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] Toggle read-only status of mapping
Date: Thu, 25 Oct 2012 17:20:42 +0200 [thread overview]
Message-ID: <508958CA.800@gmail.com> (raw)
In-Reply-To: <508951B8.9050300@dennis.birkholz.biz>
On 10/25/2012 04:50 PM, Dennis Birkholz wrote:
> Am 25.10.2012 12:15, schrieb Milan Broz:
> The reason is relatively easy: if my raid is read-only, it can crash and
> I can reassemble it without a problem, but I cannot make it read-only if
> the crypt-mapping is read-write.
If you raid is mapped read-write, and there is a device failure, it either
continue to be read-write (in degraded mode, that's exactly what "redundant"
in RAID means) or the array is lost completely (then you must deactivate
mapped device anyway).
And raid allows resync while read-write so I really do not see real
use for this switch.
(And even read-only fs mount sometime means filesystem journal reply,
specifically after fs crash.)
Anyway, it is easily to be done with dmsetup:
NAME=<your crypt device name>
# load identical but read-only table into inactive slot
dmsetup reload $NAME --readonly --table "$(dmsetup table --showkeys $NAME)"
# switch tables
dmsetup resume $NAME
Milan
next prev parent reply other threads:[~2012-10-25 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 4:55 [dm-crypt] Toggle read-only status of mapping Dennis Birkholz
2012-10-25 10:15 ` Milan Broz
2012-10-25 14:50 ` Dennis Birkholz
2012-10-25 15:20 ` Milan Broz [this message]
2012-10-25 17:10 ` Dennis Birkholz
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=508958CA.800@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@dennis.birkholz.biz \
--cc=dm-crypt@saout.de \
/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