From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl-Daniel Hailfinger Subject: Re: read-only drive with reiserfs partiton not mountable Date: Thu, 03 Jul 2003 22:44:23 +0200 Message-ID: <3F0495A7.3070704@gmx.net> References: <3F046341.8000408@ncsu.edu> <3F04668C.8090603@gmx.net> <3F046798.7070906@gmx.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: <3F046798.7070906@gmx.net> List-Id: Content-Type: text/plain; charset="us-ascii" To: ReiserFS List Cc: Joel Ebel Carl-Daniel Hailfinger wrote: > [Sorry, I hit send a bit too early] > Carl-Daniel Hailfinger wrote: > >>Joel Ebel wrote: >> >> >>>Ok. I've got an unusual problem. My hard drive decided yesterday to >>> turn read-only. I can't write anything to it. The data seems to be >>>all there and readable, but any write to the drive fails. I have >>>partitions of NTFS, FAT32, ext3, and reiserfs. I'm able to mount all >>> the other partitions and copy files off of them, but the reiserfs >>>partition refuses to mount saying wrong fs type, bad superblock, >>>etc... Is there a reason that a reiserfs partition on a read-only >>>drive wouldn't mount? I'd sure like to get what data I can off of >>>it. Any ideas? >> >> >>Use UML (user-mode Linux) and arrange for writable backing store on >>another fs. > > > To be more clear, the block device with reiserfs is the base for a COW > (copy on write) device which can be used under UML. For the writes, you > need to provide a file on a writable fs which will store the differences. > ReiserFS inside the UML will not notice the fact that you tricked it. If /dev/hdb8 is your read-only filesystem, try this: ./linux ubd1=reiser_cow,/dev/hdb8 and once you have booted the linux instance, mount /dev/ubd1 /mnt Another option is to copy the partition to a file on a writable fs and loop mount it from there. dd if=/dev/hdb8 of=/tmp/fsbackup mount -o loop /tmp/fsbackup /mnt The last option for coping with a readonly disk is to copy it over completely with dd. Assuming /dev/hdb is your damaged disk and /dev/hdc is your new shiny IDENTICAL model, you can also dd if=/dev/hdb of=/dev/hdc Note: If you are someone longing for SPEED, you can add bs=1M to the dd commands. That should help quite a bit. HTH, Carl-Daniel -- http://www.hailfinger.org/