[olug] Software RAID / accidentally raidhotadd to wrong md
Terry
td3201 at yahoo.com
Fri Apr 2 21:36:16 UTC 2004
I guess I don't see how you could possibly have all of
your data if 2 out of 3 of the drives in your raid 5
array were blown away....in that type of
configuration, you can only lose one drive.
Heh, have md5 sums of every file on that partition?
You could also run 'file' on every file. Like:
[davt01 at davt01-linux davt01]$ file \#55432
#55432: Microsoft Office Document
You can script up something to pull all the documents
together by type and go through it that way....might
save you from a divorce at least...(reference to
wife's papers).
cd /lost+found;find . -type f -print | while read
Foo;do file \\$Foo >> file_types;done
^ That file command may not work....dont know if you
want to escape the \ or not....the whole idea is to
escape the # symbol in the file name in lost+found....
I am sure someone can come up with something better
but that is my $0.02 solution.....
--- lug at robotz.com wrote:
> Yes they did sync, unfortunately.
>
> I found a way to correct the superblock entries. It
> was risky and
> what I ended up with I has mixed feelings about.
>
> The raidreconf utility will work without the raid
> md4 running.
> Using that I was able to (over a period of 14 hours)
> correct the
> superblock entries. Afterwards, everything that
> belonged in md4
> realized their membership in md4.
>
> However, there were many file system errors
> afterwards. I had to
> use fsck manually to correct them, a process that
> took a substantial
> amount of my time at the keyboard. During the
> process I felt somewhat
> hopeful as I could actually see filenames I
> recognized come up.
>
> After going through md4 with fsck twice and
> correcting an entry in
> /etc/fstab I was able to mount home again for the
> first time since
> Sunday when I broke it. Somehow raidreconf
> converted md4 from
> ext3 to ext2. That was the entry I had to correct
> in /etc/fstab
> to get md4 to mount to /home.
>
> Ok, here is my new most undesirable dilemma. There
> is 130 GB of
> data, which might be everything as that number
> sounds about right.
> But it is all sitting in /home/lost+found with
> number sequences
> as every filename and every directory name?!
>
> Sample:
> drwxr-xr-x 2 adam 1005 4096 Mar 19
> 2001 #10371116/
> drwxr-xr-x 2 ractive ractive 4096 Mar 9
> 20:27 #10420285/
> drwx--x--x 23 lazygirl users 4096 Oct 5
> 16:34 #11534342/
> drwxrwx--- 2 root secure 4096 Jan 3
> 00:06 #163841/
> ---x--x--- 1 1750509120 801725972 49152 Sep 13
> 1938 #180198*
> -r-S--x-w- 1 4261505341 2257411334 49152 Dec
> 13 1901 #180212*
> -r-------- 1 root 4218490 49152 Nov 7
> 1905 #180215
> b--xr-sr-T 1 27182 29810 110, 120 Dec 23
> 2024 #195907
>
> Apparently, all of the file name information has
> been lost. The
> prospect of manually opening 130 GB of data file by
> file in a hex
> editor to determine what it was is pretty much
> beyond the scope
> of reasonable or possible time allocation by one
> human.
>
> I was wondering if there was a way to restore them
> back to their
> filenames and directory structures? (Some kind of
> utility as there
> was with MSDOS and checkdisk files) or something
> built into Linux
> for this situation.
>
> ty
>
>
>
> At Friday, 2 April 2004, you wrote:
>
> >When you added the two partitions to the other raid
> >array, did it go through the whole syncing process
> on
> >both the drives?
> >
> >--- lug at robotz.com wrote:
> >> I will type it in here....
> >>
> >> /etc/raidtab
> >>
> >> raiddev /dev/md3
> >> raid-level 5
> >> nr-raid-disks 3
> >> chuck-size 64k
> >> oersustebt-superblock 1
> >> nr-spare-disks 0
> >>
> >> device /dev/hda3
> >> raid-disk 0
> >> device /dev/hdb3
> >> raid-disk 1
> >> device /dev/hdc3
> >> raid-disk 2
> >>
> >> raiddev /dev/md0
> >> raid-level 1
> >> nr-raid-disks 3
> >> chuck-size 64k
> >> oersustebt-superblock 1
> >> nr-spare-disks 0
> >>
> >> device /dev/hda1
> >> raid-disk 0
> >> device /dev/hdb1
> >> raid-disk 1
> >> device /dev/hdc1
> >> raid-disk 2
> >>
> >> raiddev /dev/md4
> >> raid-level 5
> >> nr-raid-disks 3
> >> chuck-size 64k
> >> oersustebt-superblock 1
> >> nr-spare-disks 0
> >>
> >> device /dev/hda2
> >> raid-disk 0
> >> device /dev/hdb2
> >> raid-disk 1
> >> device /dev/hdc2
> >> raid-disk 2
> >>
> >> raiddev /dev/md2
> >> raid-level 5
> >> nr-raid-disks 3
> >> chuck-size 64k
> >> oersustebt-superblock 1
> >> nr-spare-disks 0
> >>
> >> device /dev/hda5
> >> raid-disk 0
> >> device /dev/hdb5
> >> raid-disk 1
> >> device /dev/hdc5
> >> raid-disk 2
> >>
> >> raiddev /dev/md1
> >> raid-level 5
> >> nr-raid-disks 3
> >> chuck-size 64k
> >> oersustebt-superblock 1
> >> nr-spare-disks 0
> >>
> >> device /dev/hda6
> >> raid-disk 0
> >> device /dev/hdb6
> >> raid-disk 1
> >> device /dev/hdc6
> >> raid-disk 2
> >>
> >>
> >>
> >>
> >> At Wednesday, 31 March 2004, you wrote:
> >>
> >> >Wow, paste your raidtab if you don't mind....let
> me
> >> >take a peek at that then read your stuff below.
> >> That
> >> >will help....
> >> >
> >> >--- lug at robotz.com wrote:
> >> >> Issue summary: Had problems with 1 of a 3
> drive
> >> >> software raid array.
> >> >> Harddrive is not physically bad, but the array
> >> >> failed today on boot.
> >> >> Used raidhotadd to get all of the raid5
> >> partitions
> >> >> (md0 md3)
> >> >> up and running with the exception of the most
> >> >> important partition
> >> >> (md4).
> >> >>
> >> >> I accidentally tried to raidhotadd 2 of the
> 3
> >> >> drives from md4 into
> >> >> md2. Now hdb2 and hdc2 think they are part of
> >> md2
> >> >> when they actually
> >> >> should be part of md4. This is not reflected
> in
> >> >> /etc/raidtab but
> >> >> must be stored somewhere I cannot find.
> >> >> (superblock?)
> >> >>
> >> >> This leaves only 1 drive in md4 and therefore
> md4
> >> >> will not start
> >> >> even degraded. md4 is a RAID 5 partition,
> which
> >> is
> >> >> supposed to include
> >> >> hda2, hdb2, and hdc2. Since RAID wont start
> on
> >> md4,
> >> >> I cannot simply
> >> >> use raidhotremove and raidhotadd to
> correct
> >> this
> >> >> mistake (assuming
> >> >> that would correct the mistake).
> >> >>
> >> >> I used raidsetfaulty to deactivate hdb2 to
> stop
> >> >> interfering with
> >> >> the start of md2. (because hdb2 belongs in
> md4
> >> and
> >> >> raidhotremove
> >> >> refuses to get hdb2 out of md2 without
> >> deactivating
> >> >> the partition)
> >> >>
> >> >> lsraid reports md0 md3 correctly. However,
> >> typing
> >> >> lsraid A d
> >> >> /dev/hdb2 or lsraid A d /dev/hdc2 shows
> them
> >> as
> >> >> a member of
> >> >> md2 still. They should be in md4 instead.
> >> >>
> >> >> My question #1: Did my mistake hose the data
> in
> >> >> both hdb2 and hdc2
> >> >> making it impossible to recover md4 (my most
> >> >> critical partition containing
> >> >> /home) or is hdb2 and hdc2 merely confused
> about
> >> >> where they belong
> >> >> but still within them is my critical data
> making
> >> >> recovery of md4
> >> >> possible?
> >> >>
> >> >> My question #2: If recovery is possible,
> should I
> >> >> then mkraid /dev/md4
> >> >> f and hope for the best or is there a safer
> way
> >> to
> >> >> _save_ my data?
> >> >> Or perhaps there is a way to make hdb2 and
> hdc2
> >> >> realize again that
> >> >> they are part of md4.
> >> >>
> >> >> Keep in mind that since md4 wont start I
> cant
> >> >> reverse the mistake
> >> >> with raidhotadd.
> >> >>
> >> >> If I failed to provide any details please let
> me
> >> >> know and I will
> >> >> elaborate further.
> >> >>
> >> >> Thank you.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> _______________________________________________
> >> >> OLUG mailing list
> >> >> OLUG at olug.org
> >> >> http://lists.olug.org/mailman/listinfo/olug
> >> >
> >> >=====
> >> >Terry
> >> >
> >> >__________________________________
> >> >Do you Yahoo!?
> >> >Yahoo! Finance Tax Center - File online. File on
> >> time.
> >> >http://taxes.yahoo.com/filing.html
> >> >_______________________________________________
> >> >OLUG mailing list
> >> >OLUG at olug.org
> >> >http://lists.olug.org/mailman/listinfo/olug
> >> >
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> OLUG mailing list
> >> OLUG at olug.org
> >> http://lists.olug.org/mailman/listinfo/olug
> >
> >=====
> >Terry
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Small Business $15K Web Design Giveaway
> >http://promotions.yahoo.com/design_giveaway/
> >_______________________________________________
> >OLUG mailing list
> >OLUG at olug.org
> >http://lists.olug.org/mailman/listinfo/olug
> >
>
>
>
>
>
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
=====
Terry
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
More information about the OLUG
mailing list