LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   HDDs after initialising in Synology not working anymore GPT lost (https://www.linuxquestions.org/questions/linux-hardware-18/hdds-after-initialising-in-synology-not-working-anymore-gpt-lost-4175619256/)

chicken057 12-09-2017 06:22 AM

HDDs after initialising in Synology not working anymore GPT lost
 
Hi folks,

I am lost what is going on here. It would be fantastic if you are able to help me to bring my disks back to live.

Code:

=================
sudo gdisk /dev/disk2
Password:
GPT fdisk (gdisk) version 1.0.3

Warning! Read error 5; strange behavior now likely!
Warning! Read error 5; strange behavior now likely!
Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.

=================
Command (? for help): p
Disk /dev/disk2: 5860533168 sectors, 2.7 TiB
Sector size (logical): 512 bytes
Disk identifier (GUID): DCC840E8-2BA0-473A-9828-FAC40C82044F
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 5860533101 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size      Code  Name


=================
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk2.
Unable to save backup partition table! Perhaps the 'e' option on the experts'
menu will resolve this problem.
Warning! An error was reported when writing the partition table! This error
MIGHT be harmless, or the disk might be damaged! Checking it is advisable.

Code:

=================
sudo fdisk /dev/disk2
Disk: /dev/disk2        geometry: 97451/255/63 [1565565872 sectors]
Signature: 0x0
        Starting      Ending
 #: id  cyl  hd sec -  cyl  hd sec [    start -      size]
------------------------------------------------------------------------
 1: 00    0  0  0 -    0  0  0 [        0 -          0] unused     
 2: 00    0  0  0 -    0  0  0 [        0 -          0] unused     
 3: 00    0  0  0 -    0  0  0 [        0 -          0] unused     
 4: 00    0  0  0 -    0  0  0 [        0 -          0] unused

I have no idea what is happening here but there is not GPT anymore on the disk and I am not able to write a new one. Everything I tried is giving me an input/output error but I cannot believe that 5 perfectly working disk all of a sudden don't work anymore.

Thanks in advance
Guido

smallpond 12-14-2017 11:52 AM

Try:

Code:

blockdev --getro /dev/disk2

If it prints "1" then the device has been set read-only.

chicken057 12-14-2017 01:45 PM

Quote:

Originally Posted by smallpond (Post 5793192)
Try:

Code:

blockdev --getro /dev/disk2

If it prints "1" then the device has been set read-only.

It is set to "0" and I can also write data with dd but simply cannot bring the HDD back to live because of the deep formatting. It seems that I would need to rewrite the GPT somehow manually. One thing is that this is a 512B/4096 drive but most of the newer drives are 4k drives.

sudo gpt -vv show /dev/disk2
gpt show: /dev/disk2: mediasize=3000592982016; sectorsize=512; blocks=5860533168

5860533168 = 732566646 (4k)

sudo dd if=/dev/zero of=/dev/disk2 bs=4k seek=732566500 --> writes properly 46 blocks

Any idea? I really tried anything I can find. But I somehow need to recover the GPT.

jefro 12-14-2017 03:02 PM

Can't hurt to run smart tests or the OEM diag suite.

Some of the nas products do some odd stuff. Could be using in a a different way than we'd think in linux.

Put the drive back in the nas and run diags maybe.

chicken057 12-15-2017 02:57 AM

I already ran SMART with the WD native tool and everything comes back fine. I can even write with DD to the complete disk and even to the last block. The thing I am wondering at the moment if this has something to do with the 4k disk itself as I am not able to dd with 512 byte only 4k and bigger. I put the drive already back to the NAS and that was my initial try but no chance to get this drives back to life there. That was actually the reason why I bought the SATA III to USB adapter. Very strange...but something must have done something do the disk I am not aware yet.


Quote:

Originally Posted by jefro (Post 5793282)
Can't hurt to run smart tests or the OEM diag suite.

Some of the nas products do some odd stuff. Could be using in a a different way than we'd think in linux.

Put the drive back in the nas and run diags maybe.


smallpond 12-15-2017 06:18 AM

Can you post the error from the system log?

jefro 12-15-2017 03:00 PM

I'd think a modern nas could initilize the drive. You say you dd'ed to it??? I'd assume it should need at least a standard mbr written to in now. Does gparted allow you to change it?

chicken057 12-15-2017 03:33 PM

The Synology just comes back with cannot format...and can't remember exactly what error message. Gparted will tell me input/output error and when I want to initialise a new GPT it will fail. And yes I can dd to it without any issue.

Quote:

Originally Posted by jefro (Post 5793660)
I'd think a modern nas could initilize the drive. You say you dd'ed to it??? I'd assume it should need at least a standard mbr written to in now. Does gparted allow you to change it?



All times are GMT -5. The time now is 04:34 PM.