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)

109
votes
4answers
30k 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 ...
23
votes
1answer
2k 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) ...
21
votes
4answers
3k 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 ...
19
votes
5answers
8k 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 ...
18
votes
2answers
5k 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 ...
16
votes
8answers
1k views

Optimal UNIX File System Partition + Setup Strategy

When partitioning a new system disk(s) for UNIX, what is your prefered strategy for both desktop and/or servers? Please include disk partition layout, file system format(s) and options, mount points, ...
16
votes
5answers
10k 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. ...
15
votes
9answers
18k 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 ...
14
votes
6answers
9k 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 ...
13
votes
8answers
17k 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 ...
13
votes
4answers
4k 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 ...
12
votes
5answers
9k 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 ...
11
votes
4answers
21k 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 ...
11
votes
2answers
22k 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 ...
11
votes
5answers
2k 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
8k 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 ...
10
votes
3answers
5k 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 ...
9
votes
4answers
10k 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
5answers
12k 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 ...
9
votes
5answers
4k 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 ...
8
votes
3answers
5k 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 ...
8
votes
8answers
17k 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: ...
8
votes
3answers
4k 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 ...
8
votes
2answers
6k 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 ...
8
votes
3answers
5k 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 ...
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
12k 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.
7
votes
4answers
4k 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 ...
7
votes
4answers
2k 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
5answers
7k views

Linux md vs. LVM performance

I am trying to tune my NAS, running openfiler, and wondering why I'm getting relatively poor read performance from 4 WD RE3 drives in RAID 5. EDIT: Please note I am talking about the buffered disk ...
7
votes
3answers
12k 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 ...
7
votes
2answers
3k views

LVM2 vs MDADM performance

I've used MDADM + LVM2 on many boxes for quite a while. MDADM was serving for both RAID0 and RAID1 arrays, while LVM2 where used for logical volumes on top of MDADM. Recently I've found that LVM2 ...
7
votes
4answers
355 views

Getting a textual overview of a system's LVM configuration

We are making extensive use of the logical volume manager (LVM) on our Debian servers. But I find it hard to get a good overview on which partitions (LVM as well as native) I have mounted where, from ...
7
votes
2answers
461 views

convert 1x2TB HDD with LVM into 2x2TB HDD with RAID1+LVM or with LVM mirroring?

I have Ubuntu server with 1x2TB HDD and 1x128GB SSD (unused). There are 2 partitions: /boot, and a physical volume for LVM, which has 1 group and 5 logical volumes: /, /var/log, /home, /srv, /tmp. ...
7
votes
4answers
3k 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, ...
7
votes
1answer
1k views

XFS: no space left on device, (but I have 850GB available!)

I'm using a combination of mdadm, lvm2, and XFS on Amazon EC2. So far, I've had success running a RAID 5 volume built from a number of EBS volumes. The EBS volumes are attached and used with mdadm to ...
6
votes
8answers
31k 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 ...
6
votes
1answer
140 views

Forgot to create partition before running pvmove

I ran pvmove to migrate extents from an old LVM disk to a new one but I forgot to create the partition structure on the new disk first: pvmove /dev/sdb1 /dev/sdc Everything seems to be fine, but I'm ...
6
votes
3answers
4k 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 ...
6
votes
5answers
10k views

Best practices for thin-provisioning Linux servers (on VMware)

I have a setup of about 20 Linux machines, each with about 30-150 gigabytes of customer data. Probably the size of data will grow significantly faster on some machines than others. These are virtual ...
6
votes
3answers
2k views

Backing up Xen domains

I'm currently developing a Xen backup system, however I have met the following problem: I have two methods of backing up: doing dd from the LVM snapshot, and tarring it., and rsync it remotely ...
6
votes
2answers
4k views

How to do the equivalent of Synology Hybrid Raid on Linux myself?

http://forum.synology.com/wiki/index.php/What_is_Synology_Hybrid_RAID%3F Synology is just Linux and uses LVM. How do their tools automate LVM to achieve what they call their Hybrid Raid?
6
votes
1answer
399 views

How can I copy a LVM logical volume to a loopback file on another system?

I am trying to copy an LVM logical volume with an ext3 filesystem from one system to a file on another system that I will be able to mount as a loopback device. I have tried the following command to ...
6
votes
4answers
740 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 ...
6
votes
1answer
658 views

Simulating a missing superblock error on EXT4 linux system

I'm trying to write reference material for a friend who has power outages a couple of times a year which affect their linux server. This person is not well versed in linux systems administration, so I ...
6
votes
1answer
652 views

Grub2 reports physical volume pv0 not found on server non bootable anymore

I first installed my ubuntu server (11.10 amd64) using lvm but not fully mastering the concept of it. I think that's partly what made the mess of partitions on my two disks (seems to me). I installed ...
5
votes
6answers
3k views

What is the perfect setup for a small Linux virtual server?

I have my own email server, and it serves a couple of dozen users. I need to replace it right now, and I want the replacement to be a virtual server image running under a hypervisor. My plans for ...
5
votes
7answers
5k 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 ...
5
votes
5answers
13k 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 ...
5
votes
6answers
5k views

Is there a way to do something like LVM over NFS?

I realize that since NFS is not block-level, LVM can't be used directly. However: is there a way to combine multiple NFS exports (from, say, 3 servers) into one mount point on a different server? ...