[Discuss] RAID question

Patrick Nixniq-sneaking at sneakEmail.com
Sat Apr 30 20:28:43 PDT 2016


On Sat, 30 Apr 2016 18:00:44 -0700 (PDT)
Alan W. Irwin wrote:

> Hi Patrick:

Hi Alan.  :-)

> Interesting question but could you clarify your motivation here?  Is
> this to avoid unnecessary writes so as to avoid write wear on your SD
> cards?

That's a big part of it.  Would also save time, in the case of
removing a RAID 0 array, using it separately for a while, then
syncing its [unchanged] mirror with the [now changed] `master'.
That would still involve *reading* both drives from end-to-end
to compare them, of course, but would limit the time spent on
[slower] write operations.  Not sure if I'd ever actually use it
that way, but it would be nice to have that option, just in case.

Maybe I should explain the aforementioned `junk off eBay'...

Each RAID 0 array is basically an SD-to-SATA adapter, with slots
for four SD cards, and the form factor of a 2.5" laptop drive;
    http://www.ebay.ca/itm/200958485463

Identifying and replacing a failed card would be simple, if
time-consuming.  And in that case, dd would be fine for cloning
data onto a blank replacement card [reading data from its twin
on the other RAID 0 array, *not* from the damaged card].

The RAID 1 part comes in a dual-disk enclosure with its own RAID
controller;
    http://www.ebay.ca/itm/201169753737

The thing is, RAID 0 unfortunately has no tolerance for hardware
failure -- lose one card and lose *all* your data -- while RAID 1
only accelerates read operations [x2 , approximately], not writes.
And the advantages of RAID pile up, the bigger the array.  The
more the merrier.

Also, four-slot RAID boxes are *way* more expensive than two-slot
ones, for some reason, not to mention bulky.  This way I'd have
a compact, eight-member RAID 1+0 volume with a capacity of about
120GiB if I use 32GB cards.  Also, being modular, it would be
much cheaper to fix [replace piecemeal] than an SSD.  Overall
power consumption might even be less than a single spinning
drive, which would be nice for use with a laptop.

I'm not sure if the bottleneck would be the sustained-write
limits of the SD cards, or the throughput of the USB connection.
But I do know USB-connected single spinning drives have worked
well enough, so I'm not too concerned about that.

> 
> I did a google search using the terms <rsync raw disk blocks>, and got a lot of hits for similar ideas, but I think the consensus (just
> from reading the google summaries and not actually looking deeper)
> seemed to be this is outside the scope of rsync.  But if you read
> deeper you might find something interesting.
> 
> Another google search I did was for the terms <dd ssd> and there are
> apparently some tricks you have to be aware of even if you are willing
> to accept the write wear.

I know that with wear-levelling, SSDs can physically write data
almost anywhere, even if it's mapped to a specific block, but
this is something the OS never notices.  And this isn't an SSD,
in the usual sense.

The block size does get a little tricky, though...  Thanks for
the warning.


> 
> Alan

Patrick.
-- 
How many Unix hacks does it take to change a light bulb?
   Let's see, can you use a shell script for that or does it need
   a C program?



More information about the Discuss mailing list