Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit zpool create -o whole_disk=1 #1162

Closed
ryao opened this issue Dec 23, 2012 · 6 comments
Closed

Permit zpool create -o whole_disk=1 #1162

ryao opened this issue Dec 23, 2012 · 6 comments
Labels
Type: Feature Feature request or new feature

Comments

@ryao
Copy link
Contributor

ryao commented Dec 23, 2012

There are situations where it is desireable to set the whole_disk attribute so that ZFS will control the IO elevator, but ZFS does not permit it.

One scenario involved issue #1149, which resulted in an exception being added to the IO elevator behavior. Another scenario involves virtual machines on zvols. With raw disks, ZFS does partitioning and leaves space for an additional partition to be added for the bootloader. With zvols, ZFS does no partitioning. This poses a problem when a guest operating system's bootloader requires a separate partition to host its stage2 loader. If ZFS did do partitioning on zvols, we would lose flexibility when configuring pools on zvols.

In both scenarios, it would be helpful to override the default whole_disk attribute setting when creating the pool. This should be safe because the worst case scenario on Linux would be the use of a suboptimal IO elevator. This would only happen when the user explicitly requests it.

The rationale for whole_disk is stated on Wikipedia:

On Solaris, when entire disks are added to a ZFS pool, ZFS automatically enables their write cache. This is not done when ZFS only manages discrete slices of the disk, since it does not know if other slices are managed by non-write-cache safe filesystems, like UFS. The FreeBSD implementation can handle disk flushes for partitions thanks to its GEOM framework, and therefore does not suffer from this limitation

The consequence is that FreeBSD unconditionally sets whole_disk. While it could be undesirable to do the same, it should be perfectly fine to allow users to override the default choice when creating a pool.

@ryao
Copy link
Contributor Author

ryao commented Dec 23, 2012

@nedbass @prakash-surya Would this cover your use case?

@behlendorf
Copy link
Contributor

@ryao Unfortunately no. Part of the issue is that when using dm device's it tricky to automatically determine what new dm partition device will be named. Unlike hd/sd/vd/md devices a partition suffix is not simply added, instead a new dmX device is created where X is just a monotonically increasing value. I'm sure a mapping could be created for this case, but thus far it hasn't been worth it to handle this case.

@behlendorf
Copy link
Contributor

@ryao I'm chalking this up to a feature request. While ZFS usually does the right thing here I don't see any real issues with allowing the user to override that choice during zpool create. However, we'll also want to get the zpool attach, zpool add, and zpool replace cases.

@ryao
Copy link
Contributor Author

ryao commented Oct 26, 2013

@behlendorf This is a low priority. Given the large number of things queued for 0.6.3, it might be advisable to push this back to 0.6.4 or later.

@behlendorf
Copy link
Contributor

Agreed, bumped to 0.6.4 for now and it may continue to be bumped.

@behlendorf behlendorf added Difficulty - Medium and removed Type: Building Indicates an issue related to building binaries labels Oct 7, 2014
@behlendorf behlendorf removed this from the 0.6.4 milestone Oct 7, 2014
FransUrbo added a commit to FransUrbo/zfs that referenced this issue May 29, 2015
Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So add a '-D' option to 'add', 'attach',
'create', 'replace' and 'split' to disable the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue May 30, 2015
Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue May 30, 2015
Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 22, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 24, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 24, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 26, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 26, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Jul 31, 2015
…ioning.

Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
FransUrbo added a commit to FransUrbo/zfs that referenced this issue Sep 8, 2015
Sometimes it is desired to not have 'zpool' setup partitioning on
devices it uses for the pool. So allow '-o whole_disk={on,off}'
option to 'add', 'attach', 'create', 'replace' and 'split' to
disable or enable, respectivly, the automatic partitioning.

Signed-off-by: Turbo Fredriksson [email protected]
Closes openzfs#94
Closes openzfs#719
Closes openzfs#1162
Closes openzfs#3452
@rlaager
Copy link
Member

rlaager commented Dec 14, 2019

The elevator thing is gone or going away. I'm closing this in favor of #3452, which has more notes for an implementation.

@rlaager rlaager closed this as completed Dec 14, 2019
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…ates (openzfs#1162)

build(deps): bump the patch group

Bumps the patch group in /cmd/zfs_object_agent with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.68` | `0.3.69` |
| [dashmap](https://github.com/xacrimon/dashmap) | `5.5.0` | `5.5.1` |
| [anstyle](https://github.com/rust-cli/anstyle) | `1.0.1` | `1.0.2` |
| [encoding_rs](https://github.com/hsivonen/encoding_rs) | `0.8.32` | `0.8.33` |
| [slab](https://github.com/tokio-rs/slab) | `0.4.8` | `0.4.9` |


Updates `backtrace` from 0.3.68 to 0.3.69
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](rust-lang/backtrace-rs@0.3.68...0.3.69)

Updates `dashmap` from 5.5.0 to 5.5.1
- [Release notes](https://github.com/xacrimon/dashmap/releases)
- [Commits](xacrimon/dashmap@v5.5.0...v5.5.1)

Updates `anstyle` from 1.0.1 to 1.0.2
- [Commits](rust-cli/anstyle@anstyle-ls-v1.0.1...anstyle-wincon-v1.0.2)

Updates `encoding_rs` from 0.8.32 to 0.8.33
- [Commits](hsivonen/encoding_rs@v0.8.32...v0.8.33)

Updates `slab` from 0.4.8 to 0.4.9
- [Release notes](https://github.com/tokio-rs/slab/releases)
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md)
- [Commits](tokio-rs/slab@v0.4.8...v0.4.9)

---
updated-dependencies:
- dependency-name: backtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: dashmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: anstyle
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: encoding_rs
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: slab
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants