I want to erase a disk then info linux to update the /dev/mapper. Here is the operation example. Create a test pv and vg on /dev/vdc1 then create test lv, use dd to erase the first 8K data of /dev/vdc1 (destory the lvm metadata).
# pvcreate /dev/vdc1
# vgcreate testvg /dev/vdc1
# lvcreate -L10G -n testlv testvg
# lsblk /dev/vdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 252:32 0 120G 0 disk
└─vdc1 252:33 0 108G 0 part
└─testvg-testlv 253:2 0 10G 0 lvm
# dd if=/dev/zero of=/dev/vdc1 bs=8K count=1 oflag=direct
Now the question is how to info linux to update /dev/mapper without reboot? Or is there any more convenient way to wipe out lvm on with reboot?