Questions tagged [lvm]

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.

1457 questions
195
votes
6 answers

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 caveats of LVM. What are the downsides of using LVM?
Adam Matan
  • 12,504
  • 19
  • 54
  • 73
74
votes
4 answers

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 which PVs?
Paul
  • 1,890
  • 3
  • 18
  • 24
60
votes
4 answers

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 resizing required resize2fs: On-line shrinking…
Alicia
  • 755
  • 1
  • 5
  • 8
54
votes
6 answers

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 than hardware raid is better if we are thinking…
Ency
  • 1,201
  • 1
  • 19
  • 26
35
votes
3 answers

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 volumes (LV's.) Now LVM is complaining about the…
Dokbua
  • 1,052
  • 1
  • 9
  • 18
35
votes
3 answers

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 what I think I know. If you have a standard block…
Adam C
  • 5,132
  • 2
  • 28
  • 49
34
votes
4 answers

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 difference between LVM snapshots and file system…
nip3o
  • 497
  • 1
  • 4
  • 7
33
votes
5 answers

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 LVM will be if the LVM Volume is currently in…
jens
  • 377
  • 2
  • 4
  • 6
33
votes
2 answers

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 node -T iqn.2004-04.com.qnap:ts-509:iscsi.linux01.ba4731…
Sandra
  • 9,973
  • 37
  • 104
  • 160
29
votes
1 answer

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) all part of a software RAID device (/dev/md0)…
andrew311
  • 391
  • 3
  • 6
28
votes
7 answers

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 extra 30GB. I've found several articles about…
Cerin
  • 3,497
  • 17
  • 57
  • 72
27
votes
7 answers

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 volume, and finally a filesystem, mount it, and test…
cat pants
  • 2,139
  • 10
  • 33
  • 44
26
votes
5 answers

How to display used devices/free space when using LVM?

I have following situation: =$ LC_ALL=C df -hP | column -t Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg0-rootlv 19G 854M 17G 5% / /dev/mapper/vg0-homelv 19G 343M 18G 2% /home /dev/mapper/vg0-optlv …
user13185
24
votes
4 answers

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 each guest. These filesystems are actually created…
Jared
  • 373
  • 1
  • 3
  • 7
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,258
  • 2
  • 15
  • 12
1
2 3
97 98