Solved How to disable zvol GEOM error message?

Hi
May I know is there anyway to disable/exclude zvol device scanning when running gpart show ? the following zvols are exported as iscsi device.

Code:
=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-20_17:13-daily  GPT  (1.0T)
          34        2014                                               - free -  (1.0M)
        2048  2147481567                                            1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-20_18:20-daily  GPT  (1.0T)
          34        2014                                               - free -  (1.0M)
        2048  2147481567                                            1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_00:00-daily  GPT  (1.0T)
          34        2014                                               - free -  (1.0M)
        2048  2147481567                                            1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_00:00-daily  GPT  (1.0T)
          34        2014                                               - free -  (1.0M)
        2048  2147481567                                            1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_06:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_06:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_08:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_08:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_10:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_10:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_12:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_12:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_13:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_13:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_14:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_14:00-hourly  GPT  (1.0T)
          34        2014                                                - free -  (1.0M)
        2048  2147481567                                             1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_14:20-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_14:20-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_14:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_14:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_15:00-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_15:00-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_15:20-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_15:20-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_15:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_15:40-minutely  GPT  (1.0T)
          34        2014                                                  - free -  (1.0M)
        2048  2147481567                                               1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_15:46-syncpoint  GPT  (1.0T)
          34        2014                                                   - free -  (1.0M)
        2048  2147481567                                                1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_15:46-syncpoint  GPT  (1.0T)
          34        2014                                                   - free -  (1.0M)
        2048  2147481567                                                1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol01@2015-10-21_15:49-syncpoint  GPT  (1.0T)
          34        2014                                                   - free -  (1.0M)
        2048  2147481567                                                1  vmware-vmfs  (1.0T)

=>        34  2147483581  zvol/vol/iscsi_vol00@2015-10-21_15:49-syncpoint  GPT  (1.0T)
          34        2014                                                   - free -  (1.0M)
        2048  2147481567                                                1  vmware-vmfs  (1.0T)

The following message display on the console screen and dmesg
dmesg error :
Code:
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:07-syncpoint: the secondary GPT header is not in the last LBA.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:10-syncpoint: the secondary GPT header is not in the last LBA.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:13-syncpoint: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:13-syncpoint: GPT rejected -- may not be recoverable.
GEOM: zvol/vol/iscsi_vol01: the secondary GPT table is corrupt or invalid.
GEOM: zvol/vol/iscsi_vol01: using the primary only -- recovery suggested.
GEOM: zvol/vol/iscsi_vol01: the secondary GPT header is not in the last LBA.
GEOM: zvol/vol/iscsi_vol01: the secondary GPT header is not in the last LBA.
g_dev_taste: make_dev_p() failed (gp->name=zvol/vol/iscsi_vol01, error=17)
GEOM: zvol/vol/iscsi_vol01: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01: GPT rejected -- may not be recoverable.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:25-syncpoint: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:25-syncpoint: GPT rejected -- may not be recoverable.
GEOM: zvol/vol/iscsi_vol01: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01: GPT rejected -- may not be recoverable.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:28-syncpoint: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:28-syncpoint: GPT rejected -- may not be recoverable.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:31-syncpoint: the secondary GPT table is corrupt or invalid.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:31-syncpoint: using the primary only -- recovery suggested.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:34-syncpoint: corrupt or invalid GPT detected.
GEOM: zvol/vol/iscsi_vol01@2015-10-20_19:34-syncpoint: GPT rejected -- may not be recoverable.
 
The following will probably help if you haven't set it already
Code:
zfs set volmode=dev pool/dataset/volume
ZVOLs show up as normal disk devices in /dev, and so unfortunately get scanned by GEOM which will happily parse partitions/labels/etc if it can find them. The volmode property is supposed to disable GEOM from talking to the device.

Edit: more details in the ZFS man page:
volmode=default | geom | dev | none
This property specifies how volumes should be exposed to the OS.
Setting it to geom exposes volumes as geom(4) providers, providing
maximal functionality. Setting it to dev exposes volumes only as
cdev device in devfs. Such volumes can be accessed only as raw disk
device files, i.e. they can not be partitioned, mounted, participate
in RAIDs, etc, but they are faster, and in some use scenarios with
untrusted consumer, such as NAS or VM storage, can be more safe.
Volumes with property set to none are not exposed outside ZFS, but
can be snapshoted, cloned, replicated, etc, that can be suitable for
backup purposes. Value default means that volumes exposition is
controlled by system-wide sysctl/tunable vfs.zfs.vol.mode, where
geom, dev and none are encoded as 1, 2 and 3 respectively. The
default values is geom. This property can be changed any time, but
so far it is processed only during volume creation and pool import.
 
The following will probably help if you haven't set it already
Code:
zfs set volmode=dev pool/dataset/volume
ZVOLs show up as normal disk devices in /dev, and so unfortunately get scanned by GEOM which will happily parse partitions/labels/etc if it can find them. The volmode property is supposed to disable GEOM from talking to the device.

Edit: more details in the ZFS man page:
Problem solved by changing the volmode to dev instead of default and re-import the pool.

Thanks for the trick.
 
Thank you so much, usdmatt! The `volmode=dev` fixes the `cannot receive incremental stream: dataset is busy` problems I got with a replication stream for me and ends an hour-long investigation at this point.
 
Back
Top