Why does zfs define raidz/raidz2/mirror/stripe at the pool level instead of the filesystem/volume level? A sample use case: two filesystems in a eight disk pool. The first filesystems is a stripe across four mirrors. The second filesystems is a raidz2. Both utilizing the free space in the 8 disk pool as needed. Thanks in advance... This message posted from opensolaris.org
Vizzini Sampere wrote:> Why does zfs define raidz/raidz2/mirror/stripe at the pool level instead of > the filesystem/volume level?To take the burden away from the system admin. Turnaround question - why *should* ZFS define an underlying storage arrangement at the filesystem level?> A sample use case: two filesystems in a eight disk pool. The first > filesystems is a stripe across four mirrors. The second filesystems is a > raidz2. Both utilizing the free space in the 8 disk pool as needed.No, that''s not how it works. You create the zpool. At creation time you specify whether it will be a stripe or raidz or raidz2 or whatever. From that pool you create as many filesystems as you need. If from those 8 disks you want two different underlying types of storage layout, you would create two pools. James C. McPherson -- Solaris kernel software engineer, system admin and troubleshooter http://www.jmcp.homeunix.com/blog Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson
On Wed, 2007-01-17 at 20:34 +1100, James C. McPherson wrote:> Vizzini Sampere wrote: > > Why does zfs define raidz/raidz2/mirror/stripe at the pool level instead of > > the filesystem/volume level? > > To take the burden away from the system admin. > > Turnaround question - why *should* ZFS define an underlying > storage arrangement at the filesystem level? > > > > A sample use case: two filesystems in a eight disk pool. The first > > filesystems is a stripe across four mirrors. The second filesystems is a > > raidz2. Both utilizing the free space in the 8 disk pool as needed. > > No, that''s not how it works. > > You create the zpool. At creation time you specify whether it will > be a stripe or raidz or raidz2 or whatever. > > From that pool you create as many filesystems as you need. > > If from those 8 disks you want two different underlying types > of storage layout, you would create two pools. >Just to followup: Vizinni, if you really wanted to have the filesystems arranged as you said, with the underlying RAID levels specified, you would have to partition each drive into 2 slices, and feed the first slice of each disk to the Mirror zpool, and the second slice to a RAIDZ-configured zpool. For performance reasons (which don''t have anything to do with ZFS), splitting the disk between two different RAID groups is not a good idea, whether you are using LVM/SDS-style software RAID, a HW raid controller, or ZFS. Simultaneously access (either read or write) to both filesystems at the same time will cause disk head thrashing. -- Erik Trimble Java System Support Mailstop: usca14-102 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
> Turnaround question - why *should* ZFS define an underlying > storage arrangement at the filesystem level?It would be nice to provide it at the directory hierarchy level, but since file systems in ZFS are cheap, providing it at the file system level instead might be reasonable. (I say "might be" only because it does complicate administration to have multiple file systems to enable this.) Since RAID-Z reads are fairly expensive, it''s undesirable for files which are primarily accessed with small reads (or writes which trigger read-modify-write cycles). In some applications, it would be useful to be able to specify that particular files should be stored with mirroring rather than RAID-Z. (You already get this for the smallest files, because of how RAID-Z works.) Consider an image archive which stores images and an index. The images should clearly be in RAID-Z format for storage efficiency. The index, which is updated as each image is stored, would be more efficient in RAID-1. Anton This message posted from opensolaris.org