Hey all,
So I plan on booting a server I am putting together from a ZFS mirror of two small SSD's, but no other drives.
There are a few different ways one can handle swap space in this setup. I was hoping to get some input from you guys on how to best do this. I have identified two methods I can think of below, but are there others?
Option 1: Using Zvol's
1.) Create the ZFS mirror using 100% of the SSD's
2.) Create a Zvol on the pool.
3.) Format Zvol as a linux swap device
Benefits:
- Swap space is also mirrored, meaning system is less likely to crash if a drive fails.
- ZFS gets to natively manage the entire drives, which it likes to do.
Drawbacks:
- Snapshots of root file system will include swap data?
- Swap exists on non-native block device in a file?
Option 2: Using Separate Partitions
1.) Create equal sized partitions on eeach drive for root file system.
2.) Mirror partitions above using ZFS
3.) Create swap partitions on bare drives
Benefits:
- More swap space
- Swap space is on bare metal on disk.
Drawbacks:
No swap redundancy.
Option 3: ???
How would you set this up, and why?
Appreciate any input.
So I plan on booting a server I am putting together from a ZFS mirror of two small SSD's, but no other drives.
There are a few different ways one can handle swap space in this setup. I was hoping to get some input from you guys on how to best do this. I have identified two methods I can think of below, but are there others?
Option 1: Using Zvol's
1.) Create the ZFS mirror using 100% of the SSD's
2.) Create a Zvol on the pool.
3.) Format Zvol as a linux swap device
Benefits:
- Swap space is also mirrored, meaning system is less likely to crash if a drive fails.
- ZFS gets to natively manage the entire drives, which it likes to do.
Drawbacks:
- Snapshots of root file system will include swap data?
- Swap exists on non-native block device in a file?
Option 2: Using Separate Partitions
1.) Create equal sized partitions on eeach drive for root file system.
2.) Mirror partitions above using ZFS
3.) Create swap partitions on bare drives
Benefits:
- More swap space
- Swap space is on bare metal on disk.
Drawbacks:
No swap redundancy.
Option 3: ???
How would you set this up, and why?
Appreciate any input.