Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Recover data from NAS HD

  1. #21
    Join Date
    Jun 2008
    Beans
    23

    RE: Recover data from NAS HD

    Quote Originally Posted by gilsonsjc View Post
    Hey tgalati4, here is what I have here:
    1) NAS with brand new 2x5TB disks running on RAID 1 - since it is brand new without any data on it I can remove them from the NAS and use it them if needed.
    2) 2x2TB disks (Drive 0 and/or Drive 1) that used to run on the same NAS in #1 on RAID 1. I tried to clean the disks that have failed (lets brand it as "Drive 0") using the clean disk option in the NAS Web GUI, I guess that option has formatted the disk. However it continued failing.
    3) 1 Sata to USB enclosure
    4) 1 PC with 2 SATA ports running Ubuntu from USB, temporarily borrowed from a good friend.

    I can't get another disks due to budget issues. Is there any way to work only what I have here do recovery the data from Drive 1 and/or Drive 0?

    I am running the latest firmware from WD and it is working just fine with the new 2x5tb disks.

    I also have a thread opened on that forum, let me read that link to see what if I can get anything.

    My NAS does not work with neither Disk 0 or Disk 1 mounted, either together or separately one at a time.
    I've tried the commands on the linked page and it did not work out:

    Code:
    Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 45A11E44-7BEE-40FA-AF61-C0D4CA0654D0
    
    Device       Start        End    Sectors   Size Type
    /dev/sda1    64320    3984191    3919872   1.9G Linux RAID
    /dev/sda2  3984192    4498175     513984   251M Linux RAID
    /dev/sda3  4498176    6474175    1976000 964.9M Linux RAID
    /dev/sda4  6474176 3907029134 3900554959   1.8T Linux RAID
    
    
    ubuntu@ubuntu:~/Desktop$ sudo modprobe md
    modprobe: FATAL: Module md not found.
    ubuntu@ubuntu:~/Desktop$ sudo mknod /dev/md4 b 9 4
    ubuntu@ubuntu:~/Desktop$ sudo mdadm --assemble /dev/md4 /dev/sda4
    mdadm: /dev/sda4 is busy - skipping
    ubuntu@ubuntu:~/Desktop$ sudo mkdir /media/xyz
    ubuntu@ubuntu:~/Desktop$ sudo mount /dev/md4 /media/xyz
    mount: /dev/md4: can't read superblock
    ubuntu@ubuntu:~/Desktop$ sudo chmod -R 777 /media/xyz
    Quote Originally Posted by tgalati4 View Post
    I ran that process to install the new 2x5TB disks and it worked. Let me try that with the Disk 1 and it does not work with Disk 0 using the option to NOT to destroy the data.

    Quote Originally Posted by gilsonsjc View Post
    I ran that process to install the new 2x5TB disks and it worked. Let me try that with the Disk 1 and it does not work with Disk 0 using the option to NOT to destroy the data.
    I have just realized that I can not run that process on the Disk 0 nor Disk 1 since it will destroy all data!

    Since you told me the Disk 0 (the bad one) is better than the good one, would you provide me with the steps to recover the older partition so that I can try to recover the data from there instead from the good disk Disk 1?

    Quote Originally Posted by gilsonsjc View Post
    I have just realized that I can not run that process on the Disk 0 nor Disk 1 since it will destroy all data!

    Since you told me the Disk 0 (the bad one) is better than the good one, would you provide me with the steps to recover the older partition so that I can try to recover the data from there instead from the good disk Disk 1?
    I gave the testdisk a shot and ran against the drive that failed. Here are some screenshots:

    Screenshot from 2015-12-08 15-27-11.png
    Screenshot from 2015-12-08 14-50-45.png

    I am stuck in this step here. What should I do next?
    Last edited by gilsonsjc; December 8th, 2015 at 05:51 PM.

  2. #22
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,046
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Recover data from NAS HD

    I can't recommend any operation on Disk 0 or Disk 1 as that puts your data at risk. The only recommendation I can make is to cp, dd, ddrescue, or use clonezilla to make a copy of one of your disks (either Disk 0 or Disk 1). Then, and only then, perform the data rescue from the copy.

    There are several flavors of RAID1. I do not know what the MyBook uses for its RAID1. Obviously, testdisk does not support it. It supports standard, Linux, software raid (md). Don't assume that your disk has an md RAID1 on it.
    Last edited by tgalati4; December 10th, 2015 at 03:56 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #23
    Join Date
    Jun 2008
    Beans
    23

    Re: Recover data from NAS HD

    Quote Originally Posted by tgalati4 View Post
    Some more tips:
    http://iknowsomething.com/how-to-fix...rand-new-disk/

    Sometimes disks with 30K hours get sticky spindles, run hotter, and
    take more power. So, purchase a new power supply, and see if the
    disks spin up properly. It's possible the new 5TB disks spin easier
    (they are new after all).

    One way to copy two disks:

    Code:
    sudo cp /dev/sda /dev/sdb
    So you could simply copy the 2 TB drive to the 5 TB drive and then use
    parted to fix the partitions. You could simply mark the
    remaining 3 TB space as a separate, blank partition. Mark the unit
    Drive 0 New. Put that in the NAS, by itself, and see if it mounts and
    if you can see your data. Don't put the second disk in it. Set the
    NAS to JBOD mode.

    I don't know what the "Clean Disk Option" mode does from the web
    panel. If you did wipe the disk, then data recovery is difficult.
    Use testdisk and photorec to attempt to recover data.
    You can use your second 5 TB drive to receive the recovered
    files.
    So I created a copy of the Drive 1 to the Drive 1 new. I picked the
    Drive 1 first because you said before it was in better conditions that
    the disk that did not failed.

    Here are the steps I followed:
    Code:
    ubuntu@ubuntu:~$ sudo cp /dev/sdb /dev/sda
    ubuntu@ubuntu:~$ sudo fdisk -l
    GPT PMBR size mismatch (3907029167 != 1177606575) will be corrected by w(rite).
    Disk /dev/sda: 4.6 TiB, 5000981078016 bytes, 9767541168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: B138D12E-0A18-4727-BBB4-B2C151A4DFCD
    The first line (GPT PMBR etc...) was written in red

    Then I tried parted to recover the lost partitions. Not sure if I am
    entering bad start and end parameters (that was a guess, I don't even
    have a clue of values to use) and it did not return anything, output
    below
    Code:
    ubuntu@ubuntu:~$ sudo parted /dev/sda
    GNU Parted 3.2
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) rescue
    Warning: Not all of the space available to /dev/sda appears to be used, you can
    fix the GPT to use all of the space (an extra 5860512000 blocks) or continue
    with the current setting?
    Fix/Ignore? Ignore
    Start? 0
    End? 60000000000
    
    (parted)
    Then I tried testdisk, and wrote the last Linux raid partition (the
    biggest one in green below)

    Screenshot from 2015-12-08 15-27-11.png

    THis is how it looks like after testdisk
    Code:
    Disk /dev/sda: 4.6 TiB, 5000981078016 bytes, 9767541168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: F59CA53A-56AF-0244-A5FB-A23CA28484D4
    
    Device       Start        End    Sectors  Size Type
    /dev/sda1  6474176 3907028869 3900554694  1.8T Linux RAID
    Then I tried the following
    Code:
    root@ubuntu:/home/ubuntu# modprobe mdmodprobe: FATAL: Module md not found.
    
    root@ubuntu:/home/ubuntu# find /lib/modules/ -name "md*"
    /lib/modules/4.2.0-16-generic/kernel/crypto/md4.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/md
    /lib/modules/4.2.0-16-generic/kernel/drivers/md/md-cluster.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/net/mdio.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/net/phy/mdio-bcm-unimac.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/net/phy/mdio-bitbang.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/net/phy/mdio-gpio.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/net/phy/mdio-octeon.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/staging/lustre/lustre/mdc
    /lib/modules/4.2.0-16-generic/kernel/drivers/staging/lustre/lustre/mdc/mdc.ko
    /lib/modules/4.2.0-16-generic/kernel/drivers/usb/image/mdc800.ko
    
    root@ubuntu:/home/ubuntu# ls -alh /lib/modules/4.2.0-16-generic/kernel/drivers/md
    total 1.2M
    drwxr-xr-x  4 root root  749 Oct 21 15:53 .
    drwxr-xr-x 86 root root 1.3K Oct 21 15:57 ..
    drwxr-xr-x  2 root root   32 Oct 21 15:53 bcache
    -rw-r--r--  1 root root  18K Oct  8 17:24 dm-bio-prison.ko
    -rw-r--r--  1 root root  49K Oct  8 17:24 dm-bufio.ko
    -rw-r--r--  1 root root  13K Oct  8 17:24 dm-cache-cleaner.ko
    -rw-r--r--  1 root root  95K Oct  8 17:24 dm-cache.ko
    -rw-r--r--  1 root root  21K Oct  8 17:24 dm-cache-mq.ko
    -rw-r--r--  1 root root  25K Oct  8 17:24 dm-cache-smq.ko
    -rw-r--r--  1 root root  44K Oct  8 17:24 dm-crypt.ko
    -rw-r--r--  1 root root  14K Oct  8 17:24 dm-delay.ko
    -rw-r--r--  1 root root  38K Oct  8 17:24 dm-era.ko
    -rw-r--r--  1 root root  14K Oct  8 17:24 dm-flakey.ko
    -rw-r--r--  1 root root  24K Oct  8 17:24 dm-log.ko
    -rw-r--r--  1 root root  29K Oct  8 17:24 dm-log-userspace.ko
    -rw-r--r--  1 root root  25K Oct  8 17:24 dm-log-writes.ko
    -rw-r--r--  1 root root  34K Oct  8 17:24 dm-mirror.ko
    -rw-r--r--  1 root root  43K Oct  8 17:24 dm-multipath.ko
    -rw-r--r--  1 root root 9.5K Oct  8 17:24 dm-queue-length.ko
    -rw-r--r--  1 root root  37K Oct  8 17:24 dm-raid.ko
    -rw-r--r--  1 root root  24K Oct  8 17:24 dm-region-hash.ko
    -rw-r--r--  1 root root 8.8K Oct  8 17:24 dm-round-robin.ko
    -rw-r--r--  1 root root 9.8K Oct  8 17:24 dm-service-time.ko
    -rw-r--r--  1 root root  68K Oct  8 17:24 dm-snapshot.ko
    -rw-r--r--  1 root root  15K Oct  8 17:24 dm-switch.ko
    -rw-r--r--  1 root root 107K Oct  8 17:24 dm-thin-pool.ko
    -rw-r--r--  1 root root  26K Oct  8 17:24 dm-verity.ko
    -rw-r--r--  1 root root 6.4K Oct  8 17:24 dm-zero.ko
    -rw-r--r--  1 root root  12K Oct  8 17:24 faulty.ko
    -rw-r--r--  1 root root  13K Oct  8 17:24 linear.ko
    -rw-r--r--  1 root root  28K Oct  8 17:24 md-cluster.ko
    -rw-r--r--  1 root root  19K Oct  8 17:24 multipath.ko
    drwxr-xr-x  2 root root   44 Oct 21 15:53 persistent-data
    -rw-r--r--  1 root root  25K Oct  8 17:24 raid0.ko
    -rw-r--r--  1 root root  75K Oct  8 17:24 raid10.ko
    -rw-r--r--  1 root root  59K Oct  8 17:24 raid1.ko
    -rw-r--r--  1 root root 162K Oct  8 17:24 raid456.ko
    
    root@ubuntu:/home/ubuntu# cat /proc/mdstat
    Personalities : 
    unused devices: <none>
    
    root@ubuntu:/home/ubuntu# modprobe -l | grep md
    modprobe: invalid option -- 'l'
    
    root@ubuntu:/home/ubuntu# fgrep CONFIG_MD /boot/config-$(uname -r)CONFIG_MD=y
    CONFIG_MD_AUTODETECT=y
    CONFIG_MD_LINEAR=m
    CONFIG_MD_RAID0=m
    CONFIG_MD_RAID1=m
    CONFIG_MD_RAID10=m
    CONFIG_MD_RAID456=m
    CONFIG_MD_MULTIPATH=m
    CONFIG_MD_FAULTY=m
    CONFIG_MD_CLUSTER=m
    CONFIG_MDIO=m
    CONFIG_MDIO_BITBANG=m
    CONFIG_MDIO_GPIO=m
    CONFIG_MDIO_OCTEON=m
    CONFIG_MDIO_BCM_UNIMAC=m
    Now I am stuck on mouting the "Disk 1 new" - what shall I do? Thanks
    Last edited by gilsonsjc; December 10th, 2015 at 12:39 PM.

  4. #24
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,046
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Recover data from NAS HD

    You were supposed to answer "Why yes, please fix the partition size for me automatically." You answered ignore.

    You are following an old tutorial. md is not a module anymore. It is now part of the kernel. With old tutorials, you need to follow and understand the basic steps. These steps may need to be changed with a newer system.

    You are trying to mount the drive as part of a software RAID1, and it is probably not an md software RAID member. My guess is it is a hardware RAID1 device.

    Since this is a copy, use testdisk and tell it to make it an ext4 partition. Then reboot and see if you can see it in Nautilus.

    How long did it take to perform the copy? Was it a few minutes, or did it take hours?
    Last edited by tgalati4; December 10th, 2015 at 04:07 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  5. #25
    Join Date
    Jun 2008
    Beans
    23

    Re: Recover data from NAS HD

    Quote Originally Posted by tgalati4 View Post
    You were supposed to answer "Why yes, please fix the partition size for me automatically." You answered ignore.

    You are following an old tutorial. md is not a module anymore. It is now part of the kernel. With old tutorials, you need to follow and understand the basic steps. These steps may need to be changed with a newer system.

    You are trying to mount the drive as part of a software RAID1, and it is probably not an md software RAID member. My guess is it is a hardware RAID1 device.

    Since this is a copy, use testdisk and tell it to make it an ext4 partition. Then reboot and see if you can see it in Nautilus.
    I was afraid I was doing something wrong so I choose ignore. Should I take a step back and try parted again even when testdisk has already recovered the partition?
    How can I confirm whether it is a hardware rather than a software RAID?
    If I understood, I should use testdisk to change the /dev/sda1 partition type from Linux Raid to ext4 - is that correct?
    If I am to change the partition type, which option from the list below is the ext4 one?
    Screenshot from 2015-12-10 15-21-11.png

    Thanks again
    Last edited by gilsonsjc; December 10th, 2015 at 04:23 PM.

  6. #26
    Join Date
    Jun 2008
    Beans
    23

    Re: Recover data from NAS HD

    I started copying the Disk 0 to the other 5TB diisk using ddrescue. I am not sure if it is stuck or not, but the image sizing has not been growing for about 11 hours now.

    Code:
    root@ubuntu:/media/ubuntu/bckp# ddrescue -d -r1  /dev/sdb /media/ubuntu/bckp/image-disk-0.raw /media/ubuntu/bckp/image-disk-0.log
    GNU ddrescue 1.19
    Press Ctrl-C to interrupt
    rescued:   137046 MB,    errsize:   1863 GB,  current rate:          0 B/s
         ipos:       1232 GB,     errors:    1439,    average rate:     1763 kB/s
         opos:      1232 GB,  run time:   21.58 h,  successful read:   11.05 h ago
    Scraping failed blocks... (forwards)
    Should I let it continue or stop it?

    Thanks

  7. #27
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,046
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Recover data from NAS HD

    You have a lot going on. Forum support works best with a one-at-time process. First, put the Drive 1 New (that testdisk supposedly fixed) back into the NAS. If it is really hardware RAID1, and testdisk really did fix it, then your NAS should boot up and you should be able to see your data.

    If that is the case, put the second, blank drive and see if the NAS will image it to get the full RAID1 working.

    How long did the first copy take? 11 hours seems excessive. It's possible that the drive mechanism is bad or a controller issue, or something else. You can try to stop it, but since this is a RAID1, both disk drives should have the same data on it. You only need to recover 1 to get most of your data back.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  8. #28
    Join Date
    Jun 2008
    Beans
    23

    Re: Recover data from NAS HD

    I agree with you, this post is really a mess. And it is my fault. I am going to ask the admins to close it and open a new one. Thanks for the help

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •