Latest Entries »

Raspis maintenance

Raspis will be shut down for maintenance. Expected downtime: 20-30 minutes.
Sorry for the inconvenience.

EDIT: Back up, finished sooner than I expected.

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 »

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