Conversation
| let zpool_name = | ||
| Self::initialize_zpool(&log, variant, &paths, &partitions)?; |
There was a problem hiding this comment.
This code is unchanged from before this PR, just refactored
| ensure_partition_layout(&log, &paths, unparsed_disk.variant)?; | ||
| let partitions = ensure_partition_layout(&log, &paths, variant)?; | ||
|
|
||
| Self::initialize_swap(&log, &paths, &partitions)?; |
| match paths.partition_device_path( | ||
| &partitions, | ||
| Partition::DumpDevice, | ||
| false, |
There was a problem hiding this comment.
Part of this is probably my own unfamiliarity with the sled-hardware code, but it might be good to explain why this is going in the DumpDevice partition?
There was a problem hiding this comment.
I've struggled to find a great summary for this in the illumos docs, but I'm really just trying to follow the convention for this which has been set there.
Reading a combination of
- https://illumos.org/man/8/dumpadm
- https://www.illumos.org/man/8/swap
- https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/swap/swap.c
I was able to infer:
- Apparently, it's common to use swap space as a dump device
- This is even the default mode of
swap -a-- if a swap device is added, and no dump devices exist, that swap device is used as a dump device.
I added a summary in 4039c7a
There was a problem hiding this comment.
thanks, this was helpful.
| Ok(()) | ||
| } | ||
|
|
||
| // Initialize a swap within the ZfsPool partition. |
There was a problem hiding this comment.
Also, I don't see where we do that here. Shouldn't there be a call to Swap::set_swap if that were true?
There was a problem hiding this comment.
good catch, this comment is totally wrong - fixed in 2e3533b
|
Before we move ahead with this I'd like us to consider a number of factors around serviceability and reliability and so on; e.g.,
If we decide we still need a swap device, we should consider an alternative strategy as well; viz., using a zvol on a U.2 device for swap. This has several potential benefits:
There are possibly other strategies to consider too. I don't think this is a slam dunk as-is, and I think we should do the research and design work before proceeding. |
DumpDevicepartition. As defined, these currently only exist within M.2 devices:omicron/sled-hardware/src/illumos/disk.rs
Lines 24 to 31 in a378cda
DumpDevicepartition is being used as swap space, using theswapcommand.Fixes #2858