Will Murnane wrote: > On Tue, Sep 16, 2008 at 01:28, Ben Rockwood <[EMAIL PROTECTED]> wrote: > >> This is wrong... Ditto blocks are exactly what the name suggests, >> duplicate data blocks. If you write 8KB and "copies=2" 16KB is written >> to disk. >> > But by default copies=1, and only one block is written. >
Correct. >> The primary purpose of ditto blocks is to provide data redundancy when >> you do posses multiple disks, for instance on a laptop drive. If one >> > "do not"? > >> block becomes corrupt, ditto blocks can provide a duplicate block to >> prevent data loss. >> > Yes, but my understanding is that this isn't a very good method of > providing redundancy; AIUI the two copies aren't guaranteed to be on > different disks, so if that disk dies you've lost all the copies of > that file. Not to mention the pool won't be importable with a missing > disk. > Right. If your using RAIDZ, RAIDZ2 or Mirrors you either have a redundant block or can reconstruct one... therefore, Ditto Blocks are really only interesting when you have a single disk. I'll give you an example. I have Dell 2950's with nice LSI MegaSAS controllers with 256MB of Battery Backed Cache. I really want to use that, so I create a single RAID5 in hardware, then I create ZPool on it. Works well, fast. If there is a disk failure the controller deals with it, ZFS never knows. HOWEVER, I've have run into corrupt blocks in files (commonly database data files). UFS/EXT3/etc. wouldn't have even caught this. The MegaSAS controller isn't aware of it, but ZFS is. While there are redundant blocks on physical disk, ZFS can't see them and thus can't recover my block... this is a scenario in which I turned to Ditto Blocks (copies=2) to protect me. In this example (this is real) I realized that from the standpoint of protection, your better off giving the disks directly to ZFS than to put them behind a hardware RAID. If I'm going to use Ditto Blocks and consume double the disk, why not just use a mirror? In hardware I know present 2 RAID1's and mirror those in ZFS so I get write-back caching AND protection. Thus, RAIDZ/RAIDZ2 and Ditto Blocks should be considered mutually exclusive... if you use them together your wasting disk. (If someone can demonstrate that I'm wrong on this please do so.) >> Ditto blocks are NOT just for metadata. >> > True... but they aren't on (for all data) by default. You're right > that ditto blocks can be used to make multiple copies of data, but I > think they're a bad strategy for most situations. > Agreed. But as I've shown above, there are situations in which they are handy. Block corruption within a file is uncommon, but it does happen. The worst I saw was a single corrupt block in a 16GB data file..... what a PITA!!! :) This raises an important point... when you run a filesystem like ZFS that is aware of any possible corruption anywhere in the pipe you have to be prepared for it to find something. With great power come great re.... whatever. ;) benr. _______________________________________________ storage-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/storage-discuss
