Skip to main content
Share Your Experience: Take the 2024 Developer Survey
50 votes
Accepted

No more space in root filesystem, how could I increase the size?

Good news! pvscan shows PV /dev/sda10 VG fedora lvm2 [141.56 GiB / 77.56 GiB free] — so you should be able to add up to 77.56GiB to any of your filesystems. I'd suggest adding it in smaller blocks (...
mattdm's user avatar
  • 2,901
25 votes
Accepted

Best order of RAID, LVM and LUKS

First, the order of LUKS and LVM depends on if you want to have different LUKS passwords or other settings for different LVs. If say, you need to set up different passwords for different LVs, you ...
Yan Li's user avatar
  • 396
16 votes

How to mount an LVM volume from a dd/raw/vmdk image?

Install kpartx sudo apt-get install kpartx Integrate the volumes in dev/mapper using sudo kpartx -a -v image.dd Check dev/mapper to see your partitions administrator@cdc-ansible:~$ ls -l /dev/...
gies0r's user avatar
  • 391
10 votes

No more space in root filesystem, how could I increase the size?

More general answer for LVM: Firstly - make sure you have additional unpartitioned storage. Then: Use fdisk to create new partition (safer than expanding existing one) Use pvcreate to create ...
Maciej Asembler's user avatar
9 votes
Accepted

How do I find what filesystem is on a logical volume?

The blkid command seems to be the best answer. Among its output lines is /dev/mapper/mint--vg-root: UUID="blah" TYPE="ext4" showing that the LV "root" has an ext4 filesystem.
Borea Deitz's user avatar
  • 1,157
8 votes

Converting LVM/EXT4 to ZFS without losing data

Short: I think there is no in-place conversion of ext4 to ZFS. For media servers I'd recommend SnapRAID instead Edit: Before I go deeper: Remember to use ECC RAM with ZFS. SnapRAID is not that ...
Tino's user avatar
  • 1,196
6 votes
Accepted

How to use all the hard drive space in VM

Thanks for adding the lvm information asked for. You have to do the following (as root or add sudo in front): lvextend /dev/ubuntu-vg/root -l +100%FREE - this will add all free space from the volume ...
Zina's user avatar
  • 2,317
6 votes

Best order of RAID, LVM and LUKS

If you want all RAID, LUKS and LVM I would recommend RAID -> LUKS -> LVM -> FS. RAID --> LVM --> LUKS --> LVM --> FS is no better than RAID -> LUKS -> LVM - to extend ...
Martian's user avatar
  • 884
6 votes

QEMU + KVM + LVM - performance of block device drive vs file image

Block size mismatch might be the problem. You ideally want to match your File System with the underlying block size of the media. While you didn't share what you picked for block sizes I think you ...
David Aubin's user avatar
5 votes

Migrate LVM to ZFS

The short answer is no - there is no direct migration path for LVM -> ZFS. Your research leads you down the right path - you'll need 3 additional drives, create the zpool with those drives, use ...
Virtually Nick's user avatar
5 votes

Are there any LVM like solutions for Windows?

Things have changed a great deal since this question was asked. Windows does support a form of LVM called Storage Spaces now. It has almost identical flexibility and features. See link below for ...
DanMan3395's user avatar
5 votes

vgdisplay and lvdisplay No volume groups found

You must create the volume with vgcreate "name" /dev/sdb5
SamSam's user avatar
  • 51
5 votes

How to mount an LVM volume?

I find guestmount(1) the easiest way. # guestmount -m /invalid/path -a /path/to/block/device /mnt/ guestmount: '/invalid/path' could not be mounted. guestmount: Did you mean to mount one of these ...
tobixen's user avatar
  • 279
5 votes
Accepted

MD Raid 1 read balancing algorithm

Linux implementation of RAID1 speeds up disk read operations as long as two separate disk read operations are performed at a time. That means reading one file won't be any faster on RAID1 than on ...
Overmind's user avatar
  • 10.1k
4 votes

Is there a simple way to move/copy a logical volume from one volume group to another? (LVM2)

As of the LVM in Debian stretch (9.0), namely 2.02.168-2, it's possible to do a copy of a logical volume across volume groups using a combination of vgmerge, lvconvert, and vgsplit. Since a move is a ...
Faheem Mitha's user avatar
4 votes

How to make suspend to RAM secure on Ubuntu with full disk encryption (LVM on top of LUKS)?

I've come across the same problem, so I took another shot at porting the same script, which you can see here. It doesn't touch any non-volatile storage after luksSuspend, so it works even with real ...
zhongfu's user avatar
  • 149
4 votes

LVM Difference in paths for mounts

Maybe this changed since the question was asked, but the man pages for LVM2 state (emphasis mine): A directory bearing the name of each Volume Group is created under /dev when any of its Logical ...
bernie's user avatar
  • 352
4 votes

Installing Debian on existing encrypted lvm

Better late than never, a solution for installing Linux system using Debian installer to an already LUKS encrypted LVM volume group: https://dragonvslinux.wordpress.com/2017/09/24/installing-debian-9-...
DragonvsLinux's user avatar
4 votes
Accepted

LVM: How should I attempt to recover from PV and possible LV corruption?

If any of this starts to not work, or stops making sense, STOP and ask a subject matter expert. This is unsafe work. Operate on disk images copied by "dd" to either files on a large storage ...
Spooler's user avatar
  • 432
4 votes

Encrypted LVM in Debian Install - Is whole disk encrypted?

Assuming you used the 'Guided - Use entire disk and Setup LVM', then YES the entire drive (well the LVM itself if that is not the entire drive, minus the /boot and potentially /boot/efi partitions). ...
linuxdev2013's user avatar
  • 1,331
4 votes
Accepted

How to expand logical volume on existing physical volume on Linux

The procedure is relatively sample. First you need to extend the LV: lvextend -L+1GB /dev/mapper/ubuntu--vg-ubuntu--lv The last command add 1 GB space to / and then extend your filesystem. If it's ...
Romeo Ninov's user avatar
  • 6,405
4 votes
Accepted

why fdisk -l /dev/sdX not show under system the "Linux LVM"

The id 83 in a dos partition table is a generic one for Linux filesystems; 8e is a more specific one for Linux LVM. The id of your /dev/sda2 was a choice of whoever created the partition. The choice ...
Kamil Maciorowski's user avatar
3 votes

How can I use one lvmcache "cache pool LV" for multiple origin LVs?

On a mainline kernel using the same cache for multiple origin devices is NOT supported by dm-cache (which is what lvmcache uses underneath) due to races accessing metadata. See Re: [dm-devel] dm-cache:...
Anon's user avatar
  • 1,379
3 votes

How can I use one lvmcache "cache pool LV" for multiple origin LVs?

You can create cached volume and convert it to thin-pool. cache pool (cache data + cache metadata) -> cached volume (cache pool + original big slow volume) -> cached thin-pool In this example ...
Roman Navrotskii's user avatar
3 votes
Accepted

Migrating away from LVM

Even though this question is a couple years old, I'll leave the following for reference: you can actually force LVM to allocate extents from a specified Physical Volume when creating a new LV. The ...
Nubarke's user avatar
  • 384
3 votes

Customizing LVM disk encryption splash logon screen

These are password prompts for two different passwords. Since the system cannot assume that the passwords are equal, it will have to ask for both separately. Secondly, the first password is required ...
Jaap Eldering's user avatar
3 votes

MD Raid 1 read balancing algorithm

If you only have a single stream of sequential I/O the md RAID1 algorithm will keep picking the same disk. From the mdadm man page: [On md RAID1] a single stream of sequential input will not be ...
Anon's user avatar
  • 1,379
3 votes

LVM thinpool thinvolume free blocks, reclaim space

LVM thin supports DISCARD, more broadly known as TRIM. It should theoretically be possible to somehow make this work with iSCSI (there’s an equivalent UNMAP command), but I haven’t found anything on ...
Daniel B's user avatar
  • 63.5k
3 votes

LVM complaining about device smaller than logical volume

You need to fix this or you will run into problems later on. The problem is, that the PV is larger than the room you have in /dev/mapper/slackluks. The step lvcreate -l 100%FREE -n root cryptvg # / is ...
Ljm Dullaart's user avatar
  • 2,537

Only top scored, non community-wiki answers of a minimum length are eligible