[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-zfsonlinux-devel] zfsutils-linux: /usr/sbin/grub-probe: error: unknown filesystem



no it seems it's not whole disks. If i remember properly, I did create the partitions myself to format the 8 mb in vfat and mount on /boot/efi where grub installs EFI/debian/grub64.efi. I guess this is fixable by breaking the mirror, attach whole disk again, and dd the smal partition from the original mirror to the new member. What do you think ?

zdb give me this:
# zdb
...
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 2471205
    pool_guid: 2911530877770893156
    errata: 0
    hostname: '(none)'
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 2911530877770893156
        children[0]:
            type: 'mirror'
            id: 0
            guid: 167095735183477361
            whole_disk: 0
            metaslab_array: 35
            metaslab_shift: 30
            ashift: 12
            asize: 120019484672
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 9751365117004377854
                path: '/dev/disk/by-id/ata-SanDisk_SDSSDH120GG25_113334300609-part1'
                whole_disk: 0
                DTL: 171
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 10097808601759431928
                path: '/dev/disk/by-id/ata-OCZ-VERTEX2_f24230012-part1'
                whole_disk: 0
                DTL: 194
                create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data

# zpool  status -v rpool
  pool: rpool
 state: ONLINE
  scan: resilvered 2,94G in 0h0m with 0 errors on Wed Sep 28 18:04:43 2016
config:

        NAME                                              STATE     READ WRITE CKSUM
        rpool                                             ONLINE       0     0     0
          mirror-0                                        ONLINE       0     0     0
            ata-SanDisk_SDSSDH120GG25_113334300609-part1  ONLINE       0     0     0
            ata-OCZ-VERTEX2_f24230012-part1               ONLINE       0     0     0

errors: No known data errors


2016-09-29 9:35 GMT+02:00 Richard Laager <rlaager@wiktel.com>:
So a plain zpool status (with no -P) shows these, right? Without -part1?

ata-SanDisk_SDSSDH120GG25_113334300609
ata-OCZ-VERTEX2_f24230012

In that case, you have a "wholedisk" pool, which you created with:
zpool create rpool mirror \
    ata-SanDisk_SDSSDH120GG25_113334300609 \
    ata-OCZ-VERTEX2_f24230012

I used to recommend this, as "wholedisk" is the native way ZFS likes to
do pools, but I gave up on it because of this and other issues. (Even
Solaris didn't use wholedisk for root pools.)

The problem is that GRUB2, on Linux, parses the output of `zpool
status`, and it returns the disk name, not the partition name. See this
bug (in Ubuntu):
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1527727

The best fix is to get grub to set ZPOOL_VDEV_NAME_PATH=YES (which is
equivalent to passing -P to zpool status), as in
debian/patches/zpool_full_device_name.patch in Ubuntu's grub2. I've
attached it, and maybe someone can get that included in Debian.

A work-around until then is to create symlinks for the by-id *disk*
names directly in /dev, but pointing to the *partition*. One or both of
these udev rules should do the trick:

KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*",
ENV{ID_PART_ENTRY_SCHEME}=="gpt",
ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631",
SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"

KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*",
ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_FS_USAGE}=="raid",
SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"

If it's working correctly, you should have a
/dev/ata-SanDisk_SDSSDH120GG25_113334300609 symlink that points to
/dev/sdx1 where x is some value. Again, note closely that this is a
disk-name (no -part1) pointing to a partition (sdx1).

--
Richard


Reply to: