September 24, 201312 yr As in the title, I accidentally assigned one of my data disks as parity. The array started and automatically began the initial parity sync. It ran for about two seconds before I noticed what was going on. Stopped array, ran new config utility, and reassigned all my disks. Now disk1 is showing up as unformatted. It's got about 1.2 TB worth of data on it that I would love to recover... syslog is attached. Where can I go from here? I'm on unraid 5.0, no plugins except the new webgui and unmenu. syslog.txt
September 24, 201312 yr I gather that you don't have backups ... hopefully an oversight you'll now correct As for what you can do now ... Did you already have a parity disk with good parity when you did this? If so, STOP. Do NOTHING and you may be able to recover everything !! Post back for details. If not, then do a new config WITHOUT the disk you trashed (so it's completely unused). Then wait for a Linux guru to detail how you can recover files from that disk. Basically you need to do a scan with reiserfschk to recover whatever you can of the file system. Essentially, you need to log in to UnRAID (either from a console attached to the UnRAID computer, or via Telnet or Screen); then run Reiserfschk to rebuild the directory tree. I believe the command is: reiserfsck --scan-whole-partition --rebuild-tree /dev/sdx1 [where x is the appropriate drive ID, and 1 is the partition on that drive to scan] ... but wait for confirmation from JoeL, WeeboTech, or one of the other Linux guys before doing it. That's not going to let you recover everything, but if it was truly only a second or so before you stopped it, you may get a significant amount back.
September 24, 201312 yr Author I gather that you don't have backups ... hopefully an oversight you'll now correct The worst part is, that is what I'm trying to accomplish now. I've not had a backup of all my data, so I'm currently waiting for additional drives to show up. Unfortunately, I'm waiting on parity drives. I had a bad string of luck over the weekend and had a 3TB parity drive fail in addition to two other 2TB drives. I do not have any parity at all. I was thinking that I needed to do some sort of reiserfsck command, but not 100%. I'll take the drive in question out of the array for now, and wait to hear back from some of the other folks here.
September 24, 201312 yr I made a mistake recently on a cache drive where I started rebuilding a failed drive onto the cache drive that was full of data. I used DD to image the drive to another drive. Then on the copy I used --rebuild-tree and got most of my data back. I imaged it to another drive so that I could always rerun DD to image it again if I had problems trying to recover on the copy.
September 24, 201312 yr Author I made a mistake recently on a cache drive where I started rebuilding a failed drive onto the cache drive that was full of data. I used DD to image the drive to another drive. Then on the copy I used --rebuild-tree and got most of my data back. I imaged it to another drive so that I could always rerun DD to image it again if I had problems trying to recover on the copy. I've never heard of DD before, but a link from your previous post gave some commands that referenced dd. The first command that the guy is this: ssh deadserver dd if=/dev/hda1 conv=noerror > hda1.img I assume I would use a similar command to image to another drive locally in the machine. would I just use the last part of the command as such, if my failed disk is disk1, and a spare disk is disk4: dd if=/dev/md1 conv=noerror > /dev/md4/md1.img I'm still getting my feet wet as far as linux is concerned, and this is far outside the scope of anything I've done before.
September 24, 201312 yr I knew you were going to ask that! Unfortunately it was long enough ago and I didn't write it down so I am going from memory. As near as I can remember I went with a composite of multiple posts that I found with a google search similar to this. I believe my composite command was this: dd if=/dev/sda1 of=/dev/sdb1 bs=1M conv=notrunc,noerror I didn't want it to stop at an error so I added the conv=notrunc,noerror from the first link and the buffer size from the 5th link. I did it from my preclear station not on my unRAID server. That was turned off (the VM was anyway). Edit: This is also from memory but I believe I setup the drive I was copying to in a temporary unRAID setup all the way to a formatted drive. Not sure that was necessary but it was the easiest way for me to get a partitioned drive for linux without using any more command line commands than I had to. Don't know linux either. After rereading the first link I see it wasn't necessary. DD will create it. Oh well it was waisted effort when I did it then. Edit2: IF you do this (drive clone) double check which drive is which multiple times as you could get the wrong drive in the wrong position. IF in DD is the drive you are copying FROM. OF in DD is the drive you are copying TO. Edit3: I also used a drive of exactly the same size as the original. I did go from Seagate to WD but the drives were the same 2TB in size.
September 24, 201312 yr Author After reading through the various links on google, it looks to me like your dd command makes sense. I've got that running now. Unfortunately there's no progress bar so I guess I've gotta let it process and check on it tomorrow or something. I've got a 3TB seagate copying to a 3TB WD, so I imagine it'll take quite some time. I'm hoping that JoeL or Weebotech can chime in with some advice for reiserfsck commands...
September 24, 201312 yr Well I just bit the bullet and formatted the drive. Sigh, 2TB of data lost in the process of trying to perfectly configure my data for Unraid.
September 25, 201312 yr Author OK, dd finishing cloning to another 3TB drive, so I'm ready to try running some commands. Anxiously awaiting expert advice...
September 25, 201312 yr Author After some careful reading on the reiserfsck options, I ran reiserfsck --check /dev/sde1, and it immediately came back with: root@Saidar:/boot/custom# reiserfsck --check /dev/sde1 reiserfsck 3.6.21 (2009 www.namesys.com) ************************************************************* ** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. ** ************************************************************* Will read-only check consistency of the filesystem on /dev/sde1 Will put log info to 'stdout' Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes reiserfs_open: the reiserfs superblock cannot be found on /dev/sde1. Failed to open the filesystem. If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb. I came across this forum post, where user bjp999 had to run reiserfsck --rebuild-sb, but needed to know exact, specific answers to the questions asked. I imagine the answers have changed from 4.2.1 to 5.0. Does anyone know what the current answers are? Do I even need to do this, or should I do as garycase suggested: I believe the command is: reiserfsck --scan-whole-partition --rebuild-tree /dev/sdx1 [where x is the appropriate drive ID, and 1 is the partition on that drive to scan]
September 25, 201312 yr Author OK, ran the reiserfsck --rebuild-sb which completed succesfully, then ran reiserfsck --scan-whole-directory --rebuild-tree. It just completed. All the while I was doing this, the drive in question was not part of the array. How do I view the recovered files on my drive? I can't cd to /dev/sde1 as this is not a directory. Is it safe to add the rebuilt drive to my array to copy off the files?
September 25, 201312 yr Just mount it: mkdir /mnt/recovery mount /dev/sdX /mnt/recovery *where x is the name of the drive
September 25, 201312 yr Author Thanks steini84, that worked. I did have to use mount /dev/sde1 /mnt/recovery before it would mount. Looks like I recovered a TON of stuff. I'll be sifting through it the rest of the night... thanks everyone involved! Much appreciated.
September 25, 201312 yr Author To anyone else who has this issue, here's what I did: 1. Cloned the problem drive to a spare using DD dd if=/dev/sda1 of=/dev/sdb1 bs=1M conv=notrunc,noerror where /sda1 and /sdb1 are correct for my system 2. reiserfsck --rebuild-sb, with the correct answer as found in bjp99's post: 1. The version of reiserfs is 3.6.x. This is for unRAID 4.2.1. (This is NOT the default, so be careful) 2. Block size is 4096 (default) 3. “No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified)” Is journal default?” (Answer Y) 4. “Do you use resizer?” (Answer N) 5. It tells you that a new uuid has been generated. 6. “rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header?” Answer Y 7. The following info is displayed: Reiserfs super block in block 16 on 0x901 of format 3.6 with standard journal Count of blocks on the device: 73264320 Number of bitmaps: 2236 Blocksize: 4096 Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0 Root block: 0 Filesystem is NOT clean Tree height: 0 Hash function used to sort names: not set Objectid map size 0, max 972 Journal parameters: Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (first block 18) Max transaction length 1024 blocks Max batch size 900 blocks Max commit age 30 Blocks reserved by journal: 0 Fs state field: 0x1: some corruptions exist. sb_version: 2 inode generation number: 0 UUID: <my UUID removed> LABEL: Set flags in SB: Is this ok ? (y/n)[n]: 8. Answer “Y”. 9. With amazing speed the program does its thing and ends 3. reiserfsck --scan-whole-partition --rebuild-tree /dev/sda1 (where /sda1 is the correct drive for my system) 4. Mounted it using the suggestions from steini84 mkdir /mnt/recovery mount /dev/sda1 /mnt/recovery 5. Copied the directories it found off to another drive, then sifted through lost+found later
Archived
This topic is now archived and is closed to further replies.