Lori's Blog Lori Alt's Weblog

Tuesday Apr 24, 2007

The question came up in comments to yesterday's post about how swap will work when the system is booted from zfs.

Current plan is that swap will be a zvol within the pool. Eventually, that same zvol will be used for dump as well. (Right now, taking a crash dump into a zvol isn't supported, but it's considered a critical feature and is being developed at this time.) The current install code has an algorithm for setting the swap size (based on the amount of memory on the system), and we will need a way for users to override that. One nice thing about using a zvol for swap is that it will be easy to change its size.

I'm thinking right now that we shouldn't (and probably couldn't even if we wanted to) prevent users from setting up configurations in which they have a swap slice. Perhaps there are workloads for which a dedicated swap slice still makes sense. But in that case, we should still find a way to turn on write caching if the disk is composed of nothing but parts of zfs pools and a swap slice. It's on my list to get such a thing implemented. We don't just need it for swap. The bigger reason to support it is that some users may want to divide a disk into two pools: one which is a root pool and one which is a data pool (since we don't support RAID-Z on root pools at this time). In that case, even though the entire disk is not devoted to a single pool, the disk is still "all-ZFS", in which case write caching should be allowed.

Comments:

Thanks for the follow-up and update Lori.

Posted by Wes W. on April 24, 2007 at 10:00 AM MDT #

I have another case where I may configure a single disk with multiple pools. I'm considering having a root pool and data pool even though I have only one disk.

The idea is to use an iSCSI target to be a temporarily attached to the data pool as a mirror for "backup". The reason for considering two pools for this is I don't feel it is neccessary to backup my rootpool since it is easily resinstalled.

It would be really nice to have the best management of the disk write cache in this config.

Posted by Darren Moffat on April 24, 2007 at 11:16 AM MDT #

Could you have an affinity of a mount point to a particular raid stripe type. For instance designate that dump and boot partitions can only be used on disks within the zpool with a mirror raid type. So the above mount points would have an implied hard quota which could only be increased by adding more mirrored disks. This would be preferable to a separate zpool, as the global hot spares would be available for any failed disk within the pool. By making the affinity at the zpool to zfs boundary, you can reduce the hardware abstraction, making the boot loader easier to write. -I am not a current user of zfs, but have been reading about it for the past month, and plan to implement a system after finals.

Posted by Michael McMillan on April 24, 2007 at 11:54 AM MDT #

is it a way to use ordinary snapshots and and store them at special boot-snapshot-slot(s) which a special z-chainloader check for?

Posted by Frank on November 06, 2007 at 11:33 AM MST #

is there a way to center swap-areas in the middle of the disk to half the way/time of the heads to the swap-areas?

Posted by Frank on November 06, 2007 at 11:52 AM MST #

Lori,when will it all happen? Its Build 82 already ;)

Posted by Ron Halstead on February 29, 2008 at 09:17 AM MST #

Post a Comment:
  • HTML Syntax: NOT allowed