system recovery

Questions about SNMP, Power, System, Logs, disk, & RAID.
Post Reply
paulsxt302
New here
Posts: 4
Joined: Thu Jan 06, 2022 7:59 am

system recovery

Post by paulsxt302 »

Hello All

I have been running a TS-670 for some time now and unfortunately I had a hardware issue with the motherboard. I purchased a TS-673A as a replacement and was hoping to run with a migration approach. Unfortunately this did not work for me.

I installed a temporary disk on the TS-673A and ran up the setup wizard. Setup a couple of backup users and enabled ssh access for all users. In addition I connected an external drive to one of the USB ports.

I then removed the temporary disk and installed the 6 old disks 1 at a time.

From there I ran the following:

Assemble root and swap

Code: Select all

# storage_util --sys_startup
Detect disk(8, 80)...
dev_count ++ = 0Detect disk(8, 48)...
dev_count ++ = 1Detect disk(8, 16)...
ignore non-root enclosure disk(8, 16).
Detect disk(8, 96)...
dev_count ++ = 2Detect disk(8, 64)...
dev_count ++ = 3Detect disk(8, 32)...
dev_count ++ = 4Detect disk(8, 0)...
dev_count ++ = 5Detect disk(8, 80)...
Detect disk(8, 48)...
Detect disk(8, 16)...
ignore non-root enclosure disk(8, 16).
Detect disk(8, 96)...
Detect disk(8, 64)...
Detect disk(8, 32)...
Detect disk(8, 0)...
/bin/cat: /sys/bus/pci/devices/0000:00:01.1/0000:01:00.0/subsystem_vendor: No such file or directory
/bin/cat: /sys/bus/pci/devices/0000:00:01.1/0000:01:00.0/subsystem_vendor: No such file or directory
/bin/cat: /sys/bus/pci/devices/0000:00:01.2/0000:02:00.0/subsystem_vendor: No such file or directory
/bin/cat: /sys/bus/pci/devices/0000:00:01.2/0000:02:00.0/subsystem_vendor: No such file or directory
Startup phase 2 device remapping

Code: Select all

# storage_util --sys_startup_p2
Ran RAID checker

Code: Select all

[/] # md_checker

Welcome to MD superblock checker (v2.0) - have a nice day~

Scanning system...


RAID metadata found!
UUID:		5b805338:11780a20:c90fe6cd:623b98a9
Level:		raid5
Devices:	6
Name:		md0
Chunk Size:	64K
md Version:	1.0
Creation Time:	Nov 26 01:05:16 2013
Status:		OFFLINE
===============================================================================================
 Enclosure | Port | Block Dev Name | # | Status |   Last Update Time   | Events | Array State
===============================================================================================
 NAS_HOST       3        /dev/sda3   0   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
 NAS_HOST       4        /dev/sdc3   1   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
 NAS_HOST       5        /dev/sdd3   2   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
 NAS_HOST       6        /dev/sde3   3   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
 NAS_HOST       7        /dev/sdf3   4   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
 NAS_HOST       8        /dev/sdg3   5   Active   Jan  5 10:03:44 2022  2902582   AAAAAA                   
===============================================================================================
Validated disk partitions

Code: Select all

[/] # mdadm --examine /dev/sd[a-z]
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sdb:
   MBR Magic : aa55
Partition[0] :        10488 sectors at            8 (type 83)
Partition[1] :      1000192 sectors at        10496 (type 83)
Partition[2] :      1000192 sectors at      1010688 (type 83)
Partition[3] :      5730560 sectors at      2010880 (type 05)
/dev/sdc:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sdd:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sde:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sdf:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
/dev/sdg:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
Assemble RAID group

Code: Select all

[/share] # mdadm -A /dev/md1 /dev/sda3 /dev/sdd3 /dev/sde3 /dev/sdf3 /dev/sdg3 /dev/sdh3
mdadm: failed to get exclusive lock on mapfile - continue anyway...
mdadm: /dev/md1 has been started with 6 drives.
Mount volume

Code: Select all

[/share] # mkdir /share/MD0_DATA
[/share] # chmod 777 /share/MD0_DATA
[/share] # mount -t ext4 /dev/md1 /share/MD0_DATA
[/share] # df

Filesystem           1K-blocks      Used Available Use% Mounted on
none                    409600    312596     97004  76% /
devtmpfs               4040632    457740   3582892  11% /dev
tmpfs                    65536       336     65200   1% /tmp
tmpfs                  4053728         0   4053728   0% /dev/shm
tmpfs                    16384         0     16384   0% /share
/dev/sdb5                 7928        47      7473   1% /mnt/boot_config
tmpfs                    16384         0     16384   0% /mnt/snapshot/export
cgroup_root            4053728         0   4053728   0% /sys/fs/cgroup
tmpfs                    24576       848     23728   3% /smb_tmp
/dev/md9                505300    486128     19172  96% /mnt/HDA_ROOT
/dev/md1             19373134284 15074853308 4297740304  78% /share/MD0_DATA <<OLD RAID Volume
/dev/sdh1            7781880724     94236 7781245816   0% /share/external/DEV3402_1 <<New External drive
Data as follows:

Top level

Code: Select all

[/share/MD0_DATA] # ls -l
total 208
drwxr-xr-x   4     0 administrators  4096 2021-11-11 14:11 Acronis/
-rw-------   1     0 administrators  9216 2022-01-05 00:18 aquota.user
drwxrwxrwx  19     0 administrators  4096 2022-01-04 21:35 backup/
drwxrwxrwx   4     0 administrators  4096 2022-01-04 21:35 datastore1/
drwxrwxrwx   3     0 administrators  4096 2022-01-04 22:22 DJ2/
drwxrwxrwx   8     0 administrators  4096 2022-01-04 21:35 homes/
drwxrwxrwx  18     0 administrators  4096 2022-01-04 21:35 installers/
drwx------   2     0 administrators 16384 2013-11-26 01:14 lost+found/
drwxrwxrwx  13 admin guest           4096 2022-01-04 21:35 media/
At the top level folder above I can read the Acronis, DJ2, homes and media directories.
I am unable to read backup, datastore1 and installers

Example as follows

Code: Select all

[/share/MD0_DATA] # cd Videos
-sh: cd: backup/: Permission denied
After troubleshooting further I now found that the admin user has lost root privileges and UID is now 1001

Code: Select all

[/share/MD0_DATA] # id 
uid=1001(admin) gid=1001(admin) groups=0(administrators),100(everyone),1001(admi
However admin is still a member of "administrators" and "everyone" so it should still have access to these directories and files.

I have even tried to modify/set ACLs but unable as i do not have root access

Code: Select all

[/share/MD0_DATA] # setfacl -M datastore1   
setfacl: datastore1: Permission denied
After running through this procedure twice i noticed that admin UID changed after I ran the storage_util process.

The plan is to run a copy from RAID volume to external drive. Something like the following:

Code: Select all

[/share/MD0_DATA] # cd Acronis
nohup tar cf - * | (cd /share/external/DEV3402_1/Acronis; tar xfp -) #
At this point the system is unmanageable and I cannot even shut it down cleanly.

Any insights on what is going on here is greatly appreciated

Regards
Paul
User avatar
dolbyman
Guru
Posts: 35015
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: system recovery

Post by dolbyman »

MD0_Data sounds like an old legacy volume.

For that, a complete start from scratch and restore from external Backups should have been the correct procedure
paulsxt302
New here
Posts: 4
Joined: Thu Jan 06, 2022 7:59 am

Re: system recovery

Post by paulsxt302 »

yes that is correct this is a legacy volume, however that is not why i am losing admin rights.

i do have backups but there is a small amount of data on that legacy volume that i would like to try and get back before i rebuild the system from scratch.
User avatar
dolbyman
Guru
Posts: 35015
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: system recovery

Post by dolbyman »

Maybe contact QNAP and see if they can help out
Post Reply

Return to “System & Disk Volume Management”