Questions tagged [lvm]

Logical Volume Management provides storage abstraction, a generalization of disk partitioning.

LVM is a collection of user-space utilities and kernel modules that provide layers of abstraction to the storage available on Unix systems. Among its many notable features are the ability to:

  • combine many disks into one storage pool
  • stripe volumes across different physical storage devices
  • mirror volumes
  • snapshot volumes
  • enlarge or shrink volumes, often without system downtime
1576 questions
34
votes
2 answers

What is lvmetad and why would I want or need to use it?

I have a Gentoo server with LVM running on top of a RAID array that I have been using for a number of years. Recently I upgraded LVM to 2.02.109 (don't recall what version it was before) and received a message while upgrading: * Make sure to enable…
28
votes
3 answers

Where does LVM store its configuration?

I am trying to understand how / where LVM stores its configuration data. Does pvcreate /dev/sdb write any metadata to /dev/sdb? if so what is written? Where does vgcreate data /dev/sdb /dev/sdc store configuration of the volume group? Where does…
ams
  • 1,358
23
votes
1 answer

How to shrink a physical volume?

I have a physical volume on a partition which extends across the whole disk, say /dev/sda1 using 100% of /dev/sda. Now I need to shrink it to create /dev/sda2. A logical volume actually uses ~50% of the PV, so theoretically there's plenty of room…
Jasio
  • 524
12
votes
3 answers

How can I find out the free space on an LVM PV in human readable format?

I'm looking for a way I can get the free space on an LVM physical volume without having to use a calculator. I know the pvdisplay command will show me the size of a PE size as well as the free PE, and thus by multiplying the PE size by the free PE I…
Josh
  • 8,449
9
votes
1 answer

LVM - Volume Group - What are Extents?

What are extents? For example, the command: vgcreate -s 16M vg1 /dev/sda7 /dev/sda8 creates a Volume Group, vg1. Am I right in saying that extents are like buckets? i.e. we're setting a 16M bucket size? And can anyone refer me to some simple…
Snowcrash
  • 679
8
votes
1 answer

two physical disks with same volume group names preventing access

My 8 year old computer with fc22 died. I have a new computer now running fc25. I had routinely backed up my most important data, so not all is lost, but I would like to look at what I have on my old disk. I have a usb enclosure and put my old disk…
Matt Brin
  • 183
8
votes
1 answer

Can thin LVs be moved to a different LVM pool?

If I have (2) thin pools (vg/pool1) and (vg/pool2) inside the same volume group, with an LV inside the first pool, is there a LVM command to move that LV to the second pool? Would pvmove do that? Alternately, if you have a thin LVM pool that is…
tgharold
  • 283
7
votes
1 answer

WARNING: ext4 signature detected on /dev/VG/swap at offset 1080. Wipe it?

I have created a VG, and want to create a LV for swap: $ sudo lvcreate -n swap -L 4G VG WARNING: ext4 signature detected on /dev/VG/swap at offset 1080. Wipe it? [y/n]: y Wiping ext4 signature on /dev/VG/swap. Logical volume "swap" created. $…
Tim
  • 101,790
7
votes
3 answers

How to rename a logical volume when there are multiple volume groups with the same name

I installed Fedora 24 on my main drive, but later decided to install it on my solid state drive instead. After doing so, I tried to mount my main drive (after running cryptsetup), but this happened: # lvrename /dev/fedora/home /dev/fedora/althome …
user2267
7
votes
2 answers

Extend thin LVM Metadata Size

I was wondering how I can extend Metadata size in a lvm thin provisioning (on latest Kernel / LVM2). [root@srv ~]# lvs -a LV VG Attr LSize Pool Origin Data% Meta% lv1 volgroup1 twi-aotz-- 125.00g …
Jai
  • 161
6
votes
1 answer

LVM2 can not wake up suspended logical volume

Read my story below. I'm using LVM2 with following information: Scan for VG: # vgs VG #PV #LV #SN Attr VSize VFree unix 1 1 0 wz--n- 115.00g 45.00g Scan for LV # lvs LV VG Attr LSize Origin Snap% Move Log Copy% …
uocnb
  • 383
  • 1
  • 4
  • 12
5
votes
2 answers

How to remove missing PV when VG has a duplicate name

Using MaaS to reinstall Ubuntu 18.04, I ended up in the situation where I've got two Volume Group's named "vgroot", two logical volumes named lvroot and an extra PV now named [unknown]. How do I get rid of the extra stuff? I can't pvremove by…
5
votes
1 answer

Create a volume group from a logical volume instead of a physical volume

Is it possible to create a volume group from a logical volume instead of a physical volume? If so, are there any pitfalls in doing so? Use case: Installing OpenStack Compute on a a system that already has all of the physical volumes assigned to a…
5
votes
2 answers

LVM: is this mirrored? is copy this slow?

Background: My Windows Home Server bit the dust - some kind of OS Hang. The drives and hardware were still good; after making sure I had all my data backed up, I decided to investigate Ubuntu and LVM, (along with btsync and samba, but that's…
4
votes
2 answers

Balancing LVM Virtual group between disks

I have an LVM virtual group with 4x disks, on this virtual group there are several logical volumes. However all the logical volumes have been placed on the first disk in the group resulting in poor performance. It it possible to rebalance the…
1
2 3
9 10