NAS and RAID1 questions.

After buying a new NAS and first having problems with corrupted HDDs i then thought all was good until i had an HDD configured as a single disk show as "in risk" so on restarting the NAS just to see if it was a bogus report the HDD was not visible so proceeded to hunt for recovery software and tried Photorecord which i had used successfully before but as the files where all various video i was not able to recover them,

Did try a couple of other bits of software and thought they where freewhare and once files where found they want £250 to recover so gave up ....but my maun question is why should a also be seeing files that where in the RAID1 array appear on the HDD configured as a single disk?
 

mickevh

Distinguished Member
RAID works at the "block" level not at the "file" level.

HDD's are divided into a number of fixed sized "blocks." When you store a file the file system will allocate the required number of blocks from a pool of "free" (unused) ones on the disc to contain your file, chop the file up chucks that fit in each block, the send them off to the disc and record which blocks are used and in what order in the file system catalogue.

So, say I've got a disc with 1K block size and I want to store a file of 2.5K. The filesystem will "find" some empty blocks on the disc from it's pool of "free" ones, let's say block numbers 9, 4 and 7 (no significance to these number, I've made them up as an example) store the first 1K of my file in block 9, the second 1K in block 4 and the last 0.5K in block 7. Finally the catalogue will be updated to list "myfile.txt" as residing in blocks 9,4,7 (in that order) with length 2.5K. You will note there's a bit of "wastage" in that the last block in the sequence is not filled.

In a RAID 1 ("Mirrored") array using two discs, the block structure is replicated identically on all discs in the RAID set. So literally every block on disc A is identical to the same block on disc B.

Thusly, if one of the discs dies, the files can still be read from the surviving disc as both discs are the same. We don't (colloquially) call RAID 1 "mirrored" for nothing. :D

When you replace the failed disc, the RAID controller will reconstruct the array by copying the contents of the surviving disc onto the new one. The bigger the discs, the longer it takes so your array will still be "at risk" until the rebuild is complete.

Other versions of RAID use different paradigms and for some of them it is not that the case that you can pull a disc out of the array and still read it. RAID 0 for example, "distributes" disc blocks across the array without any redundancy. For example in a two disc RAID 0 stripe, all the "even" numbered blocks might be on disc A and all the "odd" numbered blocks might be on disc B so if you drop a disc on a RAID 0 stripe you loose everything because quite literally every other disc block (including those that contain the catalogue) have gone missing and you cannot recover anything.

There are lot's of variations on these themes, this is just the basic fundamentals.
 
Last edited:

Sloppy Bob

Distinguished Member
....but my maun question is why should a also be seeing files that where in the RAID1 array appear on the HDD configured as a single disk?
This part doesn't make sense to me. Is it RAID1 (mirrored) or JBOD and only used a single disc?

What NAS and how many drives does it have?

I would note for the future, the AVForums mantra.

RAID isn't backup, it's redundancy.
RAID isn't backup, it's redundancy.
RAID isn't backup, it's redundancy.
RAID isn't backup...... repeat 996 more times.

RAID protects you if a disc fails. It doesn't protect you if you lose your NAS (fire, flood, failure, theft), you delete a file, your NAS is compromised by ransomware or some other nasty etc. It's only there if a disc corrupts or fails and you can carry on working while you replace the disc and the array rebuilds in the background.
 
My point/question is why should files only stored on a RAID1 array appear on other disks in the NAS that are only configured as single disk not JOBD or any kind of RAID configuration?

NAS is a Terramaster F5-221 and has five bays two are configured to RAID1 and the other three to single disk...i can understand that the other HDDs in the NAS will to a certain extent have RAID configured partitions on them but not the files to me it makes no sense.
 

mickevh

Distinguished Member
They won't unless the NAS has the ability and/or has been configured to so replicate them. Or you've manually copied them. Or some "other" device beyond you NAS has replicated them. "Out of the box" a file storage device won't be duplicating files unless it's been designed to do so.

The drives in a storage device can't be configured to participate in a RAID array "to a certain extent" - the drives are either part of a RAID set or they are not (ie JBOD) - there isn't any "halfway house" between the two - it's completely binary; disc X is either part of a RAID set or it is not.

Does your NAS offer any kind of "backup" service - some of them have software services that replicate data about the place. "Snapshots" are another candidate.
 
That's what i thought...very odd one of the tech staff on the dedicated forum was trying to tell me that RAID was use on all disks but like i said i really cant see this sort of replication happening with the way i have it configured...and there are apps that can be configured as a backup service but i dont have them enabled....thanks for the confirmation.
 

WarHog

Member
RAID works at the "block" level not at the "file" level.

HDD's are divided into a number of fixed sized "blocks." When you store a file the file system will allocate the required number of blocks from a pool of "free" (unused) ones on the disc to contain your file, chop the file up chucks that fit in each block, the send them off to the disc and record which blocks are used and in what order in the file system catalogue.

So, say I've got a disc with 1K block size and I want to store a file of 2.5K. The filesystem will "find" some empty blocks on the disc from it's pool of "free" ones, let's say block numbers 9, 4 and 7 (no significance to these number, I've made them up as an example) store the first 1K of my file in block 9, the second 1K in block 4 and the last 0.5K in block 7. Finally the catalogue will be updated to list "myfile.txt" as residing in blocks 9,4,7 (in that order) with length 2.5K. You will note there's a bit of "wastage" in that the last block in the sequence is not filled.

In a RAID 1 ("Mirrored") array using two discs, the block structure is replicated identically on all discs in the array. So literally every block on disc A is identical to the same block on disc B.

Thusly, if one of the discs dies, the files can still be read from the surviving disc as both discs are the same. When don't (colloquially) call RAID 1 "mirrored" for nothing. :D

When you replace the failed disc, the RAID controller will reconstruct the array by copying the contents of the surviving disc onto the new one. The bigger the discs, the longer it takes so your array will still be "at risk" until the rebuild is complete.

Other versions of RAID use different paradigms and for some of them it is not that the case that you can pull a disc out of the array and still read it. RAID 0 for example, "distributes" disc blocks across the array without any redundancy. For example in a two disc RAID 0 stripe, all the "even" numbered blocks might be on disc A and all the "odd" numbered blocks might be on disc B so if you drop a disc on a RAID 0 stripe you loose everything because quite literally every other disc block (including those that conatin the catalogue) have gone missing and you cannot recover anything.

There are lot's of variations on these themes, this is just the basic fundamentals.
Thats probably the simplest explanation I've read, thanks, makes it easy for me to understand.
 

Similar threads

The latest video from AVForums

Podcast: LCD TVs for Movies, Laser Projectors, RIP Ennio Morricone, AV & Movie news, B+W Matt Damon
Top Bottom