Partition management: lvm? fdisk? parted? (on RAID)

Hello,

I have a RHEL system with two 500GB hard drives in RAID 1 (I think hardware, but not 100% certain - any way to tell?).

It looks like it was just set up in default configuration with a small boot partition and one huge partition for the rest, which composes a LVM volume.

I want to break that partition up into at least two separate ones. What I am wondering is:

  • What's the difference between using fdisk and parted? Any reason to use one over the other?

  • Should I just use lvm instead to shrink the current volume and create a second one? Is there a down-side to use logical volumes without creating a physical partition with fdisk/parted?

  • Being that there are already two disks in RAID 1 configuration, does partitioning with lvm or fdisk/parted transparently propagate to the mirror disk or do I need to do something to partition BOTH drives?

Thanks in advance!!

Run

lsmod | grep raid

If you get a result, and the last number in the line is not 0, it's probably a software RAID.

Why? The idea of LVM is that you don't have to juggle around with partitions, but can crate volumes as needed.

Both modify the partition table. parted is more user-friendly, while fdisk is more scriptable, and an experienced user is probably faster using fdisk than parted.

If you want to create an additional partition, you should without question first backup and check the backup, and only then:

  • shrink the filesystem(s) in the LVM
  • shrink the logical volumes
  • shrink the volume group
  • repartition.

That's more or less the whole idea behind a mirrored disk setup, that changes are done to both sides in case one fails.

Before you start making any changes and fsck up the machine, read up on Logical volume management, LVM, and RAID.