Jump to content

Serious advice needed - Mistake in script recursive delete on '/' :(


Recommended Posts

So I've been working on a few script to move some media files from a hidden part of the cache drive to the media stores - long story short I've copied a line from the script to test on the commandline to check quickly do 'step 1' so I could work on the next part. In my absent mindedness I didn't update the path so where the command would normally have $1 passed to it, its basically ran a delete on '/' as the command normally is '$1/' (passing a folder name to it).

 

I've managed to take out everything, all the files on the flash drive, all the settings for my media downloaders etc - everything :(

 

Where do I go from here?

 

Is there a way to recover my flash drive data so I can at least reboot and ensure my data is safe? I can still access the unraid web interface ok and I can still access all my 'RAID' disk shares / data but I'm now worried about shutting down.

Link to comment

Thanks for that mate. I've done a fair bit of forum trawling and I think I can:

 

1) Shutdown

2) Rebuild my flash drive (I've found a back up of my licence thank god!)

3) Using some screenshots I have of the drive allocations, reallocate everything back to how it should be and start the array

 

This should (from what I gather) at least give me my shares and data back ok. Luckly the script is design as a media mover and the delete searches for any files under 100MB so all me media is safe - very narrow miss to complete disaster today!!

 

I'd like advice on reiserfsch to see if I'm able to recover the filesystem on my cache drive as this has all my setup for media downloading on it and its the result of 12 months tweaking (being an IT tech by day job I should really have thought to back this up!!) - goes to show especially where linux is involved a little knowledge can be dangerous. I will say in my defence I've been doing this same type of testing on the scripts for 2-3 weeks now and It just happens today I missed something pretty damn important :( Lesson learnt I feel.

 

I've ran a 'dd' using 'dd if=/dev/sdh1 of=/mnt/cache/backup.dd' as I've found in a recovery guide - from what I can tell this can act as a backup for the current state of my memory stick

Link to comment

Thanks for that mate. I've done a fair bit of forum trawling and I think I can:

 

1) Shutdown

2) Rebuild my flash drive (I've found a back up of my licence thank god!)

3) Using some screenshots I have of the drive allocations, reallocate everything back to how it should be and start the array

 

This should (from what I gather) at least give me my shares and data back ok. Luckly the script is design as a media mover and the delete searches for any files under 100MB so all me media is safe - very narrow miss to complete disaster today!!

 

I'd like advice on reiserfsch to see if I'm able to recover the filesystem on my cache drive as this has all my setup for media downloading on it and its the result of 12 months tweaking (being an IT tech by day job I should really have thought to back this up!!) - goes to show especially where linux is involved a little knowledge can be dangerous. I will say in my defence I've been doing this same type of testing on the scripts for 2-3 weeks now and It just happens today I missed something pretty damn important :( Lesson learnt I feel.

 

I've ran a 'dd' using 'dd if=/dev/sdh1 of=/mnt/cache/backup.dd' as I've found in a recovery guide - from what I can tell this can act as a backup for the current state of my memory stick

For the cache drive:

umount /mnt/cache

reiserfsck --rebuild-tree --scan-whole-partition /dev/sdX1

For the data drives:

samba stop

umount /mnt/disk1

reiserfsck --rebuild-tree --scan-whole-partition /dev/md1

umount /mnt/disk2

reiserfsck --rebuild-tree --scan-whole-partition /dev/md2

umount /mnt/disk3

reiserfsck --rebuild-tree --scan-whole-partition /dev/md3

umount /mnt/disk4

reiserfsck --rebuild-tree --scan-whole-partition /dev/md4

umount /mnt/disk5

reiserfsck --rebuild-tree --scan-whole-partition /dev/md5

etc...

Link to comment

Thanks Joe - I'll try that on my cache drive to see what I can recover.

 

Is the data drive part required as nothing important was deleted from data drives, the delete carried out ran on files under 100mb so only a few info and banner images will have been lost.

 

825777216277013.jpg

 

I've got a bunch of Blue status on my drives as above - I've rebuilt my flash so I've got a bootable system again. For the option to start the array it says it will record all disk info and do a Parity-Sync - will the parity be recalculated based on the info on the drives now? All the drives are reallocated back to there rightful slots but I'm a little worried that the user guide says blue status means new drive

 

I'd also like to know how I go about setting up my shares again, I know what they are all etc but I didnt want to go set them up and overwrite something. How do I go about setting them back up within unraid so they match the up to the data on the HDD's?

Link to comment

I've started it up but 3 of my drives are showing as unformatted now - should i just leave the parity sync to complete?

 

Here a grab of what I see

 

09f87f216289105.jpg

 

syslog is attached. I've taken a quick look over it and can see the mounting errors but I'm a little worried about the bit saying it can't find a filesystem.

 

The hardware is all known good as I've had this setup running fine until I made the booboo which kicked this nightmare off

syslog-2012-10-21.txt

Link to comment

No power on this earth will make me press format  ;D

 

I'll wait for some more advice... Seems strange that its just the 1TB drives thats gone poof

 

I've tried a reiserfsck --check on each of the md1,2 & 3 and all 3 give the same result:

 

reiserfs_open - Superblock not found

may need to run --rebuild-sb

Link to comment

Having been searching the forums again I've see a post where its mentioned using fdisk to check for a partition. At this point I've removed all the drives bar the single one I'm working on to avoid any more potential mistakes.

 

Using fdisk -lu /dev/sdb I get:

 

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes

1 heads, 63 sectors/track, 31008336 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x00000000

 

  Device Boot      Start        End      Blocks  Id  System

/dev/sdb1              64  1953525167  976762552  83  Linux

Partition 1 does not end on cylinder boundary.

 

I'm not sure if the starting sector is wrong as being a bog standard 1TB drive, I wouldn't expect it to be aligned parition. As I was filling out my settings again on rebuilding my flash, I did set the Default partition format to be 4k-aligned as thats what it was on before. Has this changed the alignment on my 1TB drives causing the issues? Im my simple logic (as I don't really understand all this too well) it would explain why all my standard 1TB drives are listed as 'unformatted' but all my advance format 2tb drives still work fine.

Link to comment

You probably have run into the bug where unRAID resets the MBR to whatever your current "preference" was set to when the config/super.dat file is lost in a flash drive replacement.

 

It is easy to fix with a script I wrote to assist another unRAID user.  But first, I'd like you to run a "dd" dommand on each of the disks that show as "unformatted" (unRAID assumes any disk it cannot mount as a reiserfs is unformatted.)  Obviously, if the MBR is pointing to the wrong starting sector for the partition, it will not mount.

 

The commands are illustrated in this thread:

http://lime-technology.com/forum/index.php?topic=15385.msg144723#msg144723

 

You just need to modify it to reference your disk device.

dd if=/dev/sdb count=195 | od -c -A d |  sed  30q

 

You need to run the "dd" command on each of the disks that will not mount to look for the "R  e  I  s  E  r  2  F  s  " string in the output.

If the string is on a line at address "0097840" like this

0097840 220  \0 002  \0  R  e  I  s  E  r  2  F  s \0  \0  \0

the file system is starting on sector 63.

 

If the string is on a line at address "0098352" like this:

0098352 006  \0 001  \0  R  e  I  s  E  r  2  F  s \0  \0  \0

the file system is starting on sector 64.

 

The fix is described in that thread, using unraid_partition_disk.sh to reset the MBR to its expected value.    Once reset, you can just reboot and unRAID should be able to mount the drive.  In your case, if your partition should be pointing to sector 63, you would NOT use the "-A" option (That option is only if you are going to point the partition start at sector 64)

Joe L.

 

Link to comment

Oh yes, do NOT run the --rebuilld-sb, as it will cause more issues if you rebuilding it in the wrong sector.  It will probably not be needed.

 

Once the partition start is correct, you can run another

reiserfsck --check /dev/mdX

and it should find the superblock just fine.

 

Post the output of your "dd" command, just in case it shows something else.

 

Joe  L.

Link to comment

Your syslog showed where unRAID re-wrote the MBR on three disks (probably incorrectly)

Oct 21 14:18:55 unraid emhttp: writing mbr on disk 1 (/dev/sdc) with partition 1 offset 64

Oct 21 14:18:55 unraid emhttp: re-reading /dev/sdc partition table

Oct 21 14:18:55 unraid kernel:  sdc: sdc1

Oct 21 14:18:56 unraid emhttp: writing mbr on disk 2 (/dev/sdf) with partition 1 offset 64

Oct 21 14:18:56 unraid emhttp: re-reading /dev/sdf partition table

Oct 21 14:18:56 unraid kernel:  sdf: sdf1

Oct 21 14:18:57 unraid emhttp: writing mbr on disk 3 (/dev/sdd) with partition 1 offset 64

Oct 21 14:18:57 unraid emhttp: re-reading /dev/sdd partition table

Oct 21 14:18:57 unraid kernel:  sdd: sdd

Link to comment

Thankyou very much for the detailed help - its very frustrating being an IT tech by day and a linux noob by night :)

 

I'm confused at the dd output a little as one drive seems to not show what we're looking for at all

 

root@unraid:~# dd if=/dev/sdb count=195 | od -c -A d |  sed  30q

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0001536  ` 003 001  \0 240 005 002  \0 341 031  \0  \0 210 341 001  \0

0001552  P 002 001  \0  \0  \0  \0  \0 002  \0  \0  \0 002  \0  \0  \0

0001568  \0 200  \0  \0  \0 200  \0  \0 340  3  \0  \0  #  \v 273  K

0001584  #  \v 273  K 023  \0 036  \0  S 357 001  \0 001  \0  \0  \0

0001600  G 330 251  K  \0  N 355  \0  \0  \0  \0  \0 001  \0  \0  \0

0001616  \0  \0  \0  \0  \v  \0  \0  \0 200  \0  \0  \0 004  \0  \0  \0

0001632 006  \0  \0  \0 001  \0  \0  \0  s  R 024 004  2 323  A 216

0001648 272 315  A 034 251  +  *  ?  \0  \0  \0  \0  \0  \0  \0  \0

0001664  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0001760  \b  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0      y  @  \t

0001776 377 313  H 330 201  D 314 326 267 230 005  O 002 001  \0  \0

0001792  \0  \0  \0  \0  \0  \0  \0  \0  G 330 251  K 250 001  \0  \0

0001808 251 001  \0  \0 252 001  \0  \0 253 001  \0  \0 254 001  \0  \0

0001824 255 001  \0  \0 256 001  \0  \0 257 001  \0  \0 260 001  \0  \0

0001840 261 001  \0  \0 262 001  \0  \0 263 001  \0  \0 264 001  \0  \0

0001856 265 005  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001

0001872  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0004608 002  \0  \0  \0 003  \0  \0  \0 004  \0  \0  \0  O  n 321  3

0004624 003  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0004640 002 200  \0  \0 003 200  \0  \0 004 200  \0  \0  H  s 261  3

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00176404 s, 56.6 MB/s

 

-------------------------------------------------------------------------------

 

root@unraid:~# dd if=/dev/sdc count=195 | od -c -A d |  sed  30q

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00710259 s, 14.1 MB/s

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097792 256  \r 216 016 343 367  M 001  N 357  ~  \a 022  \0  \0  \0

0097808  \0  \0  \0  \0  \0      \0  \0  \0 004  \0  \0  U  v  :  C

0097824 204 003  \0  \0 036  \0  \0  \0  \0  \0  \0  \0  \0 020 314 003

0097840  ^  \0 001  \0  R  e  I  s  E  r  2  F  s  \0  \0  \0

0097856 003  \0  \0  \0 005  \0 035 035 002  \0  \0  \0 260  \0  \0  \0

0097872 001  \0  \0  \0 326 225  Y 001 315 227  G  1 243 204 373  H

0097888  ?  I 221 250  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0097904  \0  \0  \0  \0  &  \0 036  \0  \n 003 254  N  \0  N 355  \0

0097920  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097984  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0

0098000 325  \0  \0  \0 326  \0  \0  \0 364  \0  \0  \0 365  \0  \0  \0

0098016 374  \0  \0  \0 375  \0  \0  \0 002 001  \0  \0 003 001  \0  \0

0098032 006 001  \0  \0  \a 001  \0  \0  \t 001  \0  \0  \n 001  \0  \0

0098048 021 001  \0  \0 022 001  \0  \0 023 001  \0  \0 025 001  \0  \0

0098064 026 001  \0  \0 030 001  \0  \0 031 001  \0  \0 033 001  \0  \0

0098080 034 001  \0  \0 035 001  \0  \0 036 001  \0  \0 037 001  \0  \0

0098096 003 002  \0  \0 004 002  \0  \0 005 002  \0  \0 016 002  \0  \0

0098112 203 002  \0  \0 204 002  \0  \0 273 002  \0  \0 274 002  \0  \0

0098128 277 002  \0  \0 300 002  \0  \0 310 002  \0  \0 311 002  \0  \0

0098144 320 002  \0  \0 321 002  \0  \0 377 002  \0  \0  \0 003  \0  \0

0098160 001 003  \0  \0 002 003  \0  \0 017 003  \0  \0 021 003  \0  \0

 

-------------------------------------------------------------------------------

 

root@unraid:~# dd if=/dev/sdd count=195 | od -c -A d |  sed  30q

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00219412 s, 45.5 MB/s

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097792 256  \r 216 016  1 301  (  \0  M 001 265  \f 022  \0  \0  \0

0097808  \0  \0  \0  \0  \0      \0  \0  \0 004  \0  \0 276  /  o  \n

0097824 204 003  \0  \0 036  \0  \0  \0  \0  \0  \0  \0  \0 020 314 003

0097840  $  \0 001  \0  R  e  I  s  E  r  2  F  s  \0  \0  \0

0097856 003  \0  \0  \0 005  \0 035 035 002  \0  \0  \0 270  \0  \0  \0

0097872 001  \0  \0  \0 332 321  @  , 017 357  N 242 221 030 232  M

0097888 327  s 033  S  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0097904  \0  \0  \0  \0  5  \0 036  \0 237 373  F  M  \0  N 355  \0

0097920  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097984  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0

0098000  `  \0  \0  \0  a  \0  \0  \0 314  \0  \0  \0 315  \0  \0  \0

0098016 322  \0  \0  \0 323  \0  \0  \0 337  \0  \0  \0 340  \0  \0  \0

0098032 344  \0  \0  \0 345  \0  \0  \0 354  \0  \0  \0 355  \0  \0  \0

0098048 361  \0  \0  \0 363  \0  \0  \0 366  \0  \0  \0 367  \0  \0  \0

0098064 001 001  \0  \0 002 001  \0  \0 006 001  \0  \0  \a 001  \0  \0

0098080  \v 001  \0  \0  \f 001  \0  \0 037 001  \0  \0  ! 001  \0  \0

0098096  # 001  \0  \0  $ 001  \0  \0 357 001  \0  \0 360 001  \0  \0

0098112 307 002  \0  \0 310 002  \0  \0 335 002  \0  \0 337 002  \0  \0

0098128  \f 003  \0  \0  \r 003  \0  \0  ? 003  \0  \0  \0  \0  \0  \0

0098144  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

 

Looking at the first one it seems like theres nothing there and with the last two its already at 63..

Link to comment

I've also ran the fix script as a test (outlined in the thread you linked to) and it give me:

 

root@unraid:/boot# unraid_partition_disk.sh /dev/sdb

########################################################################

Model Family:    SAMSUNG SpinPoint F1 DT series

Device Model:    SAMSUNG HD103UJ

Serial Number:    S13PJ90S126253

Firmware Version: 1AA01113

User Capacity:    1,000,204,886,016 bytes

 

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes

1 heads, 63 sectors/track, 31008336 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x00000000

 

  Device Boot      Start        End      Blocks  Id  System

/dev/sdb1              64  1953525167  976762552  83  Linux

Partition 1 does not end on cylinder boundary.

########################################################################

============================================================================

== Disk /dev/sdb is NOT partitioned for unRAID properly.

== expected start = 63, actual start = 64

== expected size = 1953525105, actual size = 1953525104

============================================================================

root@unraid:/boot# unraid_partition_disk.sh /dev/sdc

########################################################################

Model Family:    SAMSUNG SpinPoint F1 DT series

Device Model:    SAMSUNG HD103UJ

Serial Number:    S13PJDWQ736281

Firmware Version: 1AA01113

User Capacity:    1,000,204,886,016 bytes

 

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes

1 heads, 63 sectors/track, 31008336 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x00000000

 

  Device Boot      Start        End      Blocks  Id  System

/dev/sdc1              64  1953525167  976762552  83  Linux

Partition 1 does not end on cylinder boundary.

########################################################################

============================================================================

== Disk /dev/sdc is NOT partitioned for unRAID properly.

== expected start = 63, actual start = 64

== expected size = 1953525105, actual size = 1953525104

============================================================================

root@unraid:/boot# unraid_partition_disk.sh /dev/sdd

########################################################################

Device Model:    ST31000322CS

Serial Number:    9VX0LQYY

Firmware Version: SC13

User Capacity:    1,000,204,886,016 bytes

 

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes

1 heads, 63 sectors/track, 31008336 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x00000000

 

  Device Boot      Start        End      Blocks  Id  System

/dev/sdd1              64  1953525167  976762552  83  Linux

Partition 1 does not end on cylinder boundary.

########################################################################

============================================================================

== Disk /dev/sdd is NOT partitioned for unRAID properly.

== expected start = 63, actual start = 64

== expected size = 1953525105, actual size = 1953525104

============================================================================

 

Link to comment

Check the actual device names again to make sure you are using the correct ones. I see the disk that doesn't reflect a reiserfs filesystem at all (sdb) appears from the output to be a 1TB WD drive, but looking at your syslog sdb was mounted as cache, which is a 150GB WD.

 

Oct 21 14:19:00 unraid emhttp: shcmd (23): set -o pipefail ; mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime /dev/sdb1 /mnt/cache 2>&1 | logger

 

Link to comment

Sorry, I think I've confused matters - I removed all the drives other the 3 with mounting issues as I didn't want to risk any acidental damage to those while I was looking into the problems.

 

As it stands you can't make a direct comparison to the syslog as the sdX references are different now. Sorry if this is making it a waste of your time searching over, I do appreciate the help.

 

Once I get confirmation on what to run to fix the MBR on the drives I've got installed now, I'll setup again as it should be. I also wasn't sure what effect the parity drive would have on the data I have so wanted to keep that out of the picture. I hope once I get my data in order I can just carry out a parity sync to bring all the bits together again.

 

---------------- UPDATE ----------------

 

In light of the above, I've put everything back to how it should be so all references to the originally posted syslog are right... I'll just amend the devices I need to work on as advice is being provided.

Link to comment

Thankyou very much for the detailed help - its very frustrating being an IT tech by day and a linux noob by night :)

 

I'm confused at the dd output a little as one drive seems to not show what we're looking for at all

 

root@unraid:~# dd if=/dev/sdb count=195 | od -c -A d |  sed  30q

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0001536  ` 003 001  \0 240 005 002  \0 341 031  \0  \0 210 341 001  \0

0001552  P 002 001  \0  \0  \0  \0  \0 002  \0  \0  \0 002  \0  \0  \0

0001568  \0 200  \0  \0  \0 200  \0  \0 340  3  \0  \0  #  \v 273  K

0001584  #  \v 273  K 023  \0 036  \0  S 357 001  \0 001  \0  \0  \0

0001600  G 330 251  K  \0  N 355  \0  \0  \0  \0  \0 001  \0  \0  \0

0001616  \0  \0  \0  \0  \v  \0  \0  \0 200  \0  \0  \0 004  \0  \0  \0

0001632 006  \0  \0  \0 001  \0  \0  \0  s  R 024 004  2 323  A 216

0001648 272 315  A 034 251  +  *  ?  \0  \0  \0  \0  \0  \0  \0  \0

0001664  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0001760  \b  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0      y  @  \t

0001776 377 313  H 330 201  D 314 326 267 230 005  O 002 001  \0  \0

0001792  \0  \0  \0  \0  \0  \0  \0  \0  G 330 251  K 250 001  \0  \0

0001808 251 001  \0  \0 252 001  \0  \0 253 001  \0  \0 254 001  \0  \0

0001824 255 001  \0  \0 256 001  \0  \0 257 001  \0  \0 260 001  \0  \0

0001840 261 001  \0  \0 262 001  \0  \0 263 001  \0  \0 264 001  \0  \0

0001856 265 005  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001

0001872  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0004608 002  \0  \0  \0 003  \0  \0  \0 004  \0  \0  \0  O  n 321  3

0004624 003  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0004640 002 200  \0  \0 003 200  \0  \0 004 200  \0  \0  H  s 261  3

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00176404 s, 56.6 MB/s

 

-------------------------------------------------------------------------------

Might this be your parity drive?  As you said, there is no reiserfs signature string.

root@unraid:~# dd if=/dev/sdc count=195 | od -c -A d |  sed  30q

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00710259 s, 14.1 MB/s

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097792 256  \r 216 016 343 367  M 001  N 357  ~  \a 022  \0  \0  \0

0097808  \0  \0  \0  \0  \0      \0  \0  \0 004  \0  \0  U  v  :  C

0097824 204 003  \0  \0 036  \0  \0  \0  \0  \0  \0  \0  \0 020 314 003

0097840  ^  \0 001  \0  R  e  I  s  E  r  2  F  s  \0  \0  \0

0097856 003  \0  \0  \0 005  \0 035 035 002  \0  \0  \0 260  \0  \0  \0

0097872 001  \0  \0  \0 326 225  Y 001 315 227  G  1 243 204 373  H

0097888  ?  I 221 250  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0097904  \0  \0  \0  \0  &  \0 036  \0  \n 003 254  N  \0  N 355  \0

0097920  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097984  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0

0098000 325  \0  \0  \0 326  \0  \0  \0 364  \0  \0  \0 365  \0  \0  \0

0098016 374  \0  \0  \0 375  \0  \0  \0 002 001  \0  \0 003 001  \0  \0

0098032 006 001  \0  \0  \a 001  \0  \0  \t 001  \0  \0  \n 001  \0  \0

0098048 021 001  \0  \0 022 001  \0  \0 023 001  \0  \0 025 001  \0  \0

0098064 026 001  \0  \0 030 001  \0  \0 031 001  \0  \0 033 001  \0  \0

0098080 034 001  \0  \0 035 001  \0  \0 036 001  \0  \0 037 001  \0  \0

0098096 003 002  \0  \0 004 002  \0  \0 005 002  \0  \0 016 002  \0  \0

0098112 203 002  \0  \0 204 002  \0  \0 273 002  \0  \0 274 002  \0  \0

0098128 277 002  \0  \0 300 002  \0  \0 310 002  \0  \0 311 002  \0  \0

0098144 320 002  \0  \0 321 002  \0  \0 377 002  \0  \0  \0 003  \0  \0

0098160 001 003  \0  \0 002 003  \0  \0 017 003  \0  \0 021 003  \0  \0

 

-------------------------------------------------------------------------------

The above is a file system starting on sector 63.  As mentioned, you need to run

unraid_partition_disk.sh -p /dev/sdc

root@unraid:~# dd if=/dev/sdd count=195 | od -c -A d |  sed  30q

195+0 records in

195+0 records out

99840 bytes (100 kB) copied, 0.00219412 s, 45.5 MB/s

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000448  \0  \0 203  \0  \0  \0  @  \0  \0  \0  p  m  p  t  \0  \0

0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  U 252

0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097792 256  \r 216 016  1 301  (  \0  M 001 265  \f 022  \0  \0  \0

0097808  \0  \0  \0  \0  \0      \0  \0  \0 004  \0  \0 276  /  o  \n

0097824 204 003  \0  \0 036  \0  \0  \0  \0  \0  \0  \0  \0 020 314 003

0097840  $  \0 001  \0  R  e  I  s  E  r  2  F  s  \0  \0  \0

0097856 003  \0  \0  \0 005  \0 035 035 002  \0  \0  \0 270  \0  \0  \0

0097872 001  \0  \0  \0 332 321  @  , 017 357  N 242 221 030 232  M

0097888 327  s 033  S  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

0097904  \0  \0  \0  \0  5  \0 036  \0 237 373  F  M  \0  N 355  \0

0097920  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

*

0097984  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0

0098000  `  \0  \0  \0  a  \0  \0  \0 314  \0  \0  \0 315  \0  \0  \0

0098016 322  \0  \0  \0 323  \0  \0  \0 337  \0  \0  \0 340  \0  \0  \0

0098032 344  \0  \0  \0 345  \0  \0  \0 354  \0  \0  \0 355  \0  \0  \0

0098048 361  \0  \0  \0 363  \0  \0  \0 366  \0  \0  \0 367  \0  \0  \0

0098064 001 001  \0  \0 002 001  \0  \0 006 001  \0  \0  \a 001  \0  \0

0098080  \v 001  \0  \0  \f 001  \0  \0 037 001  \0  \0  ! 001  \0  \0

0098096  # 001  \0  \0  $ 001  \0  \0 357 001  \0  \0 360 001  \0  \0

0098112 307 002  \0  \0 310 002  \0  \0 335 002  \0  \0 337 002  \0  \0

0098128  \f 003  \0  \0  \r 003  \0  \0  ? 003  \0  \0  \0  \0  \0  \0

0098144  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

 

Looking at the first one it seems like theres nothing there and with the last two its already at 63..

The above is a file system starting on sector 63.  As mentioned, you need to run

unraid_partition_disk.sh -p /dev/sdd

 

The issue is for those two disks the MBR record shows the partition as starting on sector 64, but it actually is on sector 63.

The unraid_partition_disk.sh script will fix the MBR to point to sector 63.

 

Joe L.

Link to comment

Joe L, not to hijack the thread, but as I was running commands to see what the output would be for me, I came across a few things that were odd to say the least.

 

Testing a few of my disks I noticed this:

 

sdc (disk 2) does not appear to have a reiserfs partition, but is detected fine and the unraid ui reports a reiserfs filesystem starting on sector 64.

 

Running the dd command gives this:


root@Media:/boot# dd if=/dev/sdc count=195 | od -c -A d | sed 30q
195+0 records in
195+0 records out
99840 bytes (100 kB) copied, 0.00668019 s, 14.9 MB/s
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000448  \0  \0 203  \0  \0  \0   @  \0  \0  \0 360   z 250 256  \0  \0
0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U 252
0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
[b]0032256 353   R 220   N   T   F   S                  \0 002  \b  \0  \0[/b]
0032272  \0  \0  \0  \0  \0 370  \0  \0   ?  \0 377  \0   ?  \0  \0  \0
0032288  \0  \0  \0  \0 200  \0 200  \0   @   g 250 256  \0  \0  \0  \0
0032304  \0  \0  \f  \0  \0  \0  \0  \0   t 206 352  \n  \0  \0  \0  \0
0032320 366  \0  \0  \0 001  \0  \0  \0 245 026 240 240   V 240 240   ~
0032336  \0  \0  \0  \0 372   3 300 216 320 274  \0   | 373 270 300  \a
0032352 216 330 350 026  \0 270  \0  \r 216 300   3 333 306 006 016  \0
0032368 020 350   S  \0   h  \0  \r   h   j 002 313 212 026   $  \0 264
0032384  \b 315 023   s 005 271 377 377 212 361   f 017 266 306   @   f
0032400 017 266 321 200 342   ? 367 342 206 315 300 355 006   A   f 017
0032416 267 311   f 367 341   f 243      \0 303 264   A 273 252   U 212
0032432 026   $  \0 315 023   r 017 201 373   U 252   u  \t 366 301 001
0032448   t 004 376 006 024  \0 303   f   ` 036 006   f 241 020  \0   f
0032464 003 006 034  \0   f   ; 006      \0 017 202   :  \0 036   f   j
0032480  \0   f   P 006   S   f   h 020  \0 001  \0 200   > 024  \0  \0
0032496 017 205  \f  \0 350 263 377 200   > 024  \0  \0 017 204   a  \0
0032512 264   B 212 026   $  \0 026 037 213 364 315 023   f   X   [  \a
0032528   f   X   f   X 037 353   -   f   3 322   f 017 267 016 030  \0
0032544   f 367 361 376 302 212 312   f 213 320   f 301 352 020 367   6
0032560 032  \0 206 326 212 026   $  \0 212 350 300 344 006  \n 314 270
0032576 001 002 315 023 017 202 031  \0 214 300 005      \0 216 300   f
0032592 377 006 020  \0 377 016 016  \0 017 205   o 377  \a 037   f   a

 

The disk has been in my server since the start, was precleared 2 times before being put in the server and is 300GB from being full, so I know there's no issue with the disk.

 

My cache drive also reports a reiserfs filesystem, but reports this with dd:


root@Media:/boot# dd if=/dev/sdf count=195 | od -c -A d | sed 30q
195+0 records in
195+0 records out
99840 bytes (100 kB) copied, 0.00228165 s, 43.8 MB/s
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000448  \0  \0 203  \0  \0  \0   @  \0  \0  \0 360   _   8   :  \0  \0
0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U 252
0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0001008  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 024
0001024  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0002048   N   A   P   P   _   S   T   A   R   T  \0  \0  \0  \0  \0  \0
0002064  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0002560   M   o   n       0   1   /   1   1   /   2   0   1   0
0002576   0   :   0   2   :   2   3   .   5   9       L   X   W   G   H
0002592   0   2   0   3   6   0   0   1   B   A   2   B   4   2   2   0
0002608   0                                       -       -       -
0002624   -       P   r   e   l   o   a   d       O   K       !  \r  \n
0002640   $  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0002656  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0003584   S   E   T       S   E   R   V   E   R   =   P   R   E   L   O
0003600   A   D   7   A  \r  \n   $   v  \0   |  \0 202  \0 210  \0 216
0003616  \0 224  \0   _   ^ 311 313 220   U 213 354 270  \n  \0 232 276
0003632 002   x   6   V   W 213   ^ 006 212  \a   % 377  \0   P 232  \0
0003648  \0   5   6 203 304 002 210   F 370 213   ^ 006 212   G 001   %
0003664 377  \0   P 232  \0  \0   5   6 203 304 002 210   F 372 212   F
0003680 372   % 377  \0 211   F 366 212   F 370   % 377  \0 003 300 003
0003696 300 003 300 003 300 213   N 366 003 301 210   F 374 212   F 374

 

 

Was just wondering what your thoughts were on this.

Link to comment

I've rang the repair on all 3 drives and everything is now back up and running - a huge thanks to you both for your time. Now starts a big of a backup as some of the stuff wasn't overly important but some I doubt I could replace so its being stored on a 400GB IDE drive for safe keeping :)

 

The drive drive you questioned about being a parity drive - I 100% knew this was a data disk so ran the same fix being pretty sure from the syslog output you extracted to show me the system rewriting the MBR on 3 drives, it must have done this drive too. Its now running as a data drive, mounted and I can browse it fine. Strange DD output still mind:

 

root@unraid:~# dd if=/dev/sdc count=195 | od -c -A d | sed 30q
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000448  \0  \0 203  \0  \0  \0   ?  \0  \0  \0   q   m   p   t  \0  \0
0000464  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000496  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U 252
0000512  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0001536   ` 003 001  \0 240 005 002  \0 341 031  \0  \0 210 341 001  \0
0001552   P 002 001  \0  \0  \0  \0  \0 002  \0  \0  \0 002  \0  \0  \0
0001568  \0 200  \0  \0  \0 200  \0  \0 340   3  \0  \0   #  \v 273   K
0001584   #  \v 273   K 023  \0 036  \0   S 357 001  \0 001  \0  \0  \0
0001600   G 330 251   K  \0   N 355  \0  \0  \0  \0  \0 001  \0  \0  \0
0001616  \0  \0  \0  \0  \v  \0  \0  \0 200  \0  \0  \0 004  \0  \0  \0
0001632 006  \0  \0  \0 001  \0  \0  \0   s   R 024 004   2 323   A 216
0001648 272 315   A 034 251   +   *   ?  \0  \0  \0  \0  \0  \0  \0  \0
0001664  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0001760  \b  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0       y   @  \t
0001776 377 313   H 330 201   D 314 326 267 230 005   O 002 001  \0  \0
0001792  \0  \0  \0  \0  \0  \0  \0  \0   G 330 251   K 250 001  \0  \0
0001808 251 001  \0  \0 252 001  \0  \0 253 001  \0  \0 254 001  \0  \0
0001824 255 001  \0  \0 256 001  \0  \0 257 001  \0  \0 260 001  \0  \0
0001840 261 001  \0  \0 262 001  \0  \0 263 001  \0  \0 264 001  \0  \0
0001856 265 005  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001
0001872  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0004608 002  \0  \0  \0 003  \0  \0  \0 004  \0  \0  \0   O   n 321   3
0004624 003  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0004640 002 200  \0  \0 003 200  \0  \0 004 200  \0  \0   H   s 261   3
195+0 records in
195+0 records out
99840 bytes (100 kB) copied, 0.0126347 s, 7.9 MB/s

Now I have my data back, what is the correct proceedure to deal with the parity drive as I haven't assign it back in yet as it will no longer valid (when I initially started the array its started to do a sync)?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...