linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using a disk image file as a device in a raid set (like a loopback device)
@ 2006-01-08 10:25 David Greaves
  2006-01-08 10:33 ` Brad Campbell
  2006-01-08 10:40 ` David Greaves
  0 siblings, 2 replies; 3+ messages in thread
From: David Greaves @ 2006-01-08 10:25 UTC (permalink / raw)
  To: Linux RAID Mailing List

Hi

First, this is not a raid recovery problem !!!

I'm recovering a disk failure and for various reasons I've ended up with
a partition that's too small to hold the file system that belongs in it.

I managed to create a second small partition on a good bit of the
failing disk and use linear mode to concatenate the almost big enough
partition (sdc2) with the temp partition (sdb2) to make a big enough
space to ddrescue the failing data.

All is now good with 95% of data on the good disk and the small
partition is holding up.  However I need to get rid of it ASAP.
So I dd'ed the small partition onto a good filesystem on sdc1.
Now I want to:

mdadm -B /dev/md0 -l linear -n2 /dev/sdc2 /space/sdb2.dd_image

but of course mdadm correctly complains that /space/sdb2.dd_image isn't
a block device.

Does anyone know how I can do this?


David

-- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using a disk image file as a device in a raid set (like a loopback device)
  2006-01-08 10:25 Using a disk image file as a device in a raid set (like a loopback device) David Greaves
@ 2006-01-08 10:33 ` Brad Campbell
  2006-01-08 10:40 ` David Greaves
  1 sibling, 0 replies; 3+ messages in thread
From: Brad Campbell @ 2006-01-08 10:33 UTC (permalink / raw)
  To: David Greaves; +Cc: Linux RAID Mailing List

David Greaves wrote:
> 
> mdadm -B /dev/md0 -l linear -n2 /dev/sdc2 /space/sdb2.dd_image
> 
> but of course mdadm correctly complains that /space/sdb2.dd_image isn't
> a block device.
> 
> Does anyone know how I can do this?

use the loopback device
man losetup

Good luck :)
Brad
-- 
"Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so." -- Douglas Adams

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using a disk image file as a device in a raid set (like a loopback device)
  2006-01-08 10:25 Using a disk image file as a device in a raid set (like a loopback device) David Greaves
  2006-01-08 10:33 ` Brad Campbell
@ 2006-01-08 10:40 ` David Greaves
  1 sibling, 0 replies; 3+ messages in thread
From: David Greaves @ 2006-01-08 10:40 UTC (permalink / raw)
  To: Linux RAID Mailing List

doh!

I'm so used to doing mount -oloop that I forgot how much it does for you :)

losetup /dev/loop0 /space/sdb2.dd_image
mdadm -B /dev/md0 -l linear -n2 /dev/sdc2 /dev/loop0

works fine.

Sorry for the noise

David


David Greaves wrote:

>Hi
>
>First, this is not a raid recovery problem !!!
>
>I'm recovering a disk failure and for various reasons I've ended up with
>a partition that's too small to hold the file system that belongs in it.
>
>I managed to create a second small partition on a good bit of the
>failing disk and use linear mode to concatenate the almost big enough
>partition (sdc2) with the temp partition (sdb2) to make a big enough
>space to ddrescue the failing data.
>
>All is now good with 95% of data on the good disk and the small
>partition is holding up.  However I need to get rid of it ASAP.
>So I dd'ed the small partition onto a good filesystem on sdc1.
>Now I want to:
>
>mdadm -B /dev/md0 -l linear -n2 /dev/sdc2 /space/sdb2.dd_image
>
>but of course mdadm correctly complains that /space/sdb2.dd_image isn't
>a block device.
>
>Does anyone know how I can do this?
>
>
>David
>
>  
>


-- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-08 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-08 10:25 Using a disk image file as a device in a raid set (like a loopback device) David Greaves
2006-01-08 10:33 ` Brad Campbell
2006-01-08 10:40 ` David Greaves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).