Skip to main content

Broken RAID-1 Qnap TS 201 (how I got the data)

A few days someone gave me a TS 201 RAID NAS made by Qnap to fix.

It was very bad, the power light did not come on, it just pulsed a bit.
The external power supply was broken, the capacitors 16V/1000uF swollen up.
12 Volt 5 Amps standard PSU, I had a spare so that was easily fixed.
Trouble was not over, the device did not work. It beeped, lights were blinking, ugly noise from disk.
Connecting to NAS did not go easily, I found the IP address by using NMAP (I assumed it was using DHCP)

$ nmap -sP
.. some known machines..

Nmap scan report for
Host is up (0.00034s latency).

Connect to the thing using a web browser did not work.
type in : click 'administration'
That redirected to a webserver on port 6000 why?
New rules in Chrome and Firefox, blocking ports including 6000.

I got something like this very descriptive message : 
Error 312 (net::ERR_UNSAFE_PORT): Unknown error.

So I had to start chrome with some extra flag to get it working:
$ google-chrome --explicitly-allowed-ports=6000

I could see the disks off-line and log in, the mainboard seems to work.

I took out the hard disks, two Hitachi Deskstars of 320 GB and hooked them to my USB Sata converter.
One of the drives did not even make it, went into the trash.
The other spun up like expected.
Would I still be able to recover data? What is on this disk?

This was in my kernel log (dmesg)
[489397.065416] usb 1-4: new high-speed USB device number 18 using ehci-pci
[489403.457631] usb 1-4: New USB device found, idVendor=174c, idProduct=5106
[489403.457641] usb 1-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[489403.457647] usb 1-4: Product: AS2105
[489403.457652] usb 1-4: Manufacturer: ASMedia
[489403.457656] usb 1-4: SerialNumber:       VFD200R22BAKLC
[489403.458269] scsi20 : usb-storage 1-4:1.0
[489404.459130] scsi 20:0:0:0: Direct-Access     Hitachi  HDT725032VLA360  V54O PQ: 0 ANSI: 5
[489404.460233] sd 20:0:0:0: Attached scsi generic sg8 type 0
[489404.461542] sd 20:0:0:0: [sdh] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[489404.464852] sd 20:0:0:0: [sdh] Write Protect is off
[489404.464859] sd 20:0:0:0: [sdh] Mode Sense: 23 00 00 00
[489404.466835] sd 20:0:0:0: [sdh] No Caching mode page found
[489404.466841] sd 20:0:0:0: [sdh] Assuming drive cache: write through
[489404.471831] sd 20:0:0:0: [sdh] No Caching mode page found
[489404.471842] sd 20:0:0:0: [sdh] Assuming drive cache: write through
[489404.498322]  sdh: sdh1 sdh2 sdh3 sdh4
[489404.504822] sd 20:0:0:0: [sdh] No Caching mode page found
[489404.504835] sd 20:0:0:0: [sdh] Assuming drive cache: write through
[489404.504842] sd 20:0:0:0: [sdh] Attached SCSI disk

Let's see what Linux thinks of the partition table:

sudo fdisk /dev/sdh

Command (m for help): p

Disk /dev/sdh: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1   *          63     1060289      530113+  83  Linux
/dev/sdh2         1060290     2120579      530145   82  Linux swap / Solaris
/dev/sdh3         2120580   624960629   311420025   83  Linux
/dev/sdh4       624960630   625121279       80325   83  Linux

That is not bad, a linux formatted disk, it could be worse :-)

Let's mount it :
sudo mount /dev/sdh3 /mnt2
mount: unknown filesystem type 'linux_raid_member'

Too bad, not working....all data lost?

What now, lets see if it is a normal file system anyway, specify a file system type :
sudo mount /dev/sdh3 /mnt2 -t ext3

That worked, I could get the data from the disk.
I inserted two new disks WD Red 1 TB Hard Drive for NAS (WD10EFRX)

Now to put the stuff back onto the newly formatted (RAID 1) disk.
I created a user and share with the web interface of the Qnap TS-201. (default user/password is administrator/admin, this can be reset by pressing a reset button for 5 seconds)

I need to mount the new share under my linux console to copy the stuff back.
# mkdir /tmp/mymount
# sudo mount -t cifs // /tmp/mymount -ouser=shareuser,password=sharepassword,domain=WORKGROUP,sec=ntlm

do not forget the sec=ntlm or you will get a message like this :

mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Now this all worked I updated the firmware before loading the data onto the NAS again.
The latest firmware fixed the port 6000 problem, the admin interface moved to 8080.

I hope someone else can be helped by this information.
Have a good day.


Unknown said…
Wow, thanks! I needed this info. :-)

Popular posts from this blog

Denon DHT T100 DESIGNED TO FAIL : bad caps (ceramic caps this time)

A friend gave me a Denon DHT-T100 to look at.
Do not spend much time on it.. ok.

It had a problem, it started clicking and ticking after power on, and after some time.
(a so called intermittent problem)

Sometimes it did not tick or click, but it was basically not usable.
The clicking had a sharp click in one channel and repeated after about a second, then sound recovered and it would click and drop out again.

He told me, do not spend any time on it, yeah, right. ;-) like I would give up after 15 minutes.
I wanted to know what was going on with this thing, I found some schematic online and started measuring the usual things.

The power supply, 24V did it drop down when a tick occurred ? Difficult to find out because sometimes the thing would play for hours without a glitch.

I eventually found out the 24 V PSU, the step down SMPS on board and the LDO's were all ok, all power rails remained within spec, but it still glitched sometimes. (while power was ok)

I investigated methodically,…

Raspberry Pi, PyFace Digital, the lost documentation, I found it finally

The Raspberry PI or R-pi from is well known these days.
It is not an accident that I have one, I have been doing Linux stuff since 1991, and professionally since 1996 I can not skip over these developments, have to keep up with the new kids. :-)
Times have changed, hardware has become very affordable, everybody knows the Arduino, Raspberry Pi and Beagle-Bone-Black (BBB). Not everybody knows the stuff that aka Acme-Systems and aka Olimex make, so I will endorse them here.
Since I am an engineer I expect to connect switches and relays to the boards and some documentation with products, not so with the "PiFace Digital" board, it comes without serious documentation, not a even the schematic. All links on their blog point nowhere. People asked them many times, yet nowhere is the schematic to be found.

I finally found some info after hours of google-work, someone made a copy!

Nederland van het aardgas af, dat schiet lekker op (NOT!)

Om dingen even in perspectief te plaatsen moet je gewoon even wat berekeningen maken.
We gaan Nederland van het aardgas afhalen (de burgers) omdat?

In USA fakkelen ze 2123763,4944 m3 aardgas af per UUR
(bij winning van olie, gas is ongewenst daar, opslag niet handig, goedkoper om te fakkelen)

1.8 miljard cubic feet per dag...

Ons Nederlandse gasverbruik (huishoudens) is : 1500 m3 per jaar per huishouden

Even rekenen 2.1 miljoen m3 per uur, dat is

24 * 365 * 2.100.000,00 = 18.400.000.000,00 m3 aardgas affakkelen per jaar

(even de rekenmachine pakken)

18.400.000.000 / 1500 => aantal huishoudens Nederland

dat is voor 12.3 miljoen huishoudens (met gasverbruik van 1550 m3/jr)

Naast het opbranden lozen ze ook nog gewoon aardgas direct in de atmosfeer. (genaamd Venting)

Waarom moet ik ook alweer van het aardgas af?

Niet voor het milieu en de toekomst van onze kinderen, daarvoor helpt het helemaal…

ESP32 IDF master update troubles (and fix)

I am using ESP32 IDF for some private experiments. (more info later)

I really like it, not like some Arduino hobby IDE, that is a  half done, non-professional project.
I see a lot of people writing stuff like "do ESP32 in Arduino" this is completely backwards, you should avoid anything Arduino-related. You can not use Arduino in a real project, it can not be controlled, it is doing "magic" things and breaks everytime. You guessed it: I do not like it. ;-)

The ESP-IDF works really well uses cmake, is well documented, I use visual studio code insiders or clion van jetbrains to coordinate my coding and GIT to store my stuff.

I am really impressed with how well it works. Including flash-upload, debugging all works fine.

A few days ago I updated the IDF to the latest version and got errors:

$ git checkout master
$ git pull

remote: Enumerating objects: 1492, done.
remote: Counting objects: 100% (1492/1492), done.
remote: Compressing objects: 100% (213/213), done.
remote: Total…

DPS5005 power supply, remote control using python serial port modbus

Just a short one.
I bought one of these things.
It can do 50 volt 5 Amp, I have not looked at the quality of the output (noise, overshoot all unknown to me)  but should be alright to control a lamp, a battery or a strip of LED's is my guess.

You can easily control the current and voltage output using a serial port. (a usb-serial-rs485 was provided)

I seems to talk modbus protocol.

To change the baud rate and modbus-slave-address, keep POWER button pressed during power on, this will enter you into the configuration menu.

register list here :
Register Map for this device.
Function Description Number of bytes Decimal places UNIT Read/Write Register address U-SETVoltage setting2 2 V R/W 0000H I-SETCurrent setting2 3 A R/W 0001H UOUTOutput voltage display value2 2 V

Aircon Repair on Hyundai Getz (on the hottest day of the year)

Yesterday was the hottest day of the year 2013 to date. Temperatures reached 36 degrees C. Normal value for this time of year is about 24 degrees (according to KNMI).

My wife's car, a Hyundai Getz had a broken AC unit and I decided to fix it.  The AC light lit up just like normal but the clutch to the compressor did not kick in. After spending hours googling for schematics and diagrams, reading forums I found out why. The system is protected by a clever pressure switch, (conveniently located behind the glove compartment) It disables the clutch when pressure is too high or too low. After checking all things electrical, fuses, sensors, the clutch, the fans and switches I was out of options, I could not measure the pressure in the system.

I visited a local car repair shop specialized in Airco systems, Rene van de Louw, st. Oedenrodeseweg 40, and he quickly noticed that I had a leak in my condenser. How? He put some pressure on the system with nitrogen and I could hear a hissing sound…

Grinder and paint make me the welder I ain't.

Flux core.

It is not going anywhere soon!

Speaker modification for Old Timer Mercedes

Fixed voltage on cheap buck converter (MP1584) conversion with single 0805 resistor

Everywhere I look on the Ali and Ebays I see these step down converters based on MP1584. I bought a couple and actually they are not bad at all.

The output voltage is set by the trimming-resistor in the left top corner of the picture. This works OK, but.. it is dangerous because it is rather sensitive to the touch.
I decided that I wanted fixed output, so I had to figure out how this thing worked. The datasheet looks like this :
R1 in the datasheet is what I call "R feedback" in my image. The value of R2 is mostly 8.2K Ohm in the boards I have seen. 

So to set some common values for output voltage:
change R1 to 27K for 3V3 output (actually 3.4 volt, but 27K is a standard value)
change R1 to 43K0 for 5.0 Volt output. (43 K is a standard value)
A standard 0805 size resistor fits precisely, how convenient ;-).

Make sure the other resistor is really 8.2K because that determines the feedback ratio.

This way you can not burn up your circuits by accident (or some funny clown tu…

Maxtor Shared Storage (how I recovered all the data)

Maxtor Shared Storage NAS 300 GB

Summary of long adventure: TL;DR.


- Audience : advanced users
- linux skill required : yes
- strong opinion : yes
- frustration : yes

It looks so nice in the picture : storing data on a NAS, not on the local system.
You can access it from anywhere in the network, all is fine.
Until.. The NAS breaks down and you forgot the backups..

I had this NAS for a long time (several years), somewhere safe in the house, in a dry and protected and cool place, nobody would be able to find it, a digital safe, connected to my local network.

It seems a smart idea, but it really was not.

Here is my summary of trouble to get my data back.
1) The NAS did not appear in my network anymore
2) Checked power supply, switches, cables
3) conclusion, NAS is bad
4) reboot, does not come online again
5) open it up, take out harddisk, how hard can it be? Right?

I connected the disk to my machine with one of those PATA/SATA-to-USB things (20 euro th…