3

This question is similar to Is the fdisk partition type important when using lvm however will ask it for clarity.

On a CentOS 6.5 insall, I accidentally took a new 3TB virtual disk and performed the commands pvcreate, vgcreate, and lvcreate then mkfs.ext4 to create an LVM. This without even using fdisk. While all documentation, even the documentation found in books for the RHCSA exam all read that the first step is to create a partition and use fdisk prior to creating the LVM, I have successfully created an LVM and mounted it for use, and it survived a reboot without using fdisk.

Logically, this should work as fdisk is behind the curve compared against others like parted and gdisk. So, it doesn't seem that I should have to use fdisk.

Any thoughts. Is this a good practice?

canon
  • 55
  • 1
  • 7
  • i think use fdisk for partion a disk a use the whole space in partion one and use the partition for lvm is waste your time, i commented and asked why i need to do this in redhat support post, but no one give a valid example and answer – c4f4t0r Apr 11 '14 at 14:30

1 Answers1

2

It works OK this way.

However, many tools might assume that there is an MBR/partition table in your /dev/sdX device, and try to act accordingly. If one of those utilities would write to your hard disk MBR location, it would corrupt your data on the hard disk.

Therefore, while the system works now, it still might cause problems later on, if you are not very careful.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63