From the course: Ubuntu Linux: Storage Management

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a physical volume, volume group, and logical volume

Creating a physical volume, volume group, and logical volume

From the course: Ubuntu Linux: Storage Management

Start my 1-month free trial

Creating a physical volume, volume group, and logical volume

- [Instructor] To start out with, let's take a look at a diagram of what we'll actually be doing when we create one volume on one disk with LVM. We have the actual disk, and then we'll create a partition and a physical volume on top of that. We'll add that physical volume to a volume group and then on the volume group, we'll create a logical volume and add a filesystem on top. Here at the command line, the first thing we need to do is make sure we have a nice, clean disk. LVM can create a volume on a whole disk device but it's recommended that you create a partition for the whole disk and then use that for your physical volume. So I'll jump into fdisk here for /dev/sdb and make sure that this volume only has one partition. And I'll set the partition type to GPT as well. There's my GPT disklabel, and then n for new partition, number one, and accepting the defaults to make the full size. I'll write this change. Now we need to create a physical volume. To do that, I'll use the pvcreate…

Contents