In computer storage, Logical Volume Management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes.
Questions tagged [lvm]
1504 questions
24
votes
5 answers
Is this how LVM snapshots work?
I'm trying to figure out how LVM snapshots work so I can implement it on my fileserver but I'm having difficulty finding anything on google that explains how it works, instead of how to use it for a base backup system.
From what I've read I think it…

Malfist
- 807
- 3
- 10
- 22
24
votes
11 answers
Sync LVM snapshots to backup server
I have a number of Xen virtual machines running on a number of Linux servers. These VMs store their disk images in Linux LVM volumes with device names along the lines of /dev/xenVG/SERVER001OS and so on. I'd like to take regular backups of those…

David Hicks
- 2,288
- 2
- 15
- 12
24
votes
6 answers
How do I easily repair a single unreadable block on a Linux disk?
My Linux system has started throwing SMART errors in the syslog. I tracked it down and believe the problem is a single block on the disk. How do I go about easily getting the disk to reallocate that one block? I'd like to know what file got…

Nelson
- 363
- 2
- 4
- 11
23
votes
2 answers
Is it safe to mount the same partition to multiple VMs?
I'm using ubuntu 20.04 with Xen Hypervisor. On my machine I have an SSD that hosts my VM images, and then four sata drives which I have data on. My current set up is to mount the data on my domain0 and then provide that data to the other VMs over…

curios
- 363
- 2
- 9
22
votes
8 answers
How to extend a Linux PV partition online after virtual disk growth
VMware allows to extend the size of a virtual disk online - when the VM is running.
The next expected steps for Linux system are:
extend the partition: delete and create a larger one with fdisk
extend the PV size with pvresize
use free extents for…

Yves Martin
- 879
- 3
- 8
- 21
22
votes
11 answers
"fdisk -l" like list of partitions and their types for LVM logical volumes?
You know how "fdisk -l" lists drive partition tables and shows the partition id/types for each partition?
Is there a similar way to get the partition id for LVM logical volumes?
EDIT: I'm aware of "lvs", which is mostly what I'm looking for (it…
arcanex
21
votes
1 answer
How can I tell pvresize to expand a physical volume to include all available space?
We have a poorly implemented mysql server that had been built by a vendor. It has consumed 100% of available disk space, and as soon as any space is cleared out mysql grows to consume it. This is, obviously, a problem.
We currently have 2 disks in a…

Matthew
- 2,737
- 8
- 35
- 51
21
votes
7 answers
Which filesystem for large LVM of disks (8 TB)?
I have a Linux server with many 2 TB disks, all currently in a LVM resulting in about 10 TB of space. I use all this space on an ext4 partition, and currently have about 8,8 TB of data.
Problem is, I often get errors on my disks, and even if I…

alphatiger
- 221
- 2
- 6
21
votes
7 answers
Is it possible to convert a Linux box to LVM after the fact?
My Linux server uses LVM because I replace the machine a year ago and installed from scratch. LVM has been a life saver and I love its flexibility. My Linux laptop, however, was last fully installed three years ago, and thus uses straight…

Eddie
- 11,432
- 8
- 37
- 48
21
votes
1 answer
Birth time of files are missing if file is created in a logical volume with size less than 512 MB
I have a volume group in my system, created with single physical volume.
I'm creating two logical volumes - one with size 100M and one with size 512M.
Any file created on LV with 100M size does not display birth-time attribute.
LV with size 512M…

m.divya.mohan
- 333
- 1
- 6
20
votes
6 answers
Possible to get SSD TRIM (discard) working on ext4 + LVM + software RAID in Linux?
We use RAID1+0 with md on Linux (currently 2.6.37) to create an md device, then use LVM to provide volume management on top of the device, and then use ext4 as our filesystem on the LVM volume groups.
With SSDs as the drives, we'd like to see the…

Don MacAskill
- 1,808
- 3
- 16
- 22
19
votes
9 answers
LVM snapshots as a backup strategy
How viable as a backup strategy would be periodical LVM snapshots of xen domU's? Pros, cons, any gotchas?
To me it seems like the perfect solution for a fast, brainless restore. Any investigation could take place on the broken logical volume with…

Karolis T.
- 2,719
- 7
- 33
- 45
18
votes
7 answers
How can I map iostat device names to LVM /dev/mapper/XXX names?
mount shows mount devices like:
/dev/mapper/VolGroup01-LogVol00 on /var type ext3 (rw)
or
/dev/mapper/VolGrp_backups-backups on /mnt/backups type ext3 (rw)
but
iostat uses dm- notation. like dm-0, dm-1 and so on.
Where can I find a way to know…
user13185
18
votes
2 answers
How to remove bad disk from LVM2 with the less data loss on other PVs?
I had a LVM2 volume with two disks. The larger disk became corrupt, so I cant pvmove.
What is the best way to remove it from the group to save the most data from the other disk?
Here is my pvdisplay output:
Couldn't find device with uuid…

kissgyorgy
- 302
- 1
- 5
- 16
18
votes
7 answers
Do you lose everything when you have a hard disk failure in a multi-hard disk LVM that does NOT use RAID?
I'm debating about using LVM for a media/file server because I would like to combine multiple physical hard disks into one volume. I do not wish to use any RAID in my LVM so my question is:
If one of the multiple hard disks in my volume were to go…

Fujin
- 185
- 1
- 1
- 6