PDA

View Full Version : [ubuntu] 13.10 create filesystem on LVM logical volume



msnel
March 10th, 2014, 09:30 PM
Hi,

I recently did a clean install of Ubuntu 13.10 and chose the LVM option at install (first time I use LVM). I didn't do any partitioning beforehand. My partitions now look like (/dev/sda is my SSD; I have another /dev/sdb HDD that is as yet unallocated):
251022
My system works just fine, but vairous posts (for example here (https://help.ubuntu.com/community/UbuntuDesktopLVM)) state that after creating the volume group, physical and logical volume, a filesystem should be created for the logical volumes using mkfs. As far as I can tell from GParted and the LVM tools and fdisk, this hasn't been done yet for my system (e.g. GParted lists filesystem as "lvm2 pv", whereas I would expect something like "ext4").

Do I need to / is it recommended to still do this, since my system works fine anyway? Why, or why not? And if I want to resize logical volumes, should I do this before or after creating the filesystem?

LVM setup looks like:
251023
Fdisk output looks like:
251024

Thanks!

steeldriver
March 10th, 2014, 09:54 PM
It looks fine to me - what you're observing is the inability of fdisk to properly deal with LVM volumes. If you try parted instead you should see the filesystem info e.g.


sudo parted -l
or

sudo parted -l /dev/mapper/ubuntu--vg-root

Alternatively, you can use the file utility


sudo file -sL /dev/mapper/ubuntu--vg-root

msnel
March 11th, 2014, 09:21 PM
That worked -- parted shows me the ext4 filesystem on the non-swap part of /dev/sda5. I thought GParted would show the same info as parted. Thanks!