-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Pool can be created on top of a ext2 device #2448
Comments
I'm not sure what can be done about this. The best we could hope for is to have ZFS open the file O_EXCL and then hope the various other utilities honor that. |
The other way around... First ext2 and then ZFS - we need to verify what type of device we're "sending" (using) to zpool and ignore (or at least require "-f") if it's of a known type (extX, xfs, jfs, md etc, etc). |
@FransUrbo What you want to accomplish is doable by hooking into libblkid. That being said, I am think this is on the borderline of being a bug and not being a bug. My reasoning is that |
HOWEVER, this is a bug in the Illumos code. If it's a bug there, it should be
|
@FransUrbo I see what you're saying now. Actually this case should be already handled assuming you've built with libblkid support. The current code makes this functionality optional but perhaps it should be mandatory. Check if your build has HAVE_LIBBLKID enabled. The function
|
Close or relabel as "Linking with libblkid should be mandatory"? |
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
@FransUrbo Better yet, let's just enable it by default in the packaging. I believe @ryao already does this in the Gentoo packaging. http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds With the above patch applied I get the correct behavior with your test script.
|
That is correct. |
|
No... I'm just saying that is slightly more work. A source install will enable this by default if the libblkid-devel package is installed. The current behavior is to auto-detect the library. Arguably your right we should make the default to require it but allow it to be conditionally disabled. |
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Pull request #2512 includes your fix, with additional changes to |
@FransUrbo I'm all for changing the default as you've done in #2512. I've posted a few review comments on the patch so we can conform to the standard guidelines for this kind of check. |
Ok, force updated with your suggestions... |
pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448 Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
This ensures that when creating a pool on a device with an existing filesystem will get a warning. Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
This ensures that when creating a pool on a device with an existing filesystem will get a warning. Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Support for libblkid has been in the ZoL for years but has been disabled by default in the packaging. When libblkid is disabled the 'zpool create' command will not warn you if you're going to overwrite an existing filesystem. For this reason the default behavior has been changed to require libblkid. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
This ensures that when creating a pool on a device with an existing filesystem will get a warning. Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson <[email protected]> Closes: openzfs#2448
Historically libblkid support was detected as part of configure and optionally enabled. This was done because at the time support for detecting ZFS pool vdevs had just be added to libblkid and those updated packages were not yet part of many distributions. This is no longer the case and any reasonably current distribution will ship a version of libblkid which can detect ZFS pool vdevs. This patch makes libblkid mandatory at build time but does not change the default directory method of scanning for ZFS pools. This is in part because blkid can't detect log devices until ZFS is updated to write complete labels for these vdevs. And partly to ease the transition to making this the preferred scanning method. Additionally making libblkid mandatory means that the 'zpool create' command can reliably detect if a specified device has an existing non-ZFS filesystem (ext4, xfs) and print a warning. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Historically libblkid support was detected as part of configure and optionally enabled. This was done because at the time support for detecting ZFS pool vdevs had just be added to libblkid and those updated packages were not yet part of many distributions. This is no longer the case and any reasonably current distribution will ship a version of libblkid which can detect ZFS pool vdevs. This patch makes libblkid mandatory at build time and libblkid the preferred method of scanning for ZFS pools. For distributions which include a modern version of libblkid there is no change in behavior. Explicitly scanning the default search paths is still supported and can be enabled with the '-s' command line option. Additionally making libblkid mandatory means that the 'zpool create' command can reliably detect if a specified device has an existing non-ZFS filesystem (ext4, xfs) and print a warning. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Historically libblkid support was detected as part of configure and optionally enabled. This was done because at the time support for detecting ZFS pool vdevs had just be added to libblkid and those updated packages were not yet part of many distributions. This is no longer the case and any reasonably current distribution will ship a version of libblkid which can detect ZFS pool vdevs. This patch makes libblkid mandatory at build time and libblkid the preferred method of scanning for ZFS pools. For distributions which include a modern version of libblkid there is no change in behavior. Explicitly scanning the default search paths is still supported and can be enabled with the '-s' command line option. Additionally making libblkid mandatory means that the 'zpool create' command can reliably detect if a specified device has an existing non-ZFS filesystem (ext4, xfs) and print a warning. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#2448
Way to reproduce:
Results in:
The text was updated successfully, but these errors were encountered: