1

I recently created a new zpool over 8 disks with 4 mirrors. Today I attached the disks to a linux server and an old deprecated zpool is now showing up with zpool import which uses the same disks as the new one. I found out that the new pool is located on partition 1 of each disk:

Using /dev/sda
(parted) print
Model: ASMT 2105 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
1      1049kB  3001GB  3001GB  zfs          zfs

When I have a look at the labels on partition 1 with zdb I see that the correct pool configuration is stored here. So I think the old deprecated zpool informations must be somewhere on the first 1049kb of the disk because partition 1 starts at 1049kB. I'd like to zero out the first 1049kB of each disk with dd but I'm not 100% sure how big the block size and count has to be. Can someone help me with my command to be absolutely sure that I won't destroy the new pool information. Something like:

dd if=/dev/sda bs=1024 count=1049

Thanks in advance

2
  • I used the whole disk for the zpool and the partition has been created by zfs. It's not possible with zpool commands to import the pool or destroy it. And if it would be I would probably also destroy the new pool because the same disks are in use.
    – Nenzo
    Commented Jan 6, 2017 at 14:22
  • Have you considered destroying and recreating your zpool.cache file? Does the output of the zdb command show anything that shouldn't be there? If so, destroy and recreate your zpool.cache file.
    – airhuff
    Commented Jan 14, 2017 at 2:38

1 Answer 1

1

It's possible to remove a zfs label on a device (vdev) using the following command:

zpool labelclear <vdev> <-f>

in your case, something like the following:

zpool labelclear /dev/sda1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .