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.

learn more… | top users | synonyms (1)

149
votes
4answers
49k views

LVM dangers and caveats

I have recently started using LVM on some servers for hard drives larger than 1 TB. They're useful, expandable and quite easy to install. However, I could not find any data about the dangers and ...
26
votes
5answers
18k views

What is better LVM on RAID or RAID on LVM?

I currently have LVM on software RAID, but I'd like to ask you what you think it is better solution, maybe some pros and cons? Edit: It is about software raid on lvm or lvm on software raid. I know ...
25
votes
1answer
4k views

When using software RAID and LVM on Linux, which IO scheduler and readahead settings are honored?

In the case of multiple layers (physical drives -> md -> dm -> lvm), how do the schedulers, readahead settings, and other disk settings interact? Imagine you have several disks (/dev/sda - /dev/sdd) ...
24
votes
4answers
7k views

LVM snapshots vs. file system snapshots

As far as I know, LVM makes it possible to take snapshots of a volume. There are also a number of file systems (ZFS, Btrfs, reiserfs, ...) which supports snapshots. However, I've never understood the ...
22
votes
2answers
16k views

Is it possible to on-line shrink a EXT4 volume with LVM?

Today I tried this on my machine with OpenSUSE 12.3 (kernel 3.7): # resize2fs /dev/mapper/system-srv 2G resize2fs 1.42.6 (21-Sep-2012) Filesystem at /dev/mapper/system-srv is mounted on /srv; on-line ...
22
votes
2answers
11k views

Readahead Settings for LVM, Device-Mapper, Software Raid and Block Devices - what wins?

I've been trying to find a straight answer on this one, and it has proved elusive. This question and its answer is close, but does not really give me the specifics I would like. Let's start with ...
21
votes
4answers
29k views

Removing vg and lv after physical drive has been removed

We had a disk fail in a server and replaced it before removing the drive from LVM. The server has 4 physical drives (PV's), each with it's own volume group (VG). Each VG has 2 or more logical ...
18
votes
7answers
4k views

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 ...
17
votes
4answers
31k views

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 ...
17
votes
9answers
24k views

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 ...
17
votes
5answers
12k views

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. ...
16
votes
9answers
20k views

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 ...
16
votes
7answers
13k views

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 ...
16
votes
4answers
14k views

KVM/qemu - use LVM volumes directly without image file?

I'm not quite sure how to phrase this question (hence the poor title), so let me provide an example of what I'm trying to do. On my (old) Xen host, I'm able to present LVM filesystems directly to ...
15
votes
3answers
22k views

How to find the physical volume(s) that hold a logical volume in LVM

I have a volume group (VG) that contains two physical volumes (PV). Several logical volumes (LV) in the VG are likely to use extents on both PVs. Is there a way to tell which LVs occupy space on ...
15
votes
10answers
58k views

“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 ...
14
votes
2answers
40k views

LV Status: Not available. How to make it available?

I connect an iSCSI target, create a Physical Volume and Volume Group on it. Then I create an LV, and mkfs.ext3 /dev/vg00/vm and all that works great. Then I disconnect the target iscsiadm -m ...
14
votes
4answers
6k views

Improving IO with FlashCache

I have a server with 2 HDD's (2x 1 TB), running in RAID 1 (SW-RAID). I want to improve IO performance by using flashcache. There are running KVM virtual machines on it, using LVM. Regarding this, I ...
14
votes
4answers
19k views

How to resize root LVM partition in Fedora without LiveCD or Rebooting

I have a virtual machine that recently had its disk image increased from 20GB to 50GB, and fdisk -l verifies that the VM can see this new size. Now I need to resize my root LVM partition to fill the ...
13
votes
6answers
18k views

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 ...
12
votes
4answers
23k views

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 ...
12
votes
3answers
8k views

LVM Performance overhead?

I would be thankfull if someone who understands how LVM works, could tell me a rough estimate, how much slower using LVM (with a Software RAID1) will be. (What I do not want to know how much slower ...
12
votes
2answers
10k views

SSD, Erase Block Size & LVM: PV on raw device, Alignment

I want to install a new SSD and use the the whole device as a PV for LVM - in other words: i don't plan to put even one partition on this device. So aligning partitions on the erase blocks is not ...
11
votes
7answers
10k views

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 ...
11
votes
5answers
3k views

Mounting a partition from a raw DD image file of a physical disk

I have a DD image taken from the raw HDD image (/dev/sdb). This image file contains an XFS filesystem that I need to mount. It is much too large to restore to disks (2.6TB img file) so I would like to ...
11
votes
3answers
6k views

LVM volume group shared between KVM/libvirt host and guests: is this a bad idea?

I have just built a shiny new KVM/libvirt-based virtual machine host, containing 4 SATA II hard drives, and running CentOS 5.5 x86_64. I have decided to create virtual machine disks as logical ...
10
votes
5answers
6k views

LVM and disaster recovery

I understand what LVM is and what it accomplishes, but I feel like I am missing some things. Lets say we have two physical drives, sda and sdb. Both are 100 Megs. I put them into VolumeGroup1 and ...
10
votes
8answers
20k views

Ubuntu: Resize the root LVM(2?) partition

I have an Ubuntu virtual machine running in VirtualBox 2.2.4, and I created it on an 8gb virtual disk which is too small. So, I am trying to increase the size of the disk. So far, I have done this: ...
10
votes
2answers
17k views

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 ...
9
votes
5answers
8k views

What are the benefits of the Logical Volume Manager

What are the features and potential benefits of Logical Volume Manager beyond what is detailed on its Wikipedia page?
9
votes
5answers
14k views

Linux LVM snapshot commit or revert?

I'm about to perform an experimental upgrade on my CentOS 5 server. If the upgrade fails, I want to be able to back out the changes to the filesystem. This scenario seems similar to the example in ...
9
votes
4answers
22k views

How to mount virtual machine's LVM partition on KVM host?

If I trying to do following on KVM host: # kpartx -av /dev/VolGroup00/kvm101_img add map kvm101_img1 : 0 208782 linear /dev/VolGroup00/kvm101_img 63 add map kvm101_img2 : 0 125612235 linear ...
9
votes
5answers
16k views

linux LVM mirror vs. MD mirror

I think I remember making some mirrors years ago with LVM, and I don't remember this "log" thing. Or maybe I made the mirror with mdadm and put LVM on top. That must be it. What is the LVM log for ...
9
votes
3answers
6k views

Xen image file vs partition/LVM volume performance

I read quite a lot of advice to switch from file-image VM storage, to partition/LVM volume based. The claim is that partition/LVM are much faster then image files. The downside in my opinion, is ...
9
votes
4answers
4k views

How to keep or drop LVM snapshot?

I have made an LVM snapshop by lvcreate --name snap --size 10G -s /dev/vg00/vm What command should I write if I want to drop the snapshot, and not keep the changes that have happened since the ...
9
votes
1answer
5k views

Are ZFS pools or LVM volume groups more reliable for utilizing many partitions?

When deciding whether to use LVM volume groups or ZFS pools in configuring new file servers, what needs to be considered? Is there a "better" choice in the realm of multi-purpose file servers? Unlike ...
9
votes
2answers
1k views

Linux device-mapper maps LVM PV nested inside LV when taking snapshot

Which is really messing with my plan to back up this machine... I have a server which is a KVM hypervisor to several virtual machines. One of these is running Docker. It has its Docker volumes on ...
8
votes
4answers
11k views

Does LVM need a partition table?

It appears that I am able to successfully do a pvcreate on top of a raw block device, without ever taking the step of creating a partition table. I am then able to create a volume group, logical ...
8
votes
4answers
18k views

What is the difference between LVM and LUN

Both seem to be a virtualization layer on top of physical disks. I'm having a hard-time understanding each of them and the difference between them.
8
votes
4answers
11k views

How to recover logical volume deleted with lvremove

I am on CentOS 5.5 and am running Xen. I have a large volume group that I create logical volumes on using lvcreate. Today I had a customer cancel her account, then change her mind about an hour ...
8
votes
3answers
14k views

What KVM disk type to use?

I'm setting up a few KVM virtual guests and I'm debating which disk type to use. I haven't been able to find a good resource online that runs down the pros and cons of each. Can you help me create a ...
8
votes
7answers
36k views

Can't remove open logical volume

When I try to remove a logical volume I get the message #lvremove /dev/my-volumes/volume-1 Can't remove open logical volume "volume-1" #lvchange -an -v /dev/my-volumes/volume-1 Using logical ...
8
votes
1answer
5k views

Resizing a LUKS encrypted volume

I have a 500GiB ext4 filesystem on top of LUKS on top of an LVM LV. I want to resize the LV to 100GiB. I know how to resize ext4 on top of an LVM LV, but how do I deal with the LUKS volume? ...
8
votes
4answers
4k views

Using 4k drives with md/LVM/dm-crypt

I know that I have to align my 4k drives by a multiple of 8 sectors, but what about md-RAID / LVM / dm-crypt? How do I tell these layers that my drive is 4k? If they don't respect the 4k sector size, ...
8
votes
1answer
5k views

What happens when a disk fails in LVM?

I am configuring a linux server on an ESX 4.1 host. This server needs to have several TBs of data stored on it. We are currently debating whether or not to use LVM. Our current reasoning is that is is ...
8
votes
4answers
1k views

On Ubuntu 11.10, is it possible to decrypt 2 hard disks encrypted with LUKS / LVM by entering only one passphrase at boot?

here the configuration I have : - 2 hard drives, - first one is encrypted using LUKS and LVM. I'd like to add in the volume group encrypted a second hard drive. I have successfully installed it and ...
8
votes
1answer
2k views

Can I use dmraid instead of md (mdadm) to make software RAID-1 and RAID-1+0 volumes?

On a related question about SSDs and TRIM (see: Possible to get SSD TRIM (discard) working on ext4 + LVM + software RAID in Linux? ), it turns out that dmraid may now (or shortly) support TRIM on ...
7
votes
4answers
3k views

Software RAID10 for later growth

I'm wondering what the best practice is for creating RAID10 in software on Linux with the ability to later grow by adding disks or expanding volumes underneath. I'm using EBS on Amazon, I want to ...
7
votes
3answers
8k views

debian 6 preseeding keeps asking “Write the changes to disks and configure LVM?”

I try to use an expert recipe configuring lvm for debian 6.0.5 netinstall. I don't want to be asked any questions, but it keeps asking me "Write the changes to disks and configure LVM?" Here is part ...
7
votes
6answers
11k views

KVM online disk resize?

We're evaluting KVM for Linux virtualization on a few projects. All is going well so far. But one of our requirements is the ability to add disk space to a running guest without rebooting or taking it ...