[oi-dev] zfs on illumos needs an update to support specific slice with -d
Toomas Soome
tsoome at me.com
Tue Oct 21 13:01:48 UTC 2025
> On 21. Oct 2025, at 13:10, Atiq Rahman <atiqcx at gmail.com> wrote:
>
> Hi,
> This comes up in my mind.
>
> Has anyone else observed that illumos has difficulty detecting ZFS pools
> when they reside on a partition rather than occupying the entire disk?
illumos does scan only first 16 partitions on disk, if you do have created illumos partition with number greater than 15, illumos zpool command will not list it, see:
https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libzutil/common/zutil_import.c?r=3bc69b1d#1058
>
> On Mon, Oct 20, 2025 at 10:07 PM Atiq Rahman <atiqcx at gmail.com <mailto:atiqcx at gmail.com>> wrote:
>>
>> Hi Peter,
>> Thank you for your input.
>>
>>> The unqualified import checks every slice/partition on every disk. So it's
>>> already looking at that partition. If it's not finding the pool, then
>>> that's the problem you need to look at.
>>
>> I have an SSD with two partitions:
>> 1. An EFI System Partition (512MB)
>> 2. A ZFS pool occupying the remainder of the disk
>>
>> Neither ZFS nor OpenZFS reports any errors on this pool. However, when I try
>> to import the pool using `zpool import` or with the `-d /dev/sdX` option (as
>> translated to illumos device naming), the pool is not detected.
>>
illumos zpool -d option does only take *directory* name, not device name. By default it is using /dev/dsk (as this is where disk device files are). The OpenZFS did add support for device name used with -d because this will allow to speed up zpool operation as in such usage zpool command does not have to scan all disks, which is especially desirable when you have lots of disks. Otherwise it really should not matter if you specify slice or not, 'zpool import’ is supposed to list your importable pool(s) anyhow.
>> Interestingly, on OpenZFS, if I specify `-d /dev/sdX2`, the pool imports
>> successfully. That aside, this is pretty new and I have checked there is no
>> corruption or issue with the pool itself.
>>
>> Given this, what could be the underlying cause for illumos/OpenIndiana not
>> being able to detect or import this pool without explicitly pointing to the
>> partition?
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org <mailto:oi-dev at openindiana.org>
> https://openindiana.org/mailman/listinfo/oi-dev
rgds,
toomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20251021/254d4ee6/attachment.html>
More information about the oi-dev
mailing list