60

I installed Ubuntu by choosing the option "Something else" at the step called "Allocate drive space" of the installer. Then I created my own partition table.

Now that Ubuntu is installed, can I check whether I am using LVM for my volumes ? In particular, can I see it in GParted Partition Editor ?

4 Answers 4

77

You should see it in Gparted. You can also just check your fstab file:

cat /etc/fstab

Watch the line with your root filesystem. Three possibilities here:

  1. If the line starts with UUID=xyz, this means it's a physical partition.
  2. If the line starst with /dev/sdaX, it also means it's a physical partition.
  3. The indicator for LVM would be something with /dev/mapper/xyz.
39

Just wanted to leave this here for people searching in the future.

You can get LV information by using the lvdisplay command. If you have any logical volumes they will appear as such as well as additional information about that volume such as the path, logical volume name, volume group name, size, etc.

If you have not setup a an LVM then lvdisplay won't be installed or it won't be able to find lvmetad.socket

1
  • Welcome to Ask Ubuntu! I recommend to edit this answer to expand it with specific details about how to interpret the output of that command with regards to the question. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on AskUbuntu.) Apr 11, 2017 at 21:36
2

In particular, can I see it in GParted Partition Editor ?

Yes, you can also see it with GParted.

enter image description here

LVs will show up as a "lvm2 pv" File System.
It will also have a "lvm" flag.

On right-click then selecting Information, it will also show:

enter image description here

This is on Ubuntu 18.04.4 LTS and GParted 0.30.0.

1

I check both /etc/fstab and the current mounts.

if  grep -Pq '/dev/(mapper/|disk/by-id/dm)' /etc/fstab  ||  mount | grep -q /dev/mapper/
then
    echo "LVM is in use"
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .