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

ZFS root pool cannot be mirrored #1077

Closed
tigloo opened this issue Nov 5, 2012 · 5 comments
Closed

ZFS root pool cannot be mirrored #1077

tigloo opened this issue Nov 5, 2012 · 5 comments
Milestone

Comments

@tigloo
Copy link

tigloo commented Nov 5, 2012

I created a ZFS root pool using a single whole disk. After the installation, I wanted to attach a second drive to the pool to create a mirrored root pool. In the first attempt, ZFS detected the disk and said it does not contain an EFI label but may contain data. Overriding with -f caused ZFS to complain that an EFI label was present.

Workaround: manually creating the same partition layout on the second drive that ZFS created on the first drive, then attaching the data partition instead of the whole drive successfully creates a mirrored pool.

till@tricky:~$ sudo zpool attach rpool /dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1EQ159603 /dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1EQ159604 
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1EQ159604 does not contain an EFI label but it may contain partition
information in the MBR.
till@tricky:~$ sudo zpool attach rpool -f /dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1EQ159603 /dev/disk/by-id/scsi-SATA_SAMSUNG_HD501LJS0MUJ1EQ159604  
cannot label 'sdb': EFI labeled devices are not supported on root pools.
till@tricky:~$
@behlendorf
Copy link
Contributor

@tigloo This is a check we should just be able to disable for Linux. I'm not aware of any good reason why we can't use EFI labeled devices for the root pool. Give the following patch a try and let me know if you see any issues. This change 77a49f1784351898d7475d4b9ede9a499994821f disables all the checks which limit the use of EFI labels on root devices.

@tigloo
Copy link
Author

tigloo commented Nov 6, 2012

Thanks for the quick patch! I'll need a few days to test it because I need to set up a new virtual machine. Should be able to do that during the weekend.

@cwedgwood
Copy link
Contributor

to state the obvious (perhaps) mirroring the root pool won't make the system robust on reboot if a device fails, the boot-loader has to be updated on all mirrored devices

@tigloo tigloo closed this as completed Nov 8, 2012
@behlendorf
Copy link
Contributor

@tigloo Why did you close the issue?

@tigloo
Copy link
Author

tigloo commented Nov 8, 2012

Oops, sorry. Meant to add a comment, then decided otherwise. Instead of discarding the comment, I accidentally pressed the close button. Re-opening.

@tigloo tigloo reopened this Nov 8, 2012
unya pushed a commit to unya/zfs that referenced this issue Dec 13, 2013
Commit 57a4edd allows the bootfs property to be set on any pool.
However, many of the zpool commands still prevent you from using
EFI labeled devices for the root pool.  For example:

    # zpool attach rpool /dev/sda /dev/sdb
    cannot label 'sdb': EFI labeled devices are not supported on
    root pools. on root devices.

For non-Solaris builds such as Linux disable this error.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#1077
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…d in /cmd/zfs_object_agent (openzfs#1077)

Bump tikv-jemalloc-sys in /cmd/zfs_object_agent

Bumps [tikv-jemalloc-sys](https://github.com/tikv/jemallocator) from 0.5.3+5.3.0-patched to 0.5.4+5.3.0-patched.
- [Release notes](https://github.com/tikv/jemallocator/releases)
- [Changelog](https://github.com/tikv/jemallocator/blob/main/CHANGELOG.md)
- [Commits](tikv/jemallocator@tikv-jemalloc-sys-0.5.3...0.5.4)

---
updated-dependencies:
- dependency-name: tikv-jemalloc-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants