I inserted a second qnap-bootable disk and now it's corrupted, need help to restore data

Questions about SNMP, Power, System, Logs, disk, & RAID.
Post Reply
nas-user-221004
First post
Posts: 1
Joined: Tue Oct 04, 2022 6:01 pm

I inserted a second qnap-bootable disk and now it's corrupted, need help to restore data

Post by nas-user-221004 »

Hi all, I'm a long-time QNAP user but I just screwed up and I need your help.

I have one TS-251+ running the latest stable QTS 5 with a 4TB HDD (let's call it HDD-4, it's in the first bay).

I got a new 8TB HDD (HDD-8), and I wanted to do a refresh reinstall of the NAS so I pulled out HDD-4, inserted HDD-8 (into the first bay), initialized the NAS like a new one, created a static volume (no storage pool involved).

I wanted to try if I can directly migrate data from HDD-4 to HDD-8, so I inserted the original HDD-4 into the second bay, I expected it to act somehow like an external disk. But no, I could see a disk in Storage & Snapshots, but it was not readable and seemed like I have to create a new volume which would erase the data, so I shut down the NAS and pulled out both disks.

I wanted to make sure data is not lost, so I inserted only the origin HDD-4 into the first bay and started NAS, thinking it should work as nothing happened, yet it's not bootable and I got redirected to the system initializing screen.

I connected the HDD-4 as external disk using USB, and in qnap's file station I can see folders and files like this, seems like qnap related data, but no real data:

Code: Select all

/Dev1Partition1
  .config
  .inited
  .logs
  lost+found
  twonkymedia
  update_pkg
/DevPartition4
  lost+found
  opt
External storage shows
Image

And in fdisk -l shows:

Code: Select all

Disk /dev/sda: 8001.5 GB, 8001563222016 bytes
255 heads, 63 sectors/track, 972801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      267350  2147483647+  ee  EFI GPT

Disk /dev/sdb: 515 MB, 515899392 bytes
8 heads, 32 sectors/track, 3936 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          41        5244   83  Linux
/dev/sdb2   *          42        1922      240768   83  Linux
/dev/sdb3            1923        3803      240768   83  Linux
/dev/sdb4            3804        3936       17024    5  Extended
/dev/sdb5            3804        3868        8304   83  Linux
/dev/sdb6            3869        3936        8688   83  Linux

Disk /dev/md9: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md9 doesn't contain a valid partition table

Disk /dev/md13: 469 MB, 469893120 bytes
2 heads, 4 sectors/track, 114720 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md13 doesn't contain a valid partition table

Disk /dev/md256: 542 MB, 542834688 bytes
2 heads, 4 sectors/track, 132528 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md256 doesn't contain a valid partition table

Disk /dev/md322: 7408 MB, 7408779264 bytes
2 heads, 4 sectors/track, 1808784 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md322 doesn't contain a valid partition table

Disk /dev/md1: 7991.3 GB, 7991369334784 bytes
2 heads, 4 sectors/track, 1951017904 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/dm-1: 7911.3 GB, 7911329759232 bytes
255 heads, 63 sectors/track, 961831 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-0: 7911.3 GB, 7911329759232 bytes
255 heads, 63 sectors/track, 961831 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/sdc: 4000.7 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      267350  2147483647+  ee  EFI GPT

I connected HDD-4 into my other machine (I'm using a mac with macfuse+ext4fuse for ext4 format) and it's not readable as well, here's what I got from diskutilitiy and fdisk.

Code: Select all

> diskutil list

/dev/disk1 (synthesized):
...

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk2
   1:       Microsoft Basic Data                         542.8 MB   disk2s1
   2:       Microsoft Basic Data                         542.9 MB   disk2s2
   3:       Microsoft Basic Data                         4.0 TB     disk2s3
   4:       Microsoft Basic Data                         542.9 MB   disk2s4
   5:       Microsoft Basic Data                         8.6 GB     disk2s5

Code: Select all

Disk: /dev/disk2	geometry: 219051/255/63 [3519069872 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   1 - 1023 254  63 [         1 - 4294967295] <Unknown ID>
 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 want to ask how to fix this situation and read the data from the disk HDD-4, any suggestion would be helpful, thanks!

---

Doing research, output from fsck.ext4:

Code: Select all

sudo fsck.ext4 -n /dev/disk2s3
Password:
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
/usr/local/opt/e2fsprogs/sbin/fsck.ext4: Superblock invalid, trying backup blocks...
/usr/local/opt/e2fsprogs/sbin/fsck.ext4: Bad magic number in super-block while trying to open /dev/disk2s3

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/disk2s3 contains a lvm2pv file system
Last edited by nas-user-221004 on Tue Oct 04, 2022 9:40 pm, edited 3 times in total.
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: I inserted a second qnap-bootable disk and now it's corrupted, need help to restore data

Post by dolbyman »

Single disk and worried about the data? ..What was the backup plan here on disk failure? ALWAYS have external backups!

Best to contact QNAP via ticket!
dosborne
Experience counts
Posts: 1814
Joined: Tue May 29, 2018 3:02 am
Location: Ottawa, Ontario, Canada

Re: I inserted a second qnap-bootable disk and now it's corrupted, need help to restore data

Post by dosborne »

Inserting more than one disk INTERNALLY, as you have found out, is in no way similar to using and external disk.

May be helpful to post an actual firmware version number. There are many. For example, the 5.0.x is very new and has lots of issues that are being fixed by QNAP. The 5.0.1 stream is still really a Beta stream as there are many substantial issues still outstanding. Personally, I'm not ready to move my main systems off the 4.5.4 stream yet.

What I would suggest, similar to @dolbyman, is to work with support to get your original HDD working on its own. Then, get a proper external backup. Then, either add the second HDD and migrate the data, or simply reconfigure with just the new drive if that is your intention long term, and restore the data from the backup. Then, keep regular backups :)

Disk "swapping" is not a good thing to do with any NAS, unless you are replacing a failed disk or upgrading. Many users consider a NAS to be a USB HDD "dock". It is not and will just lead to data loss and a lot of grief. Most of my NAS boxes have the same drives still inserted after 10 years of use. When I need more space, I tend to just get a more current device and keep the old ones as a backup (although I did put a couple of 18TB drives into an old QNAP as offline storage, but essentially only did one disk change in 6 years).
QNAP TS-563-16G 5x10TB Seagate Ironwolf HDD Raid-5 NIC: 2x1GB 1x10GbE
QNAP TS-231P-US 2x18TB Seagate Exos HDD Raid-1
[Deadbolt and General Ransomware Detection, Prevention, Recovery & MORE]
Post Reply

Return to “System & Disk Volume Management”