Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using livecd, mdadm to recover data from a software raid(5)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Sat Jun 24, 2006 9:44 am    Post subject: Using livecd, mdadm to recover data from a software raid(5) Reply with quote

Hi I need to get data off a software raid(5). I know the partition layout & the file system type. I want to boot up into gentoo's live cd then bind the devices together.


/dev/hda1 /dev/hdb1 /dev/hdc1 /dev/hdd1

becomes

/dev/md0


Then I was hoping to connect to the network and transfer the files off the raid array. Can this be done? Thanks

fintan.
Back to top
View user's profile Send private message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Sat Jun 24, 2006 12:03 pm    Post subject: Reply with quote

Here's what I got so far. The first device, lets say

hda1 has a file system of ext2 and is the boot partition.
hda2 is the root partition & is xfs.
hda3 is an extended partition
hda4 ?
hda5 is swap
hda6 ?

I have the log files & the raidtab. I'll post it in a minute.
Back to top
View user's profile Send private message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Sat Jun 24, 2006 12:11 pm    Post subject: Reply with quote

raidtab

Code:

raiddev   /dev/md0
  raid-level      5
  nr-raid-disks           3
  nr-spare-disks          1
  persistent-superblock   1
  chunk-size              64
  device                /dev/hda4
  raid-disk             0
  device                /dev/hde4
  raid-disk             1
  device                /dev/hdg4
  raid-disk             2
  device                /dev/hdc4
  spare-disk             0



raidsettab

Code:

/dev/md0 volgr0 1037693079 338432.000000/0 0 md0


rootraidtab

Code:

raiddev /dev/md100root
   raid-level 1
   nr-raid-disks 12
   nr-spare-disks 0
   persistent-superblock 1
   chunk-size 32
   device /dev/hda2
   raid-disk 0
   device /dev/hdc2
   raid-disk 1
   device /dev/hde2
   raid-disk 2
   device /dev/hdg2
   raid-disk 3
   device /dev/hdi2
   raid-disk 4
   device /dev/hdk2
   raid-disk 5
   device /dev/hdm2
   raid-disk 6
   device /dev/hdo2
   raid-disk 7
   device /dev/hdq2
   raid-disk 8
   device /dev/hds2
   raid-disk 9
   device /dev/hdu2
   raid-disk 10
   device /dev/hdw2
   raid-disk 11

raiddev /dev/md101swap
   raid-level 1
   nr-raid-disks 12
   nr-spare-disks 0
   persistent-superblock 1
   chunk-size 32
   device /dev/hda5
   raid-disk 0
   device /dev/hdc5
   raid-disk 1
   device /dev/hde5
   raid-disk 2
   device /dev/hdg5
   raid-disk 3
   device /dev/hdi5
   raid-disk 4
   device /dev/hdk5
   raid-disk 5
   device /dev/hdm5
   raid-disk 6
   device /dev/hdo5
   raid-disk 7
   device /dev/hdq5
   raid-disk 8
   device /dev/hds5
   raid-disk 9
   device /dev/hdu5
   raid-disk 10
   device /dev/hdw5
   raid-disk 11
Back to top
View user's profile Send private message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Sat Jun 24, 2006 12:30 pm    Post subject: Reply with quote

I was thinking of running the command

Code:
mdadm --create /dev/mdX --level=0 --auto=yes --raid-devices=4 /dev/hda1 /dev/hdb1 /dev/hdc1 /dev/hdd1


Good idea or bad idea? :D
Back to top
View user's profile Send private message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Sat Jun 24, 2006 1:02 pm    Post subject: Reply with quote

Just started examining the raid devices

Code:

mdadm -E /dev/hdc2
/dev/hdc2:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 84f2f336:0607a562:8960620f:2d2a4b6e
  Creation Time : Tue Nov 19 02:56:10 2002
     Raid Level : raid1
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 100

    Update Time : Thu Jun 22 12:32:31 2006
          State : active
 Active Devices : 1
Working Devices : 1
 Failed Devices : 3
  Spare Devices : 0
       Checksum : 6d2e20c3 - correct
         Events : 0.67


      Number   Major   Minor   RaidDevice State
this     3      33        2        3      active sync   /dev/.static/dev/hde2

   0     0       0        0        0      faulty removed
   1     1       0        0        1      faulty removed
   2     2       0        0        2      faulty removed
   3     3      33        2        3      active sync   /dev/.static/dev/hde2



Code:


/dev/hdc4:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : c181e171:f0d6106d:0e280436:7a5a32b0
  Creation Time : Tue Nov 19 03:04:39 2002
     Raid Level : raid5
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Mon May 22 07:49:58 2006
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 6d34ef11 - correct
         Events : 0.57

         Layout : left-asymmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     2      33        4        2      active sync   /dev/.static/dev/hde4

   0     0       3        4        0      active sync   /dev/.static/dev/hda4
   1     1      22        4        1      active sync   /dev/hdc4
   2     2      33        4        2      active sync   /dev/.static/dev/hde4
   3     3      34        4        3      active sync   /dev/.static/dev/hdg4




Code:

mdadm -E /dev/hdc5
/dev/hdc5:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : bdec1430:4b540188:40c0eb2d:6aaa9a87
  Creation Time : Tue Nov 19 02:56:10 2002
     Raid Level : raid1
   Raid Devices : 4
  Total Devices : 5
Preferred Minor : 101

    Update Time : Thu Jun 22 12:32:31 2006
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 3
  Spare Devices : 0
       Checksum : e0504b83 - correct
         Events : 0.76


      Number   Major   Minor   RaidDevice State
this     2      33        5        2      active sync   /dev/.static/dev/hde5

   0     0       0        0        0      faulty removed
   1     1       0        0        1      faulty removed
   2     2      33        5        2      active sync   /dev/.static/dev/hde5
   3     3      22        5        3      active sync   /dev/hdc5

Back to top
View user's profile Send private message
fintan
Apprentice
Apprentice


Joined: 06 Nov 2003
Posts: 150
Location: Dublin

PostPosted: Mon Jun 26, 2006 8:41 am    Post subject: Reply with quote

Hi just wanted to bump this.

Can anyone tell me how you'd mount raid5 partition?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum