* old raid0run
@ 2007-02-11 6:33 Marco Scoffier
2007-02-11 6:59 ` Michael Tokarev
0 siblings, 1 reply; 3+ messages in thread
From: Marco Scoffier @ 2007-02-11 6:33 UTC (permalink / raw)
To: linux-raid
Hello all,
I have an old raid0 with no superblocks.
I have just upgraded the machine with this raid and mdadm is incapable of
mounting it. Unfortunately raidtools will no longer compile*. So I am a
bit stuck as I would like to save the data on this raid0.
Can I create a new raid0 using mdadm ?
mdadm -C -n 2 -c 128 -l 0 /dev/md0 /dev/hde1 /dev/hdg1
or should I build a new raid0 and then upgrade that to a raid0 with
superblocks (how would I do that?)
Thanks for any pointers,
As there are no super-blocks mdadm is
giving very little information:
mdadm -E /dev/hde1
mdadm: No md superblock detected on /dev/hde1.
mdadm -E /dev/hdg1
mdadm: No md superblock detected on /dev/hdg1.
mdadm -As /dev/md0
mdadm: /dev/hde1 has no superblock - assembly aborted
the raidtab is clear:
# Sample raid-0 configuration
raiddev /dev/md0
raid-level 0 # it's not obvious but this *must* be
# right after raiddev
persistent-superblock 0 # set this to 1 if you want autostart,
# BUT SETTING TO 1 WILL DESTROY PREVIOUS
# CONTENTS if this is a RAID0 array created
# by older raidtools (0.40-0.51) or mdtools!
chunk-size 128
nr-raid-disks 2
nr-spare-disks 0
device /dev/hde1
raid-disk 0
device /dev/hdg1
raid-disk 1
--
Marco
* the raidtools compile error is some awfull stuff in a macro. There is a
bug report here: http://bugs.gentoo.org/show_bug.cgi?id=165917
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: old raid0run
2007-02-11 6:33 old raid0run Marco Scoffier
@ 2007-02-11 6:59 ` Michael Tokarev
2007-02-11 7:45 ` Marco Scoffier
0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2007-02-11 6:59 UTC (permalink / raw)
To: Marco Scoffier; +Cc: linux-raid
Marco Scoffier wrote:
> Hello all,
>
> I have an old raid0 with no superblocks.
>
> I have just upgraded the machine with this raid and mdadm is incapable of
> mounting it. Unfortunately raidtools will no longer compile*. So I am a
> bit stuck as I would like to save the data on this raid0.
>
> Can I create a new raid0 using mdadm ?
>
> mdadm -C -n 2 -c 128 -l 0 /dev/md0 /dev/hde1 /dev/hdg1
Well, mdadm is able to assemble it. It's called 'build' (--build) --
mdadm --build -n 2 -c 128 -l 0 /dev/md0 /dev/hde1 /dev/hdg1
> or should I build a new raid0 and then upgrade that to a raid0 with
> superblocks (how would I do that?)
I think the best option is to convert it to raid0-with-superblocks.
For that, I'd go this route:
- build the array as above
- fsck the filesystem on it
- resize the filesystem to be, say, 1Mb smaller
- stop the array
- create new array as you've shown above with -C
- and finally resize the filesystem to utilize all available space
Or something like that, anyway.
Sure, backing up data and restoring it after creating the array is
safer.
> Thanks for any pointers,
>
> As there are no super-blocks mdadm is
> giving very little information:
>
> mdadm -E /dev/hde1
> mdadm: No md superblock detected on /dev/hde1.
Well, it's expectable. -E = show superblock contents.
> mdadm -As /dev/md0
> mdadm: /dev/hde1 has no superblock - assembly aborted
Assembly needs devices with superblocks. Try -B.
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: old raid0run
2007-02-11 6:59 ` Michael Tokarev
@ 2007-02-11 7:45 ` Marco Scoffier
0 siblings, 0 replies; 3+ messages in thread
From: Marco Scoffier @ 2007-02-11 7:45 UTC (permalink / raw)
To: linux-raid
On Sun, 11 Feb 2007 09:59:29 +0300, Michael Tokarev wrote:
> Marco Scoffier wrote:
>> Hello all,
>>
>> I have an old raid0 with no superblocks.
>>
> Well, mdadm is able to assemble it. It's called 'build' (--build) --
>
> mdadm --build -n 2 -c 128 -l 0 /dev/md0 /dev/hde1 /dev/hdg1
>
Thanks for the clarification Micheal. Reading the docs, I got a little
confused about what --build was for.
>> or should I build a new raid0 and then upgrade that to a raid0 with
>> superblocks (how would I do that?)
>
> I think the best option is to convert it to raid0-with-superblocks. For
> that, I'd go this route:
>
> - build the array as above
> - fsck the filesystem on it
> - resize the filesystem to be, say, 1Mb smaller - stop the array -
> create new array as you've shown above with -C - and finally resize
> the filesystem to utilize all available space
>
Thanks for these steps. I am running them now.
Thanks for an amazingly fast and clear response.
--
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-11 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 6:33 old raid0run Marco Scoffier
2007-02-11 6:59 ` Michael Tokarev
2007-02-11 7:45 ` Marco Scoffier
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.