• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

NAS lost raid config

ashman

Gawd
Joined
Mar 28, 2011
Messages
811
I have an older Qnap TS-639 (not the pro) that holds six 3TB drives and houses my TV media collection, roughly 9TB worth. Last night we suffered a power failure and I gracefully shut it down, the power came back on around 3AM and I was asleep so most everything powered back up automatically through my UPS's however this morning I log into the Qnap to find that raid config gone. I posted in the Qnap forum and have a guy helping my out, I am not that familiar with Linux and he's had me try some commands to get the RAID array mounted with no luck. Fortunately I have my data replicated so I haven't lost anything but before I format and begin restoring my data I wanted to post here and see if anyone has any thoughts on how I might able to mount the array. I should point out that the 3TB Segate drives I have in the this NAS are no longer supported, they once were on the compatibility list which is why I bought them, but they have since removed them, I have had them running since Feb of this year and had zero problems, the model is ST3000DM001-1CH1166 and the firmware on all of them is CC27.

Here is the output of some commands he had me run:


[~] # echo "NAS Model: $(getsysinfo model)"
NAS Model: TS-639
[~] # echo "Firmware: $(getcfg system version) Build $(getcfg system 'Build Number')"
Firmware: 4.0.2 Build 20130726



[~] # df -h
Filesystem Size Used Available Use% Mounted on
/dev/ram0 139.5M 109.3M 30.1M 78% /
tmpfs 64.0M 408.0k 63.6M 1% /tmp
/dev/sda4 364.2M 196.9M 167.3M 54% /mnt/ext
/dev/md9 509.5M 147.1M 362.4M 29% /mnt/HDA_ROOT
tmpfs 32.0M 0 32.0M 0% /.eaccelerator.tmp
[~] # mount
/proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
none on /proc/bus/usb type usbfs (rw)
/dev/sda4 on /mnt/ext type ext3 (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
tmpfs on /.eaccelerator.tmp type tmpfs (rw,size=32M)
[~] # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md0 : active raid5 sda3[0] sdf3[5] sde3[4] sdd3[3] sdc3[2] sdb3[1]
14643488000 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]

md6 : active raid1 sdf2[2](S) sde2[3](S) sdd2[4](S) sdc2[5](S) sdb2[1] sda2[0]
530048 blocks [2/2] [UU]

md13 : active raid1 sda4[0] sdf4[5] sde4[4] sdd4[3] sdc4[2] sdb4[1]
458880 blocks [6/6] [UUUUUU]
bitmap: 0/57 pages [0KB], 4KB chunk

md9 : active raid1 sda1[0] sde1[5] sdf1[4] sdd1[3] sdc1[2] sdb1[1]
530048 blocks [6/6] [UUUUUU]
bitmap: 0/65 pages [0KB], 4KB chunk

unused devices: <none>

[~] # mount /dev/md0 /share/MD0_DATA -t ext4
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[~] # mount /dev/md0 /share/MD0_DATA -t ext3
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Thanks
 
It looks like your filesystem is corrupt not a raid failure.

I would check

fsck.ext3

It would also be nice to see the dmesg output that the mount suggested

dmesg | tail
 
I can SSH into the NAS, from where and how to I execute the fsck.ext3 ? The file system is or was ext4 so shouldn't the command be fsck.ext4? My linux skills are poor to non existent.

Thanks
 
I would expect it to be in the path. Possibly /usr/sbin or /usr/bin

Yes try fsck.ext4 over fsck.ext3

Code:
Usage: fsck.ext4 [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
                [-I inode_buffer_blocks] [-P process_inode_size]
                [-l|-L bad_blocks_file] [-C fd] [-j external_journal]
                [-E extended-options] device

Emergency help:
 -p                   Automatic repair (no questions)
 -n                   Make no changes to the filesystem
 -y                   Assume "yes" to all questions
 -c                   Check for bad blocks and add them to the badblock list
 -f                   Force checking even if filesystem is marked clean
 -v                   Be verbose
 -b superblock        Use alternative superblock
 -B blocksize         Force blocksize when looking for superblock
 -j external_journal  Set location of the external journal
 -l bad_blocks_file   Add to badblocks list
 -L bad_blocks_file   Set badblocks list

You may want to use the -nv options at first to see what it will do before it does it. The reason is if the raid is not sane fsck can make the situation unrecoverable.

Also it would be nice to see the dmesg | tail output.
 
Last edited:
It doesn't look like your raid config is gone. It looks like there was some corruption within the partition of the raid 5 set (md0). You can double check the raid config with this:

Code:
mdadm --detail /dev/md0

If want to know more commands use this:

Code:
man mdadm

If the raid set is OK, which it probably is, then I would first check the disks for errors. Then the parittion with:

Code:
fsck.ext4 -v /dev/md0
 
[/bin] # mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Wed Jun 5 07:39:14 2013
Raid Level : raid5
Array Size : 14643488000 (13965.12 GiB 14994.93 GB)
Used Dev Size : 2928697600 (2793.02 GiB 2998.99 GB)
Raid Devices : 6
Total Devices : 6
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Tue Sep 23 06:56:01 2014
State : clean
Active Devices : 6
Working Devices : 6
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 4a69d01c:d1e8dbfa:9086116f:a3ffe75d
Events : 0.81655

Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 19 1 active sync /dev/sdb3
2 8 35 2 active sync /dev/sdc3
3 8 51 3 active sync /dev/sdd3
4 8 67 4 active sync /dev/sde3
5 8 83 5 active sync /dev/sdf3
[/bin] #
 
I can't seem to execute fsck, from no matter which directory I try it says 'command not found'
 
Back
Top