My sata hdd was unmounted from dom0, how do I take back it?

I hope to use sata hdd as secondly storage pool, so I followed this documentation.

But I faced many problems, and I missed.

First, I tried to make volume group, I run this command on dom0 terminal:

sudo vgcreate vg1 /dev/sdb1

But terminal replied error message:

Can't open /dev/sdb1 exclusively. Mounted filesystem?

My hdd (sdb) is sata connecting, so sdb should mount to dom0 directly, I don’t think it not through sys-usb.
I think cause of its issue is gpt filesystem on hdd, so I run this command:

sudo wipefs -a /deb/sdb1

But this command also failed, wipefs command can not run from dom0, so I cloned fedora-39-minimal-template(Called it lvm-template), and I installed lvm2 package on it.
After I made and run AppVM from lvm-template, and attached hdd to AppVM, I run wipefs command on AppVM.
I successed, detach hdd from AppVM, I tried to make volume group on dom0 terminal, but error was once more, error message said “sdb is not mounted at dom0”.

So I tried run vgcreate command on AppVM from lvm-template, it successed, volume group was made.
After I run lvcreate command on same AppVM, this is also success.
I detach hdd once more, I tried to recognize thinpool by dom0, so I run this command:

sudo lvcreate -L xxG -T vg1/mythinpool

(I hope to hide my hdd size, so I write xxG on this forum)

This command successed, so I followed to continuation of documentation.
But error came once more, error massage said “Device or resource is busy”, I could not register hdd to Qubes os as storage pool.
So I had doubts to hdd truly don’t mount to dom0, I tried to use qvm-block:

qvm-block attach dom0 dom0:sdb

I successed to mount hdd to dom0, but same error massage was repeated.
So I think reason of error is to recognize thinpool name by don’t dom0.
So I returned sdb:

qvm-block detach dom0 dom0:sdb

This command was success.
So I tried to register from firstly once more, I run vgcreate command on AppVM once more.
After I run this command on dom0 terminal once more:

sudo lvcreate -L xxG -T vg1/mythinpool

But gui notification of Qubes Devices said ‘sdb (my sata hdd) unmount from dom0’ this time, my sata hdd is not indicated by Qubes Devices, so I can not see and touch my sata hdd.
I try to check /dev by ‘ls -a /dev’, sdb is existing, so Qubes os is recognizing my sata hdd.

I am despairing now.
I don’t understand method of mount my sata hdd to dom0 once more, and reason of failure vgcreate and lvcreate command on dom0.
What should I do?

I reboot PC, hdd is mounted at dom0 once more.

But I don’t understand reason of failure vgcreate and lvcreate command on dom0.
I don’t need to sata hdd of encrypted as secondly storage pool on my use case, but this is option, storage pool and thin pool should be able to be possible made without encrypted.
But I try to run vgcreate and lvcreate commands from dom0 terminal, they are fail.
Why can not vgcreate and lvcreate commands run on dom0 terminal?
Why does dom0 terminal reply error message of can't open /dev/sdb1 exclusively. Mounted filesystem? ?

What’s the output of these commands in dom0?

sudo fdisk -l /dev/sdb
sudo mount | grep sdb
sudo pvs

Maybe you already have LVM created on /dev/sdb1 and the VG there is active so it’s blocking your attempt to overwrite it. Then you need to deactivate it before trying to change it.

Thank you! I am success!!!

Reason of my failure was to not run sudo mount | grep sdb command.

sudo fdisk -l /dev/sdb

The fdisk outputs filesystem of sdb is gpt.

Next, I run sudo mount | grep sdb.
After I run sudo wipefs -a /deb/sdb (Add sdb, not sdb1!) on dom0 terminal, I was be able to success wipefs command, gpt on sdb is wiped.
So my cause of can not run all commands on dom0 terminal is to not run sudo mount | grep sdb command, and I selected sdb1 (I must select sdb).

After I run sudo pvs, LVM is not existing on sdb.
So I run sudo vgcreate vg1 /dev/sdb dom0 terminal outputted:

Physical volume “/dev/sdb” successfully created.
Volume group “vg1” successfully created

After I run this command:sudo lvcreate -L xxG -T vg1/mythinpool, dom0 terminal outputted:

Thin pool volume with chunk size 256.00KiB can address at most 63.25TiB of data.
Logical volume “mythinpool” created.

After I run sudo pvs, I check existing /dev/sdb as PV.
So I run qvm-pool --add <pool_name> lvm_thin -o volume_group=vg1,thin_pool=mythinpool,revisions_to_keep=2, I complete to make secondly storage pool!
Their all commands were be able to run on dom0 terminal.

My failure is two, one is to not run sudo mount | grep sdb command, so sdb was not mounted to dom0.
And I selected to /dev/sdb1, I must have selected to /dev/sdb.

I think sudo fdisk -l /dev/sdb and sudo mount | grep sdb commands should be written to documentation, if written their commands on documentation, I perhaps don’t failed.
And wipefs command also run optionally need, should you also write this command?