Prepare a disk or partition for use with LVM by writing the physical volume metadata and inspect it immediately. 30.06.2026 | reading time: 2 min Use pvcreate to turn a raw block device into an LVM physical volume so you can create volume groups and logical volumes; this command writes LVM metadata to the device and marks it ready for LVM operations. Hands-on example: create a PV Do this on a test system as root; here we initialize /dev/sdb and then check the result: ```bash # pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created. # pvs --noheadings -o pv_name,vg_name,lv_name /dev/sdb /dev/sdb # pvdisplay /dev/sdb --- Physical volume --- PV Name /dev/sdb VG Name PV Size 100.00 GiB / not usable 2.00 MiB ``` You just created a PV; next you can run `vgcreate` to put that PV into a volume group. Options that matter in practice Be explicit and safe: use `-y` for noninteractive scripts and `-f` to override strange existing signatures; limit usable space with `--setphysicalvolumesize` when the device holds other data; align with `--dataalignment` and `--dataalignmentoffset` on advanced storage arrays; and use `--uuid` only if you need deterministic IDs for recovery or automation. When pvcreate might be surprising pvcreate will refuse to overwrite existing filesystems unless forced; it writes LVM headers at known offsets so tools like `wipefs` or old partition tables can interfere; always verify with `pvs` or `pvdisplay` and consider `pvremove` when you need to undo the operation. Other tools to use immediately after Create a volume group with `vgcreate`, then allocate logical volumes with `lvcreate`; monitor with `pvs`, `vgs` and `lvs`; and remember `pvck` or `vgcfgrestore` for metadata recovery in complex situations. Wrap-up and next steps You have turned a device into an LVM physical volume and seen commands to inspect and protect your work; practice on throwaway disks, then build a VG and an LV to experience the full workflow; for deeper, exam-focused study consider CompTIA Linux+ or LPIC-1 and intensive preparation courses like bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. storage setup utilities infrastructure Dieser Artikel wurde mithilfe von KI erstellt.