Hello i been thinking of a project with Naz. Naz stands for Network attached storage. What that means is you got a SD card or hard drive attached to a device that is connected to a network which may or may not be connected to the internet. And in that connected you are able to access the files Viewing them or upload, Deleting them. But my Question is it possible to do Raid 0? What that means is when you have 2 SD cards attached to a device in Raid 0 that Splits up the files half to one SD card and the other half of the file to the second SD card. What that does is speeding up so reading from the SD card is faster and transferring files to and from the SD cards is faster. But there is a downside to the setup. If one of the SD cards fails all Data is lost. But this is part of my project I'm thinking about. So what I'm still asking is it possible to Split up files into two SD cards but able to view download the files as a whole if needed?
If it's possible, it will be in the SDFat.h library.
Start reading:
If you're using 2 SD cards, I would just write the file(s) to both, so if one dies you have a backup.
Paraphrasing: "Is it possible to divide a file across multiple disks and still access the whole file from one disk?"
No. There's an inherent contradiction there.
You could do as CrossRoads suggested and use the disks for redundancy only, but that likely wouldn't accomplish your speed aim. Another possibility would be to do the striping when the files are initially written (for speed), but allocate the full size of the file on each disk. Then come back later (during idle time) and replace both of the striped files with the whole file, gotten by overlaying the stripes. I haven't looked at the SdFat library, but I'm guessing that doing this in an efficient way is beyond its capabilities. You'd need some kind of journaling scheme to keep track of your de-striping process and which files were striped versus whole. It would be complex.
Hello Crossroads for that. I did in face did multiple drives But that is called raid 1 redundancy. So if i one fails you have the other second one as a backup. I do have that part down that is the other part of my project. But Jaholmes said raid 0 is called Stripping. What that does is split the files Equally between two dicks and that comes in handy because it helps with the Speed of transfer of files.
Jaholmes you are right it would be a task in doing this and Sense I'm not much of a programmer i have no clue. I do have the hardware to do it. i have a few arduino mo pro boards which are 32bit processors. But arduino coding a side might be lacking. So if i can not do raid 0 and i do know how to do raid 1 is there another option that i can use it be nice to do a raid 5. Can't do a 10 1+0 LOL
See if your SD card isn't able to run wayyyyyyy faster than your Arduino can send or read data on SPI.
With a PC and hard drives it is the drives that limit the speed and RAID 0 alleviates some of that.
What you would do will take resources and suck cycles while slowing down the data rate.
The RAID 1 thing however could provide reliability for serious projects.
Hello GoForSmoke In raid zero is not limit on speed in fact it Improves the speed a lot However in this Case in Raid zero the down fail is if one of the SD card fails everything is gone. the reliability of a Raid zero is not good. But in the case of a Raid 1 there is Reliability is there because there are 2 or more SD card with the same Information files on them so if one fails you do in face have a backup. but the Speed is limited Because you are writing to two or more SD cards at one time. in In raid 0 your are Striping the files that means to split up the files to two SD Cards that increases the Speed of processing a lot.
But you are right in the one case of having Raid 1 is the reliability. In my project i do have Raid 1 I'm also trying to do Raid 0 not only having the speed of it but also raid 1 of having redundant . I could do a Raid 10 which is Raid 1+0 But it really be Raid 0 twice.
josephchrzempiec:
Hello GoForSmoke In raid zero is not limit on speed in fact it Improves the speed a lot
Only when the computer delivers data faster than a single drive can buffer and store it.
When the computer can't keep up with the drive, splitting the data offers no speed increase.
If you can't fill one pipeline, two pipelines won't carry more load. 16MHz AVR is not high speed PC bus.
Buy small capacity class 10 SD cards and run a fast SPI bus if you want more speed from Arduino+SD.
If you are having latency problems (completely different matter that RAID 0 does not address except that then there are TWO latency sources) then using a dedicated controller to buffer SD IO can help with that as can using the small capacity high class SD cards. Nick Gammon shows how to run an AVR as an SPI slave in one of his blogs.
josephchrzempiec:
Naz stands for Network attached storage.
Network Attached Ztorage? No. It is called NAS.
I thought the OP was referring to the St Nazaire raid in WWII and wondered how an arduino could have any connection...
ho hum
Allan
(deleted)
I'm sorry it's called Nas LOL i got home late last night when i wrote this. Reading Smoke information there is correct. Also I'm not using a AVR processor. I'm using a arduino 32bit processor. The m0 pro board. Which should help with processing and buffering. Yes there will be some problems but at least it won't be the processing part i hope.
Speed Class and UHS Speed Class provide the constant speed necessary for video recording by designating a minimum writing performance so that minimum and constant speed could be achieved for camcorders, video recorders and other devices with video recording capabilities under the conditional write operation specified in the standard.
Fast SD writing has minimal writing performance. Class 10 minimal is 10MB/sec. Big B is bytes, not bits.
What is your ARM CPU speed and SPI clock divider? Due cpu runs 84MHz.
You are more well served by buffering data in a dedicated sub-system serving a Class 10 or faster SD card.
You would be better served by a sub-system that can serve a SATA HD or SSD if your requirements are arbitrarily high, the top end SD is good for 90MB/s minimal. Do the math.
When I ran RAID 0, my PC ran 1Gz and the drives were IDE with large buffers for the time.
allanhurst:
I thought the OP was referring to the St Nazaire raid in WWII and wondered how an arduino could have any connection...ho hum
Allan
I thought Godwin's Law was about to be fulfilled in the most bizarre way imaginable.
Perhaps the reference is to The Nazarene?
Or an oblique reference to one of David Bowie's alter egos. (Hint: Ziggy Stardust lyrics)
It's been a sense i did anything with network attached storage. And I'm learning a lot about it over again. Buy the looks of it maybe sticking with raid 1 would be the best bet. To have the redundancy then the speed it's self. But I'm not giving up on doing raid 0 nor by a long shot. Thank you everyone for the help and information. I have learned a lot it had been a long time. I wasn't good at it back then but now in learning over again. I will update this post in a later time to see where I'm at and what I have done and sketches and libraries I have use. Might be surprised and figure out something different