meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
hw:qnap_ts-228 [2023/02/20 20:50] – niziak | hw:qnap_ts-228 [2023/03/16 13:19] (current) – niziak | ||
---|---|---|---|
Line 22: | Line 22: | ||
WDC WD20EFRX-68EUZN0 - CMR disc | WDC WD20EFRX-68EUZN0 - CMR disc | ||
+ | All partitions on one of RAID disc belongs to RAID: | ||
* 517,50 MiB | * 517,50 MiB | ||
* 517,72 MiB | * 517,72 MiB | ||
Line 30: | Line 30: | ||
* 10,34 MiB | * 10,34 MiB | ||
+ | < | ||
+ | sdb | ||
+ | ├─sdb1 | ||
+ | │ └─md9 | ||
+ | ├─sdb2 | ||
+ | │ └─md256 | ||
+ | ├─sdb3 | ||
+ | │ └─md1 | ||
+ | │ | ||
+ | │ | ||
+ | ├─sdb4 | ||
+ | │ └─md13 | ||
+ | └─sdb5 | ||
+ | └─md322 | ||
+ | |||
+ | |||
+ | sdc | ||
+ | ├─sdc1 | ||
+ | ├─sdc2 | ||
+ | ├─sdc3 | ||
+ | │ └─md1 | ||
+ | │ | ||
+ | │ | ||
+ | ├─sdc4 | ||
+ | └─sdc5 | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | apt install mdadm lvm2 | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | mdadm scan --assemble --scan | ||
+ | </ | ||
+ | |||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * '/ | ||
+ | * '/ | ||
+ | * / | ||
+ | * / | ||
+ | |||
+ | After installing mdadm, OS automatically create some MD devices, but some of them are in read-only state and consist only one RAID member. | ||
+ | To force correct detection again: | ||
+ | |||
+ | <code bash> | ||
+ | mdadm --stop /dev/md0 | ||
+ | mdadm --assemble --scan | ||
+ | |||
+ | mdadm --detail /dev/md1 | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid1 | ||
+ | Array Size : 1943559616 (1853.52 GiB 1990.21 GB) | ||
+ | Used Dev Size : 1943559616 (1853.52 GiB 1990.21 GB) | ||
+ | Raid Devices : 2 | ||
+ | Total Devices : 2 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean, degraded | ||
+ | Active Devices : 1 | ||
+ | | ||
+ | Failed Devices : 0 | ||
+ | Spare Devices : 1 | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Name : 1 | ||
+ | UUID : a1fa9f39: | ||
+ | Events : 1252602 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | Two members are present but one is in '' | ||
+ | To start rebuild switch array into RW mode: | ||
+ | |||
+ | <code bash> | ||
+ | mdadm --readwrite /dev/md1 | ||
+ | |||
+ | cat / | ||
+ | |||
+ | Personalities : [raid1] | ||
+ | md1 : active raid1 sdb3[2] sdc3[1] | ||
+ | 1943559616 blocks super 1.0 [2/1] [_U] | ||
+ | [===============> | ||
+ | </ | ||
+ | |||
+ | Another option to force correct resync - but not used in this case: | ||
+ | <code bash> | ||
+ | mdadm --stop /dev/md1 | ||
+ | mdadm --assemble --run --force --update=resync /dev/md1 /dev/sdb3 /dev/sdc3 | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | pvscan | ||
+ | WARNING: PV /dev/md1 in VG vg1 is using an old PV header, modify the VG to update. | ||
+ | PV / | ||
+ | Total: 1 [1,81 TiB] / in use: 1 [1,81 TiB] / in no VG: 0 [0 ] | ||
+ | |||
+ | vgdisplay | ||
+ | WARNING: PV /dev/md1 in VG vg1 is using an old PV header, modify the VG to update. | ||
+ | --- Volume group --- | ||
+ | VG Name vg1 | ||
+ | System ID | ||
+ | Format | ||
+ | Metadata Areas 1 | ||
+ | Metadata Sequence No 154 | ||
+ | VG Access | ||
+ | VG Status | ||
+ | MAX LV 0 | ||
+ | Cur LV 2 | ||
+ | Open LV 0 | ||
+ | Max PV 0 | ||
+ | Cur PV 1 | ||
+ | Act PV 1 | ||
+ | VG Size 1,81 TiB | ||
+ | PE Size 4,00 MiB | ||
+ | Total PE 474501 | ||
+ | Alloc PE / Size | ||
+ | Free PE / Size 0 / 0 | ||
+ | VG UUID | ||
+ | | ||
+ | lvscan | ||
+ | WARNING: PV /dev/md1 in VG vg1 is using an old PV header, modify the VG to update. | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | </ | ||
+ | |||
+ | ===== / | ||
+ | |||
+ | Volume is encrypted. It contains standard LUKS header. | ||
+ | Google says encryption password is derived from user supplied password using not know algo. | ||
+ | It points to NAS local utility: | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | Encrypted passwd is: ………………………………….. | ||
+ | </ | ||
+ | |||
+ | Reference: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ==== Try to run x86 QTS in Proxmox VM ==== | ||
+ | |||
+ | Set VGA to '' | ||
+ | Import raw image as VM disk: <code bash>qm importdisk 304 F_TS-X85_20170210-1.3.0_512M.img local-lvm --format raw</ | ||
+ | |||
+ | Problem: cannot stop at GRUB, it boots kernel, loads initrd and then stuck. Probably some HW dependencies are not met (emmc disk?). | ||
+ | Switched to simpler solution with Docker (see below). | ||
+ | |||
+ | ==== storage_util docker ==== | ||
+ | |||
+ | Based on files from '' | ||
+ | |||
+ | And it works. Generated password opens LUKS storage. | ||
+ | |||
+ | ==== mkpasswd ==== | ||
+ | |||
+ | After making Docker image, I found post on QNAP forum that the password can be generated using simple MD5 hash: | ||
+ | <code bash> | ||
+ | mkpasswd -m md5 -S YCCaQNAP | ||
+ | </ | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | cryptsetup luksOpen / | ||
+ | mount / | ||
+ | </ | ||
+ | ===== Recovery ===== | ||
+ | <code bash> | ||
+ | apt install testdisk | ||
+ | photorec / | ||
+ | </ | ||
+ | ===== unmount and shutdown ===== | ||
+ | <code bash> | ||
+ | umount / | ||
+ | cryptsetup luksClose nas | ||
+ | dmsetup remove vg1-lv544 | ||
+ | dmsetup remove vg1-lv1 | ||
+ | mdadm --stop /dev/md1 | ||
+ | mdadm --stop /dev/md256 | ||
+ | mdadm --stop /dev/md9 | ||
+ | mdadm --stop /dev/md322 | ||
+ | mdadm --stop /dev/md13 | ||
+ | </ | ||