Cannot initialize disk due to ZFS label and clearing block offset 31 does resolve the issue

book

Article ID: 100026084

calendar_today

Updated On:

Description

Error Message

# /etc/vx/bin/vxdisksetup -ir c1t1d0 

VxVM vxdisksetup ERROR V-5-2-5716 Disk c1t1d0s2 is in use by ZFS. Slice(s) 2 are in use as ZFS zpool (or former) devices. 

If you still want to initialize this device for VxVM use, please destroy the zpool by running 'zpool' command if it is still active, and then remove the ZFS signature from each of these slice(s) as follows: 

   dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s[n] oseek=31 bs=512 count=1 

   [n] is the slice number. 
The above indicates that VM is detecting a ZFS signature on slice 2:

 

# dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s2 oseek=31 bs=512 count=1

Try with slices visible in prtvtoc and also without any slice as well. 

# dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s0 oseek=31 bs=512 count=1

# dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0 oseek=31 bs=512 count=1

Cause

If running the recommended DD command correct the condition and the disk remains unable to initialize then the ZFS label is not at the expected offset.

Resolution

In cases where the ZFS label is not at the expected offset a more general wipe operation will be required to ensure that the ZFS label is removed and the disk can be initialized.

Before proceeding, review and ensure the disk is not in use in any other capacity -- the following procedure will irrecoverably destroy the VTOC and any data in the beginning of the disk.

1. Zero out the first 72MB of the device

# dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s2 bs=1024 count=72000

2. Relabel the device (the VTOC is removed as part of this operation)

# format c1t1d0
format> label 
Ready to label disk, continue? y 
 
# vxdctl enable
 

Applies To

   Following attempt to clear using the recommended DD command, the error condition persists.

Issue/Introduction

Storage Foundation will not initialize disks on which a ZFS label is detected, but the detection is not limited to block 31 so if a ZFS label resides somewhere else in the first 32 blocks of a partition, the error will be reported but zeroing out offset 31 will not fix the issue.