THe story.
I have a Mybook Live 3TB Nas, and due to power/circuit break in my house, it won’t start up.
Now i found a repair script that can help you unbrick it, but there’s a crucial superblock backup that is needed to make the script work. And from all the superblock backups, this specific superblock is damaged which interups the process to unbrick the Nas hdd. Nor do i know how to manually install a new firmware and partition it correctly.
Now i am at wit’s end, and lacking the knowledge to manually input the commands that are in the script to make it work via terminal.
Things i have done so far
Installed curl and mdam (default settings)
sudo apt-get install curl
sudo apt-get install mdadm
-made the script executable
chmod +x sudo repair_mybooklive.sh
Gave terminal root and administrative privileges, before starting the script
su root
sudo -i
made sure dev/md0 is not mounted or in use, before starting the script
mdadm --stop /dev/md0
mdadm --remove /dev/md0
made sure i have the right hdd to run the script
sudo fdsik -l
Model: WDC WD30 EZRX-00MMMB0 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
3 15,7MB 528MB 513MB primary msftdata
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB primary raid
4 4624MB 3001GB 2996GB ext4 primary msftdata
Results from the script
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Checking for bad blocks (read-only test): 0.00% done, 0:00 elapsed. (0/0/0 errdone
Warning: the backup superblock/group descriptors at block 65536 contain bad blocks.
Warning: the backup superblock/group descriptors at block 98304 contain bad blocks.
Warning: the backup superblock/group descriptors at block 131072 contain bad blocks.
Warning: the backup superblock/group descriptors at block 425984 contain bad blocks.
Warning: the backup superblock/group descriptors at block 458752 contain bad blocks.
Warning: the backup superblock/group descriptors at block 491520 contain bad blocks.
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 0/16
Warning, had trouble writing out superblocks.mdadm: added /dev/sdc2
copying image to disk…
dd: writing to ‘/dev/md0’: Input/output error
362273+0 records in
362272+0 records out
185483264 bytes (185 MB) copied, 486,404 s, 381 kB/s
cp: failed to access ‘/mnt/md0/boot/boot.scr’: Input/output error
./repair_mybooklive.sh: line 359: /mnt/md0/etc/nas/service_startup/ssh: Input/output error
mdadm: stopped /dev/md0
My request
Could someone please help me with the following:
Basically i have two issues, superblock backup 65536 is damaged, and i can’t install the image.
Please tell me step-by-step instructions how i can repair this hdd.
-
fix the superblock size 65536 so this error goes away
#blocksize 65536 is required by the hardware, you won’t be able to mount if different.
mkfs.ext4 -b 65536 -m 0 $diskData -
what to delete from the script to make it run-without checking for bad superblock. (i already finished that test , took me 13 hours.)
OR -
help me decript the script commands, so i can manually enter them in terminal
-
How to implement this command to restore superblock from other superblock backup.
sudo e2fsck -b block_number /dev/xxx
script will use the following disk:
Model: WDC WD30 EZRX-00MMMB0 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gptNumber Start End Size File system Name Flags
3 15,7MB 528MB 513MB primary msftdata
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB primary raid
4 4624MB 3001GB 2996GB ext4 primary msftdatais this REALLY the disk you want? [y] y
IMAGE
IMPLEMENTATION
everything is now prepared!
device: /dev/sdc
image_img: ./CacheVolume/upgrade/rootfs.img
destroy: falsethis is the point of no return, continue? [y] y
mdadm: /dev/sdc1 appears to contain an ext2fs file system
size=1999808K mtime=Thu Sep 18 09:10:04 2014
mdadm: size set to 1999808K
mdadm: creation continuing despite oddities due to --run
mdadm: array /dev/md0 started.
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
125184 inodes, 499952 blocks
24997 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=515899392
16 block groups
32768 blocks per group, 32768 fragments per group
7824 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912Checking for bad blocks (read-only test): 0.00% done, 0:00 elapsed. (0/0/0 errdone
Warning: the backup superblock/group descriptors at block 65536 contain
bad blocks.Warning: the backup superblock/group descriptors at block 98304 contain
bad blocks.Warning: the backup superblock/group descriptors at block 131072 contain
bad blocks.Warning: the backup superblock/group descriptors at block 425984 contain
bad blocks.Warning: the backup superblock/group descriptors at block 458752 contain
bad blocks.Warning: the backup superblock/group descriptors at block 491520 contain
bad blocks.Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 0/16
Warning, had trouble writing out superblocks.mdadm: added /dev/sdc2synchronize raid… done
copying image to disk…
dd: writing to ‘/dev/md0’: Input/output error
362273+0 records in
362272+0 records out
185483264 bytes (185 MB) copied, 486,404 s, 381 kB/s
cp: failed to access ‘/mnt/md0/boot/boot.scr’: Input/output error
./repair_mybooklive.sh: line 359: /mnt/md0/etc/nas/service_startup/ssh: Input/output error
mdadm: stopped /dev/md0all done! device should be debricked!