Latest Entries »

Reverse-engineering of Apple RAID 0

Neighbor of mine (who is a part-time video editor) recently had his Mac Book die on him and asked me to do some data recovery for him from a bunch of old HDDs, all, of course, formatted as Apple HFS+. Since he plans to replace his dead Mac with a Dell XPS, he needed me to extract all data from his old drives and reformat them as NTFS. Even though I’ve never ever owned any Apple hardware, I have no problem recovering data from Mac formatted drives, thanks to Paragon’s NTFS/HFS+ Linux driver (free version with limited functionality available here).

But there was one small problem. Two of the hard drives (2TB WD Blacks) were originally used as an Apple software RAID-0 array. While Paragon’s driver can mount HFS+ file systems, it cannot reconstruct or operate RAID arrays. Also, Apple’s RAID format is proprietary and there is no support for it on OS’es outside of OS X/macOS. Since I don’t have access to a Mac, I had no way to recover data from those two HDDs.

Out of curiosity, I’ve plugged in both RAID-0 HDDs to my main rig (booted to Ubuntu 18.04) anyway to check how they’re formatted. Both drives showed as GPT partitioned disks with three partitions on them: EFI, “Apple RAID” and “Apple boot”. It was pretty clear to me that the actual data I needed to extract was on “Apple RAID” partitions. Now how to I get Linux to recognize them as a RAID-0 array ?

I do know that RAID-0 is basically a stripe, alternating chunks of data between multiple drives.
Linux has it’s own RAID implementation in form of mdadm, which, apart from it’s own format, is also capable of reading some other RAID array formats, like Intel’s firmware RAID. But unfortunately, it does not support Apple RAID.
Since RAID-0 is just a stripe, that got me thinking: is there another way to get Linux to treat two block devices as a stripe ? Why yes there is. Say hello to Device mapper. Device mapper is a kernel driver (more precisely – a kernel framework) which allows you to remap physical block devices into virtual ones, including mapping multiple devices as a single device and even doing transparent block device encryption (in form of dm-crypt). This framework is widely used in various Linux-based OSes. For example Android uses dm-crypt for adoptable storage and app containers on SD cards. Device mapper is also used by LVM as a more flexible way to partition HDDs.
And, you probably guessed it, Device mapper supports mapping disks as stripes !

Could it be that Apple just uses a simple stripe for RAID-0 instead of some custom format ?
Again, out of curiosity I’ve tried mapping the two “Apple RAID” partitions as a Device mapper stripe using a simple script which I found online (can’t find the link right now, sorry). And to my pleasant surprise, the resulting stripe was happily recognized by Paragon’s driver as an HFS+ volume ! I did try to open a few files and all were perfectly readable.

I’m now in the process of copying all data from that RAID-0 array to another location, after which I will dismantle the array and reformat both HDDs as NTFS.

So it turns that at least Level 0 of Apple’s software RAID isn’t as proprietary as it seems.

Blog downtime was knocked offline by a massive DDoS attack on my provider’s network which lasted from approx 12 AM EEST until about 7 PM EEST.
My eMail and DNS are hosted by different providers and were were not affected.
Everything seems to work now. Sorry for inconvenience caused.

Raspis is down again, ISP issues

Raspis is having issues with ISP, traceroute shows no response at all from intermediate routers. Let’s hope they’ll resolve their issues soon.

Update: issues have been resolved, back online.

Raspis is offline

Raspis just went offline, reasons unknown. Unfortunately, it’s late night where I am and I won’t be able to fix the issue until tomorrow (12th).
Will update when the system is back online. Very sorry for inconvenience caused.
If you need any Android builds or any other material from Raspis, post a comment in Requests.

UPDATE: Came back online. By itself. How, I don’t know, but the uptime is zero so it has definitely rebooted.

UPDATE 17th. Down again. Again no reason. Let’s hope it comes the same way as it did before.
These crashes are getting annoying.

UPDATE: System was power-cycled physically, back online. Likely cause of crashes was the second RAM stick, I had to remove it.
Those little J1900 systems seem to be extremely memory picky.

Happy new year

Don’t have a lot to post, just wanted to say happy new year.
2010s is now the past.
Boy, time sure moves fast…

Raspis is down

Raspis server is down due to ISP maintenance work. Should be back shortly.
Sorry for inconvenience.

EDIT: Back up.

Zebra is down for maintenance

Zebra is down for hardware maintenance. Should be back online in a few hours max.

UPDATE: 5:40 PM EEST: Back online

Zebra is down

Zebra server is down due to a damaged fiber optic cable. Should be back online in approx 24h. Will update.
Sorry for the inconvenience.
Update 05.23 9:30 AM EEST: Back online. Took a bit longer than I expected.


I’ve noticed that some people are trying to contact me by writing comments on my latest blog posts.
For my e-mail address, click the link below this post.
If you want to write me or ask something and prefer not to use e-mail, do write a comment under this post.
I want comments on other posts to be relevant to the theme of the post.
View Full Article »

New main PC

I’ve decided to build myself a new PC for Christmas, to replace my aging i7 2600k.
lso got a new 4K monitor along with it.
CPU: i7-9700k (cooled by Corsair H100i Pro)
RAM: 32 GB DDR4 3000 (4x 8 GB Corsair Vengeance LPX)
MB: Gigabyte Z390 Aorus Pro
GPU: GeForce 2080 Ti (Palit 2080 Ti GamingPro, TU102-300A chip)

Samsung Evo 960 500 GB NVME SSD (from my old build)
Crucial MX500 1 TB SATA SSD
OCZ Vertex 3 120 GB SATA SSD (old beast, MLC based)
2x 2TB HDDs (Samsung HD204UI and Seagate ST2000DL003) in RAID 0

Case: Corsair 460X
PSU: Corsair TX850 V2 (old beast, but still going strong)
Monitor: LG 27UK600 4K @ 60 Hz
OS: Windows 10 Pro / Ubuntu 18.04 dual-boot

I plan to do some new Android x86 builds with this rig in near future. And of course, some 4K gaming.

— overclocking —

Tried doing some overclocking on the CPU and GPU, and I can already say that I likely did not win the highest prize in the silicon lottery. The 2080 Ti can handle +160 Core and +500 memory just fine but going beyond +160 core results in random GPU lockups (the more you push, the more unstable it gets) even though the temperature is way below 80 C. This is strange for what is supposed to be a higher-binned version of the Turing chip. The card is supposedly based on a reference schematic but with non-reference components. This suggests any BIOS from a reference card should work. And reference BIOSes do work (at least, they do not brick the card), but none I have tried so far are stable, even BIOS from OC version of the same Palit card.

As for the i7, I can’t find how to properly OC it. For my old 2600k, simply finding the right vCore voltage was enough, but squeezing out more power out of these modern chips requires much more research than just finding the right vCore. I did get 5 GHz to work, but with some random crashes every now and then. Right now, I’ve decided to call it quits and left the CPU at stock settings (I did leave the 95 W TDP limit disabled though).

Copyright © 2008-2020 DDS Central. Powered by WordPress. Theme: Motion (modified by DDS Central)