Friday 24 May 2013

I am back

I think I will start to pick up this blog again personally.

Thursday 17 March 2011

Special RAID Type

Recently, I’ve seen two very special types of RAID. They are neither RAID5 nor RAID6. But they have the same tolerance of drive failure as RAID5/RAID6, where the data is still recoverable when two drives are failed.



1. RAID from Adaptec 3805
It has a data stripe size of 512 sectors and two rows as one data unit (5 data stripes) cycle. The data structure is:



P1= D5 XOR D2
P2= D1 XOR D3
P3= D2 XOR D4
P4= D3 XOR D5
P5= D4 XOR D1

For example, if Drive 1 and Drive 3 are failed, data on them can be regenerated by:
D1= D4 XOR P5;
D3= D5 XOR P4;




Due to the parity bits are not on the same row as the data bits, there is no software available in the market supports the regeneration of the missing data strips from crossed-row data and parity. The parity has to be on the same row as the data to regenerate the missing data by R-studio. Special script needs to be written to regenerate the content of the failed drives, so as to use conventional software to retrieve the data in the final step.
To regenerate the D1 on the first row of each data unit cycle, as in the example above, the script will calculate the XOR result between D4 on the first row and P5 on the second row and store the result on the first row of the missing drive. After running the script, the data structure will look like:



Now, we can use the R-Studio to retrieve the data. Build a virtual RAID using all the working drives and the drives regenerated. Set the RAID type as customized:




2. The second special type of RAID allows maximum two failed drives. It uses the redundancy of the original data, playing the same role as the parity. The data structure is:



Within a data unit cycle, it also has two rows as the first type. There is no parity at all. The green colored set of data is the redundancy. As can be seen from the data structure, even though it supports up to two failed drives, these two failed drives can NOT be 1+3, 1+4, 2+4, 2+5, 3+5. Any other failed drives combinations will be tolerated. For example, Drive 1 and Drive 2 are failed.




Using R-Studio, we can construct a customized virtual RIAD to retrieve the data as:


Written by: Zijian Xie (R&D Manager, MSc,BEng)

Thursday 24 February 2011

Script to attach MDF without LDF under SQL2000

USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
UPDATE SYSDATABASES SET STATUS =32768 WHERE NAME='db_NAME'
Go
sp_dboption 'db_NAME', 'single user', 'true'
Go
DBCC CHECKDB('db_NAME')
Go
update sysdatabases set status =28 where name='db_NAME'
Go
sp_configure 'allow updates', 0 reconfigure with override
Go
sp_dboption 'db_NAME', 'single user', 'false'
Go

Seagate 7200.12 ‘SIM ERROR’ Firmware Fault

The symptoms of ‘SIM Error’ firmware fault from hard drives belong to Seagate 7200.12 family are:

1. Hard drive status keeps BUSY forever after switching on;

2. In the serial command line, it outputs (when PCB is attached to hard drive):

SIM Error 3005
No HOST FIS-ReadyStatusFlags 2002A1A5
ASCII Diag mode

3. In the serial command line, it outputs (when PCB is detached from hard drive):

No HOST FIS-ReadyStatusFlags 2002A1A5

To use the conventional method of fixing a ‘BUSY and LBA=0’ 7200.11 hard drive, it outputs:

No HOST FIS-ReadyStatusFlags 2002A1A5
ASCII Diag mode
F3 T>/2
F3 2>Z
Spin Down Complete
Elapsed Time 6.015 secs
F3 2>
ASCII Diag mode
F3 T>/2
F3 2>U
HighPowerMode
ExecuteSpinRequest
Spin Up Complete
Elapsed Time 3.624 secs
F3 2>/1
F3 1>N1
Init SMART Fail

The initialization of SMART module is failed even though the hard drive passes the Spin up and Spin down operation. To solve this problem, instead of doing N1 to clear the SMART after comand U, we use command m0 first.

(P) SATA Reset

SIM Error 3005
No HOST FIS-ReadyStatusFlags 2002A1A5
ASCII Diag mode

F3 T>/2

F3 2>Z

Spin Down Complete
Elapsed Time 6.035 secs
F3 2>U

HighPowerMode
ExecuteSpinRequest

Spin Up Complete
Elapsed Time 3.573 secs
F3 2>/

F3 T>m0,2,2,,,,,22
Max Wr Retries = 00, Max Rd Retries = 00, Max ECC T-Level = 16, Max Certify Rewr
ite Retries = not supported

User Partition Format Successful - Elapsed Time 0 mins 00 secs

F3 T>/1

F3 1>N1

Clear SMART is completed.
F3 1>
Rst 0x08M
(P) SATA Reset


Written by: Zijian Xie (R&D Manager, MSc,BEng)

Thursday 13 January 2011

Types of RAID6

1. P+Q RAID6

Each data stripe of a P+Q double parity RAID6 has a standard RAID5 parity and a ‘Q’ parity which is generated by Reed-Solomon coding algorithm. It allows up to two drives failure. The minimum number of disks is 4.

The HP ADG RAID6 is a special type of P+Q RAID6. Within each standard data stripe, there are an integer number of smaller data stripes where the P and Q parities remain on the same disk. This is also called delay parity. Generally speaking, this type of RAID6 has a delay parity value of 16.


2. NetApp Double XOR RAID 6

It is also called RAID-DP and has a similar data structure of RAID4. P and Q parities are generated and stored on the same drives. It allows up to two drives failure. The minimum number of disks is 4.




3. X-Code RAID6

It is also called vertical XOR RAID6. The minimum number of disks is 4. It allows up to two drives failure. Each data stripe group has N (disk number) of data stripes. For example, if it has 5 disks, each data stripe group has 5 rows of data stripes as shown in the figure below.




4. ZZS Code RAID6
The minimum physical number of disks of ZZS code RAID6 is 5 and it has to be a prime number (5, 7, 11, 13, 19...). But the ZZS coding algorithm also allows one of the drives contains zeros. In another word, the minimum logical number of disk is 4. In ZZS coding algorithm, it also defines the calculation unit (one cycle) is equal to (n-1)/2 if there is n physical disks in the RAID6. For example showing below, it has 7 disks, thus, each cycle has three data stripes.



5. Park Code RAID6
Park is an engineer of IBM. He designed a new coding algorithm to implement a type of RAID6, supports disk number of 3 to 38. Park code RAID6 is always using three data stripes as a calculation unit.




Currently, I don't find any software application support the ZZS and Park RAID6. But, with all the disks intact, the data are still retrievable by customised RAID of R-studio. Leave your comments if you know any other types of RAID6 or solutions.


Written by: Zijian Xie (R&D Manager, MSc,BEng)




Thursday 11 November 2010

256-Bit Based Hardware Encryption on WD MyBook Essential

Western Digital’s refreshed My Book Essential external hard drive provides a simple, secure, and inexpensive home backup solution. With an enormous 2TB capacity, built-in WD SmartWare software, 256-bit built-in encryption with user password protection, there is very little not to like here. But, imagine what would happen if the hardware of the device is broken? For example, the PCB board of the hard drive is damaged by a power surge. Can data recovery engineer retrieve any user data by any conventional techniques? A test is being carried out on two 320GB WD MyBook Essential external hard drives for research purpose.



Two drives are initialized by factory default setting and there are no user password being used. Use a hex editor to view the sector 0 and sector 1 from these two drives (as shown in the figure below respectively). Sector 0 is a Master Boot Record. Sector 1 contains a patterning data where it should be zero in a conventional hard drive. The patterning data are unique and different on two drives (as shown in the table below).

Drive A 0x E6 89 D2 0F D3 62 4C F8 3A 2E 7B B7 6A 7A FC BF
Drive B 0x 3A 73 9F 10 1A 47 97 F2 9A 31 BB E5 CC 8F 97 50







Assume that both PCB boards are now damaged by users and the drives are not spinning up anymore.



A compatible PCB is borrowed from a donor drive (as shown in the figure below).


Direct replacement of WD PCB is not going to work. The adaptive ROM content on the donor PCB needs to be recreated by ROM overlay modules on the platter. This can be achieved by firmware manipulation tool, which is not introduced here. The reason of using a SATA interface PCB instead of USB interface on a donor drive, it is because the firmware repair utilities don’t support USB interface for firmware manipulation. Once the ROM is regenerated and the PCB is attached to the failed hard drives, both hard drives are spinning up again and recognized by computer correctly.

Use a hex editor to view the same sectors again after replacing the PCB, sector 0 contains some data, which look like have been encrypted, and sector 1 contains zeros. Obviously, the contents are totally different to what they were seen before the PCB was swapped.





Based on the test above, the original PCB utilizes an encryption feature where the decryption key is unique to a hard drive. Even the sectors are become accessible through a donor PCB, the user files are still not recoverable without the original PCB being fixed. The patterning data stored at sector 1 and some following sectors where they should contain zeros are the key parameter to the decryption process. But there is only the WD knows the decryption algorithm until someone else is able to disclose it by reverse engineering. Bear in mind that, the patterning data will be unknown without the original PCB is working. So, to find out the key parameter, the controller chip and/or the firmware modules have to be looked at.

Written by: Zijian Xie (R&D Manager, MSc,BEng)

Thursday 14 October 2010

Deleted Microsoft SQL Database Recovery Case Study

The video will show how we use the File Defragmentation Technique (FDT) to retrieve a accidentally deleted Microsoft SQL database (SQL2000, SQL2005, SQL2008). A comparison on the recovery performance between conventional DR method and FDT will be given too.

(Keyword: Forensic MDF Recovery, SQL Recovery, SQL Deletion Recovery)