Re: raidtools to mdadm

2007-04-04 Thread Bill Davidsen

Casey Boone wrote:
ok so i am trying to recover some data for a friend.  what i am 
wanting to do is forcibly set up /dev/mdN to be a raid0 of /dev/sda 
and /dev/sdb


i do not want to actually change any of the contents of these drives, 
just mount very simply as a raid0.  the raid was originally created 
using an onboard nvidia raid on the motherboard these drives used to 
be hooked to.  my friend thought he could shove them into another 
windows box (that is what he was running on them) and have windows 
recover the raid.  all this did was totally destroy the superblock on 
one of the two drives.  dmraid now wont see them as a matched pair so 
that is out.  the actual data areas of both drives seems to be intact, 
but unless i can get them into raid0 i dont know how i can recover the 
data.  it figures he gives me the drives after he makes it a notch or 
two more of a pain :\



I have friends like that too. ;-)



now before the advent of mdadm i would use /etc/raidtab and have no 
issues setting up the raid device. \


I haven't used raidtools for ages, but can't you bring yourself to using 
them now? I seem to remember that there was no superblock to be written 
in a bad place, which might be an advantage. mdadm has several versions 
which write the superblock in various places on the drives, and you may 
want none of the above.


Alternatively, if these are fairly small, write a tiny program to open 
both physical devices, read a chunk from one, then the other, repeat 
while writing to something not hosed.



as best i can tell i am using the correct commands for what i want but 
i pretty much get nothing but errors:


[EMAIL PROTECTED]:/media# mdadm --build /dev/md1 --chunk=128 --level=0 
--raid-devices=2 /dev/sda /dev/sdb

mdadm: error opening /dev/md1: No such device or address
[EMAIL PROTECTED]:/media# mdadm --build -n 2 -c 128 -l 0 /dev/md1 /dev/sda 
/dev/sdb

mdadm: error opening /dev/md1: No such device or address


when i run those commands i do get /dev/mdN entries created, but they 
do not point to a valid block device (as tested with fdisk -l and with 
dmraid -b)



for the life of me i dont understand why anyone would put important 
data on a raid0, but that is what happened in this case.



If i have to i will drop down to an older knoppix release to get 
raidtools back, as i have never had any issues in recovering crap 
onboard raid arrays nor windows software raid arrays under it.  i am 
sure it can be done with mdadm but for the life of me i cannot seem to 
figure out exactly how.


any help on this would be greatly appreciated

Casey 



--
bill davidsen [EMAIL PROTECTED]
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: raidtools to mdadm

2007-04-04 Thread Casey Boone


i do not want to actually change any of the contents of these drives, 
just mount very simply as a raid0.  the raid was originally created 
using an onboard nvidia raid on the motherboard these drives used to 
be hooked to.  my friend thought he could shove them into another 
windows box (that is what he was running on them) and have windows 
recover the raid.  all this did was totally destroy the superblock on 
one of the two drives.  dmraid now wont see them as a matched pair so 
that is out.  the actual data areas of both drives seems to be 
intact, but unless i can get them into raid0 i dont know how i can 
recover the data.  it figures he gives me the drives after he makes 
it a notch or two more of a pain :\



I have friends like that too. ;-)



gotta love 'em

wish i was getting paid for this one





now before the advent of mdadm i would use /etc/raidtab and have no 
issues setting up the raid device. \


I haven't used raidtools for ages, but can't you bring yourself to 
using them now? I seem to remember that there was no superblock to be 
written in a bad place, which might be an advantage. mdadm has several 
versions which write the superblock in various places on the drives, 
and you may want none of the above.


Alternatively, if these are fairly small, write a tiny program to open 
both physical devices, read a chunk from one, then the other, repeat 
while writing to something not hosed.



at the suggestion of another on the list (thanks neil brown!) i tried 
modprobing a slew of things related to the disk mapper to no avail, then 
i gave up using knoppix and tried with a fedora 6 box (after i dd-ed the 
drives off to a larger drive) and it worked great.  i can definitely say 
that while mdadm is quite foreign territory for me, i love the fact i 
can specify everything i want to happen on one command line.


btw once i actually did get the drives raided it turns out that while 
the partition table was intact, somehow the partition itself was 
fubarred enough that i couldnt mount it to save my life.  finally just 
told the guy you screwed it by trying to recover it, next time bring me 
the drives the MOMENT you have a problem


Casey


-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


raidtools to mdadm

2007-04-01 Thread Casey Boone
ok so i am trying to recover some data for a friend.  what i am wanting 
to do is forcibly set up /dev/mdN to be a raid0 of /dev/sda and /dev/sdb


i do not want to actually change any of the contents of these drives, 
just mount very simply as a raid0.  the raid was originally created 
using an onboard nvidia raid on the motherboard these drives used to be 
hooked to.  my friend thought he could shove them into another windows 
box (that is what he was running on them) and have windows recover the 
raid.  all this did was totally destroy the superblock on one of the two 
drives.  dmraid now wont see them as a matched pair so that is out.  the 
actual data areas of both drives seems to be intact, but unless i can 
get them into raid0 i dont know how i can recover the data.  it figures 
he gives me the drives after he makes it a notch or two more of a pain :\



now before the advent of mdadm i would use /etc/raidtab and have no 
issues setting up the raid device.



as best i can tell i am using the correct commands for what i want but i 
pretty much get nothing but errors:


[EMAIL PROTECTED]:/media# mdadm --build /dev/md1 --chunk=128 --level=0 
--raid-devices=2 /dev/sda /dev/sdb

mdadm: error opening /dev/md1: No such device or address
[EMAIL PROTECTED]:/media# mdadm --build -n 2 -c 128 -l 0 /dev/md1 /dev/sda 
/dev/sdb

mdadm: error opening /dev/md1: No such device or address


when i run those commands i do get /dev/mdN entries created, but they do 
not point to a valid block device (as tested with fdisk -l and with 
dmraid -b)



for the life of me i dont understand why anyone would put important data 
on a raid0, but that is what happened in this case.



If i have to i will drop down to an older knoppix release to get 
raidtools back, as i have never had any issues in recovering crap 
onboard raid arrays nor windows software raid arrays under it.  i am 
sure it can be done with mdadm but for the life of me i cannot seem to 
figure out exactly how.


any help on this would be greatly appreciated

Casey
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: raidtools to mdadm

2007-04-01 Thread Neil Brown
On Sunday April 1, [EMAIL PROTECTED] wrote:
 as best i can tell i am using the correct commands for what i want but i 
 pretty much get nothing but errors:
 
 [EMAIL PROTECTED]:/media# mdadm --build /dev/md1 --chunk=128 --level=0 
 --raid-devices=2 /dev/sda /dev/sdb
 mdadm: error opening /dev/md1: No such device or address

No such device or address probably means that the md module is not
loaded. 
  modprobe md
or
  modprobe md_mod

and try again.

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Changing partition types safe? raidtools to mdadm migration

2007-03-09 Thread Neil Brown
On Thursday March 8, [EMAIL PROTECTED] wrote:
 
 So I should be safe in just removing the raidtools package and
 installing mdadm?
 

Possibly.
A significant difference is the way arrays are assembled at boot time.
raidtools depended on raidstart (which never worked reliably and
doesn't work at all with recent kernels) or type-FD partitions, 
which I assume you weren't using.

mdadm has a lot more flexibility.  You can still use type-FD
partitions if you want, or you create /etc/mdadm.conf with roughly the
output of 
   mdadm -Ds

though it is worth understanding the contents of that file and making
sure it is what you want.

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Changing partition types safe? raidtools to mdadm migration

2007-03-08 Thread Simon Matthews

I have a working RAID1 set. This is in a Gentoo system and I
configured the RAID set using raidtools. I see that Raidtools are now
deprecated in favor of mdadm.

I installed mdadm, but it does not recognize my raid set. I tried the
following command (note that my RAID set is active while I do this):
$   mdadm /dev/md0 --query --detail

This results in no output.  I believe this is because I forgot to
change the partition types on the partitions that make up the RAID set
(/dev/sda1 and /dev/sdb1) to type fd (they are the default type 82).

Can I safely change the partition types to fd on the partions that
make up my RAID set?

Or is there something else I should do to get mdadm to recognize my RAID set?

Regards,
Simon
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Changing partition types safe? raidtools to mdadm migration

2007-03-08 Thread Simon Matthews

Neil,


On 3/8/07, Neil Brown [EMAIL PROTECTED] wrote:

On Thursday March 8, [EMAIL PROTECTED] wrote:
 I have a working RAID1 set. This is in a Gentoo system and I
 configured the RAID set using raidtools. I see that Raidtools are now
 deprecated in favor of mdadm.

 I installed mdadm, but it does not recognize my raid set. I tried the
 following command (note that my RAID set is active while I do this):
 $   mdadm /dev/md0 --query --detail

Try
  mdadm --detail /dev/md0


Looks good:

# mdadm --detail /dev/md0
/dev/md0:
   Version : 00.90.03
 Creation Time : Sat Oct 15 16:20:52 2005
Raid Level : raid1
Array Size : 198153664 (188.97 GiB 202.91 GB)
 Used Dev Size : 198153664 (188.97 GiB 202.91 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 0
   Persistence : Superblock is persistent

   Update Time : Thu Mar  8 23:15:38 2007
 State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0

  UUID : de2ca4d0:7a3f6d57:d6751dc4:a51265e3
Events : 0.12491522

   Number   Major   Minor   RaidDevice State
  0   8   180  active sync   /dev/sdb2





If that doesn't work, what about
  cat /proc/mdadm


 This results in no output.  I believe this is because I forgot to
 change the partition types on the partitions that make up the RAID set
 (/dev/sda1 and /dev/sdb1) to type fd (they are the default type 82).

It has nothing to do with partition types.


 Can I safely change the partition types to fd on the partions that
 make up my RAID set?

It is perfectly safe to change partition type.


So I should be safe in just removing the raidtools package and
installing mdadm?

Regards,
Simon
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Changing partition types safe? raidtools to mdadm migration

2007-03-08 Thread Simon Matthews

Neil,



On 3/8/07, Simon Matthews [EMAIL PROTECTED] wrote:

Number   Major   Minor   RaidDevice State
   0   8   180  active sync   /dev/sdb2


I missed one line from the above:
  1   821  active sync   /dev/sda2


Simon
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html