From: Valerie Aurora <vaurora@redhat.com>
To: Andrea Gelmini <andrea.gelmini@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Union mount of block devices?
Date: Mon, 16 Nov 2009 16:16:36 -0500 [thread overview]
Message-ID: <20091116211636.GC13403@shell> (raw)
In-Reply-To: <9cdbb57f0911130528r3504efe2y55eb2bb4ab748568@mail.gmail.com>
On Fri, Nov 13, 2009 at 02:28:42PM +0100, Andrea Gelmini wrote:
> Hi all,
> sorry to bother the ml but I'm not able to find the answer via Google.
> Quick answer: is it possibile to stack block devices as union
> mount? Something like /dev/sdb1 (ro) below /dev/sdc1 (rw)?
>
> Long story...
> I've got a partition with the begin of the journal over a few bad
> blocks (by the way, it's NTFS but it doesn't matter), so it is not
> possible to fix/replay journal, and so on.
> I can dd/dd_rescue the partition to file/partition and fix/recover
> all, but I just need to suck some files, so it would be a lot
> easier/quicker
> to stack a good partition (rw) over the bad one (ro).
The phrase "union mount" caught my eye, but it's not what you want. :)
Union mounts merge file systems at the namespace level, not the block
or byte level of individual files.
You can try something like this to get what you describe above:
* Create a file big enough to cover the bad blocks
* Turn it into a loop device
* Create a loop device out of the good portion of your original block
device using the "-o <offset>" argument to losetup
* Use md or whatever to concatenate the two together
There will be annoying issues with headers and alignment. If you can
find a userspace recovery tool, you'll probably be a lot better off.
-VAL
prev parent reply other threads:[~2009-11-16 21:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 13:28 Union mount of block devices? Andrea Gelmini
2009-11-16 21:16 ` Valerie Aurora [this message]
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=20091116211636.GC13403@shell \
--to=vaurora@redhat.com \
--cc=andrea.gelmini@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
/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 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.