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

How to make btrfs forget a disk?



Dear Colleagues,

btrfs thinks that /dev/nvme1n1 has a btrfs:

# btrfs filesystem show
Label: none  uuid: 3414ae53-f3d4-43ea-bb88-ffefc9bc86f6
        Total devices 1 FS bytes used 1.05TiB
        devid    1 size 2.00TiB used 1.33TiB path /dev/nvme0n1

Label: none  uuid: 38f74bc8-465d-4866-8ec1-3a144741012c
        Total devices 1 FS bytes used 831.16GiB
        devid    1 size 3.00TiB used 1.48TiB path /dev/nvme1n1

The problem is that /dev/nvme1n1 is being used for ZFS now, and there is
currently no btrfs thereon. However, there is a btrfs label or something
stuck somewhere, how can I clear it?

I tried to unload/load the btrfs kernel module but it did not help. 
It's somewhere on disk, but where?

# blkid | grep nvme1n1
/dev/nvme1n1: UUID="38f74bc8-465d-4866-8ec1-3a144741012c" UUID_SUB="ada72e33-4467-4413-b78a-1a2392f62e62" TYPE="btrfs" PTUUID="d73a33f2-2b34-e64b-bc66-128320256a28" PTTYPE="gpt"
/dev/nvme1n1p1: LABEL="fastdrive" UUID="9760009171611183151" UUID_SUB="5246836986761113023" TYPE="zfs_member" PARTLABEL="zfs-04c563a98b6424bd" PARTUUID="ca163a7a-0150-714c-8e5f-375f57a8df2c"
/dev/nvme1n1p9: PARTUUID="bbc56956-5581-b449-a114-0ece0378a4c9

# Disk /dev/nvme1n1: 3 TiB, 3298534883328 bytes, 6442450944 sectors
Disk model: Amazon Elastic Block Store              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D73A33F2-2B34-E64B-BC66-128320256A28

Device              Start        End    Sectors Size Type
/dev/nvme1n1p1       2048 6442432511 6442430464   3T Solaris /usr & Apple ZFS
/dev/nvme1n1p9 6442432512 6442448895      16384   8M Solaris reserved 1

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet

Attachment: signature.asc
Description: PGP signature


Reply to: