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 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html