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 21:13] – niziak | hw:qnap_ts-228 [2023/03/16 13:19] (current) – niziak | ||
---|---|---|---|
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> | <code bash> | ||
Line 39: | Line 65: | ||
</ | </ | ||
- | * / | + | * / |
* / | * / | ||
* / | * / | ||
* '/ | * '/ | ||
* '/ | * '/ | ||
- | * / | + | * / |
* / | * / | ||
+ | |||
+ | 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> | <code bash> | ||
Line 51: | Line 80: | ||
mdadm --assemble --scan | 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 | pvscan | ||
WARNING: PV /dev/md1 in VG vg1 is using an old PV header, modify the VG to update. | WARNING: PV /dev/md1 in VG vg1 is using an old PV header, modify the VG to update. | ||
Line 83: | Line 163: | ||
ACTIVE | ACTIVE | ||
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 | ||
+ | </ | ||