There may be various events, but in my case
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 499M 0 part
├─nvme0n1p2 259:2 0 100M 0 part /boot/efi
├─nvme0n1p3 259:3 0 16M 0 part
├─nvme0n1p4 259:4 0 124.4G 0 part
├─nvme0n1p5 259:5 0 1G 0 part /boot
└─nvme0n1p6 259:6 0 112.5G 0 part
└─fedora-root 253:0 0 112.5G 0 lvm /
nvme2n1 259:7 0 465.8G 0 disk
nvme1n1 259:8 0 465.8G 0 disk
├─nvme1n1p1 259:9 0 200G 0 part
└─nvme1n1p2 259:10 0 265.8G 0 part
# pvcreate /dev/nvme1n1p1
WARNING: wrong checksum 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong magic number in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong version 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong start sector 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: bad metadata header on /dev/nvme1n1p1 at 4096.
WARNING: scanning /dev/nvme1n1p1 mda1 failed to read metadata summary.
WARNING: repair VG metadata on /dev/nvme1n1p1 with vgck --updatemetadata.
WARNING: scan failed to get metadata summary from /dev/nvme1n1p1 PVID daz9jwK4OFToj1nBaNX5eiSwm6uf5W3X
WARNING: wrong checksum 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong magic number in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong version 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: wrong start sector 0 in mda header on /dev/nvme1n1p1 at 4096
WARNING: bad metadata header on /dev/nvme1n1p1 at 4096.
WARNING: scanning /dev/nvme1n1p1 mda1 failed to read metadata summary.
WARNING: repair VG metadata on /dev/nvme1n1p1 with vgck --updatemetadata.
WARNING: scan failed to get metadata summary from /dev/nvme1n1p1 PVID daz9jwK4OFToj1nBaNX5eiSwm6uf5W3X
Command failed with status code 5.
I got an error like this and could not create it normally (I get the same error even if I hit another lvm command such as pvs
after that)
Since I was playing with mdadm and stratis just before, it was useless to delete the partition header by mdadm --zero-superblock
or zap with gdisk, so I checked various things and found that the header is different from the extra partition header. Remained and seemed to read it (probably)
https://stackoverflow.com/questions/28421676/unable-to-remove-volume-group-due-to-incorrect-metadata-area-header-checksum
It was solved when it was carried out as follows with reference to.
# gdisk /dev/nvme1n1
...Omitted but x->zap with z
# dd if=/dev/zero of=/dev/nvme1n1 bs=1024k count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0.0238877 s, 439 MB/s
# gdisk /dev/nvme1n1
...Omitted, but normal except for specifying 8e00 for GUID
# pvcreate /dev/nvme1n1p1
Physical volume "/dev/nvme1n1p1" successfully created.
# pvs
PV VG Fmt Attr PSize PFree
/dev/nvme0n1p6 fedora lvm2 a-- 112.47g 0
/dev/nvme1n1p1 lvm2 --- 200.00g 200.00g
Congratulations
Recommended Posts