Steve Hull wrote: > Sooo... I've been reading a lot in various places. The conclusion I've > drawn is this: > > I can create raidz vdevs in groups of 3 disks and add them to my zpool to be > protected against 1 drive failure. This is the current status of "growing > protected space" in raidz. Am I correct here? > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Correct. Here's some quick summary information: a POOL is made of 1 or more VDEVs. POOLs consisting of more than 1 VDEV will stripe data across all the VDEVs. VDEVS may be freely added to any POOL, but cannot currently be removed from a POOL. When a vdev is added to a pool, data on the existing vdevs is not automatically re-distributed. That is, say you have 3 vdevs of 1GB each, and add another vdev of 1GB. The system does not immediately attempt to re-distribute the data on the original 3 devices. It will re-balance the data as you WRITE to the pool. Thus, if you expand a pool like this, it is a good idea to copy the data around. i.e. cp /zpool/olddir /zpool/newdir rm -rf /zpool/olddir If there are more than 1 vdev in a pool, the pool's capacity is determined by the smallest device. Thus, if you have a 2GB, a 3GB, and a 5GB device in a pool, the pool's capacity is 3 x 2GB = 6GB, as ZFS will only do full-stripes. Thus, there really is no equivalent to Concatenation in other RAID solutions. However, if you replace ALL devices in a pool with larger ones, ZFS will automatically expand the pool size. Thus, if you replaced the 2GB devices in the above case with 4GB devices, then the pool would automatically appear to be 3 x 4GB = 12GB. A VDEV can consist of: any file any disk slice/partition a whole disk (preferred!) a special sub-device, raidz/raidz1/raidz2/mirror/cache/log/spare For the special sub-devices, here's a summary: raidz (synonym raidz1): You must provide at LEAST 3 storage devices (where a file, slice, or disk is a storage device) 1 device's capacity is consumed in parity. However, parity is scattered around the devices, thus this is roughly analogous to RAID-5 Currently, devices CANNOT be added or removed from a raidz. It is possible to increase the size of raidz by replacing each drive, ONE AT A TIME, with a larger drive. But altering the NUMBER of drives is not possible. raidz2: You must have at LEAST _4_ storage devices 2 device's capacity is consumed by parity. Like raidz, parity is scattered around the devices, improving I/O performance. Roughly analogous to RAID-6. Altering a raidz2 is exactly like doing a raidz. mirror You must provide at LEAST 2 storage devices All data is replicated across all devices, acting as a "normal" mirror. You can add or detach devices from a mirror at will, so long as they are at least a big as the original mirror. spare Indicates a device which can be used as a hot spare. log indicates an Intent Log, which is basically a transactional log of filesystem operations. Generally speaking, this is used only for certain high-performance cases, and tends to be used in association with enterprise-level devices, such as solid-state drives. cache similar to an Intent Log, this provide a place to cache filesystem internals (metadata such as directory/file attributes) usually used in situations similar to log devices. -------- All pools store redundant metadata, so they can automatically detect and repair most faults in metadata. If you vdev is raidz, raidz2 or mirror, they store redundant data (which allows them to recover from losing a disk), so they can automatically detect AND repair block-level faults. -- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800) _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss