Questions tagged [device-mapper]

The device mapper is a block layer component which allows the creation of virtual block devices. LVM2 is based on it.

92 questions
19
votes
1 answer

What does `cryptsetup resize` do if LUKS doesn't store partition size?

The LUKS / dm-crypt / cryptsetup FAQ page says: 2.15 Can I resize a dm-crypt or LUKS partition? Yes, you can, as neither dm-crypt nor LUKS stores partition size. I'm befuzzled: What is "resized" if no size information is stored? How does a…
Tom Hale
  • 28,728
  • 32
  • 139
  • 229
14
votes
1 answer

Why are there two different values for the size of a drive and how to reconcile them with device-mapper and LVM?

I have a 1 TB drive attached via USB. It contains an LVM physical volume filling the entire device (without any partition table). When I tried to extend a logical volume by using the entire PV, the device-mapper started to complain that the section…
Feuermurmel
  • 627
  • 1
  • 7
  • 16
7
votes
3 answers

list the devices associated with logical volumes without using lvm2 package commands

I want to list all the physical volume associated with logical volume. I know lvdisplay, pvscan, pvdisplay -m could do the job. but I don't want to use these commands. Is there any other way to do it without using lvm2 package commands? Any thoughts…
Deepak Ingole
  • 467
  • 2
  • 8
  • 16
7
votes
2 answers

remap read-only LUKS partition to read-write

cryptsetup can be invoked with --readonly or -r option, which will set up a read-only mapping: cryptsetup --readonly luksOpen /dev/sdb1 sdb1 Once I have opened a device as read-only, can I later re-map it to read-write? Obviously, I mean mapping it…
Martin Vegter
  • 69
  • 66
  • 195
  • 326
7
votes
2 answers

GNU/Linux: "device mapper: create ioctl failed" "device or resource busy"

I can't mount my encrypted devices anymore. The error is: device mapper: create ioctl failed device or resource busy This error arises both with two different programs to access TrueCrypt encrypted devices: TrueCrypt and Tc-play. In this case, the…
Eleno
  • 1,849
  • 4
  • 27
  • 39
6
votes
0 answers

How to guarantee temporary immutability of LVM2 LV at raw block level?

I inherited an Azure VM (Ubuntu 20.04) which has a 7 disk VG fully occupied by a RAID5 LV formatted as ext4. I need to take backups and was hoping to use Azure Backup to snapshot the Azure Disks comprising the VG. Azure Disk snapshots are not…
6
votes
0 answers

Documentation on Device Mapper ioctls?

In the Red Hat documentation on Device Mapper, it reads: "the application interface to the Device Mapper is the ioctl system call." So far, I understand that the ioctls are sent to /dev/mapper/control (for most distributions), but it seems I…
Zomp
  • 117
  • 1
  • 7
5
votes
0 answers

Mounting squashfs image with read-write overlay for rootfs

I am trying to update a custom initramfs init script to mount a squashfs image as the root file system. I have been testing the mounting of a squash image to a loop device in read only, mounting another empty file to another loop device in…
5
votes
2 answers

What's the difference between lvmcache and dm-cache?

Recently I found article mentioning that recently dm-cache significantly improved in linux. I also found that in userspace you see it as lvmcache. And it's quite confusing for me. I thought that LVM caching mechanism is something different than…
Lapsio
  • 1,283
  • 2
  • 18
  • 27
5
votes
2 answers

How can I tell if a encrypted (LUKS) device is already open?

Is there a way to tell, given a path to a LUKS block device, and not knowing the passphrase, whether the device is already open (decrypted)? What about knowing the path to the decrypted device?
loopbackbee
  • 4,442
  • 3
  • 24
  • 30
5
votes
1 answer

Get target device by /dev/dm-X entry

I have to map several loopback devices via dmsetup. I could track which loopback device is mapped to a particular /dev/dm-X device file, but is there an easy way to get this info by the /dev/dm-X itself? dmsetup info was of no help for me here.
5
votes
1 answer

How do I temporarily extract a flash drive or HDD in Linux?

Suppose I mounted a disk in this way: mount /dev/sdb /mnt/tmp I have some files opened on this filesystem and don't want to unmount it. However I want to temporarily extract the device, then reattach it later. I want all reads and writes to this…
Vi.
  • 5,528
  • 7
  • 34
  • 68
4
votes
2 answers

dm-integrity standalone mapper device lost after reboot

I currently try to use dm-integrity to run in standalone mode. For that I install a plain ubuntu server 20.04 in a virtual box VM. In the next steps I create the dm-integrity device, a ext4 filesystem and mount it: integritysetup format…
schlagi123
  • 143
  • 5
4
votes
1 answer

dmsetup: Where is persistent metadata stored?

The dmsetup snapshot documentation says: is P (Persistent) or N (Not persistent - will not survive after reboot). O (Overflow) can be added as a persistent store option to allow userspace to advertise its support for seeing…
Tom Hale
  • 28,728
  • 32
  • 139
  • 229
4
votes
1 answer

How to make device mappings stay after reboot?

I notice that if a device mapping is created with the low-level dmsetup or through ioctls, the device mapping will no longer be there after reboot. Is this normal? I am using a USB to test out dm_crypt If it is normal, how do I go about making the…
Zomp
  • 117
  • 1
  • 7
1
2 3 4 5 6 7