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.

Filter by
Sorted by
Tagged with
195 votes
6 answers
85k 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 ...
Adam Matan's user avatar
  • 13.4k
82 votes
4 answers
203k 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 ...
Paul's user avatar
  • 1,978
62 votes
3 answers
98k 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 ...
Alicia's user avatar
  • 775
55 votes
6 answers
75k 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 ...
Ency's user avatar
  • 1,231
36 votes
3 answers
80k 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 ...
Dokbua's user avatar
  • 1,072
36 votes
3 answers
28k 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 ...
Adam C's user avatar
  • 5,222
35 votes
6 answers
35k 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 ...
jens's user avatar
  • 397
35 votes
4 answers
16k 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 ...
nip3o's user avatar
  • 507
34 votes
2 answers
95k 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 node ...
Sandra's user avatar
  • 10.4k
33 votes
6 answers
192k views

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 ...
user avatar
29 votes
14 answers
140k 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 ...
Everett Toews's user avatar
29 votes
1 answer
7k 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) ...
andrew311's user avatar
  • 391
28 votes
7 answers
39k 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 ...
cat pants's user avatar
  • 2,273
28 votes
7 answers
62k 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 ...
Cerin's user avatar
  • 3,620
24 votes
5 answers
57k 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 ...
Malfist's user avatar
  • 807
24 votes
6 answers
28k 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 ...
Nelson's user avatar
  • 363
24 votes
11 answers
40k 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 ...
David Hicks's user avatar
  • 2,308
24 votes
4 answers
42k 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 ...
Jared's user avatar
  • 383
23 votes
2 answers
7k views

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 ...
curios's user avatar
  • 363
23 votes
8 answers
263k views

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 ...
Yves Martin's user avatar
22 votes
11 answers
107k 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 "...
user avatar
22 votes
1 answer
89k views

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, ...
Matthew's user avatar
  • 2,747
21 votes
7 answers
8k 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 ...
alphatiger's user avatar
21 votes
1 answer
2k views

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 ...
m.divya.mohan's user avatar
21 votes
7 answers
22k 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 ...
Eddie's user avatar
  • 11.5k
20 votes
6 answers
15k 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. ...
Don MacAskill's user avatar
19 votes
10 answers
37k 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 ...
Karolis T.'s user avatar
  • 2,719
18 votes
6 answers
30k views

Commit or revert a Linux LVM snapshot?

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 ...
Shewfig's user avatar
  • 471
18 votes
7 answers
45k 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 dm-0,...
user avatar
18 votes
7 answers
25k 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 ...
Fujin's user avatar
  • 185
18 votes
5 answers
33k 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 ...
Sandra's user avatar
  • 10.4k
18 votes
2 answers
61k 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 ...
kissgyorgy's user avatar
17 votes
4 answers
23k views

is it possible to simultaneously mount 2 LVM volumes that are exact copies of each other (same UUIDs)?

I have cloned (using dd) the hard drive in a live system onto several multiple backup hard drives. The root partition in the live system is a LVM volume. The backup copies are intended to be drop-in ...
laramichaels's user avatar
17 votes
6 answers
77k views

pvresize doesn't seem to resize after increasing the size of the underlying block device

I increased the size of the partition which I'm using as a LVM PV, but running pvresize doesn't seem to see the extra space: cuttle:~# fdisk -l /dev/vda Disk /dev/vda: 21.5 GB, 21474836480 bytes 255 ...
stew's user avatar
  • 9,468
16 votes
8 answers
2k 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, ...
cmcginty's user avatar
  • 1,303
16 votes
5 answers
31k views

Is online disk resize possible with KVM?

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 ...
Eil's user avatar
  • 389
16 votes
1 answer
27k views

linux + lvextend vs lvresize - what are the differences

what are the diffrences between lvextend to lvresize as the below example? lvextend -L+1m /dev/mapper/rootvg-home lvresize -L+1m /dev/mapper/rootvg-home dose the both examples do exactly the same ?...
dandan's user avatar
  • 1,081
15 votes
6 answers
47k views

Moving a Logical Volume directly from one server to another over the network?

I have a KVM host machine with several VMs on it. Each VM uses a Logical Volume on the host. I need to copy the LVs to another host machine. Normally, I would use something like: dd if=/the/logical-...
Nick's user avatar
  • 4,521
15 votes
1 answer
16k 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? mgorven@...
mgorven's user avatar
  • 30.8k
15 votes
1 answer
39k views

Logical volume attributes

I've used lxc-clone command to clone my lvm-based container (test_lvm was copied to create u33). Container works fine, but the output of sudo lvs confuses me: LV VG ...
maniaque's user avatar
  • 730
15 votes
2 answers
20k 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 ...
m.sr's user avatar
  • 1,060
14 votes
8 answers
2k views

Linux - RAM Disk as part of a Mirrored Logical Volume

We have a server with 64GB of total RAM, applications are using typically a maximum of 30GB of that available RAM. One of those applications deals with a lot of flat files, and we're having throughput ...
Shayne Fitzgerald's user avatar
14 votes
3 answers
52k views

Easy way to transfer files between host and LXC container on LVM

This is an easy task in the case of containers that share the same filesystem but I'm not sure what would be the proper approach for containers that use LVM disks. I know I could use rsync or scp but ...
s3v3n's user avatar
  • 346
14 votes
4 answers
7k 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 ...
Devator's user avatar
  • 1,483
14 votes
3 answers
5k 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 /...
Michael Hampton's user avatar
13 votes
5 answers
16k views

What are the benefits of the Logical Volume Manager [closed]

What are the features and potential benefits of Logical Volume Manager beyond what is detailed on its Wikipedia page?
13 votes
5 answers
36k 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 ...
John P's user avatar
  • 1,679
13 votes
5 answers
54k views

How to change a physical partition system to LVM?

I have a server with Debian that have 3 physical partitions covering all the disk: boot, root y swap. Now I want to replace that partitions with LVM partitions. I know how install Debian with LVM at ...
Daniel Hernández's user avatar
13 votes
4 answers
41k 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 /dev/...
Evolver's user avatar
  • 626
13 votes
5 answers
13k 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 ...
Bob's user avatar
  • 2,967

1
2 3 4 5
31