Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
3k views

device-mapper: reload ioctl on cache1 failed: Device or resource busy

When I run the below command while setting up dm-cache on my CentOS system, I receive the error: device-mapper: reload ioctl on cache1 failed: Device or resource busy Command failed Command is: ...
1
vote
0answers
24 views

dd command is initiating bios with read direction in device-mapper target

I setup a block level device-mapper target, and when I am writing to it using the following dd command: dd if=/dev/zero of=/dev/mapper/mytarget bs=4096 count=5 I have observed that there are a lot ...
6
votes
1answer
5k views

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 ...
1
vote
1answer
154 views

What is /dev/mapper/cachedev1?

I just got my first QNAP NAS, used to work mostly with Synology before, and I'm currently trying to figure out how the system uses LVM. Mostly out of curiosity. In my specific case, it's a 2 bay NAS ...
1
vote
0answers
194 views

device-mapper error while setup of dm-cache

I am trying to setup dmcache using the tutorial https://wiki.mikejung.biz/Dmcache When I run the command `dmsetup create home-cached --table '0 976771120 cache /dev/mapper/ssd-metadata /dev/mapper/...
3
votes
3answers
3k views

Device mapper table alignment inconsistency

In the journal, I'm getting lines such as: Jan 27 18:23:08 tara kernel: device-mapper: table: 254:2: adding target device sdb2 caused an alignment inconsistency: physical_block_size=4096, ...
1
vote
1answer
462 views

After increasing chunksize in an LVM cache, files are no longer promoted to the cache

After running into issues with running out of kernel memory, I increased the chunksize of my lvmcache from the default (which I believe was 64k) to a much higher 8M. After this change, blocks do not ...
0
votes
0answers
189 views

I/O queue on LVM device v.s. I/O queue on underlying device(s)

dm-1 / alan_dell_2016-swap is an LVM Logical Volume, which is physically stored on partition sda7 of the device sda. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda ...
0
votes
0answers
36 views

Mapping part of a block device: dmsetup vs losetup

Suppose I want to create a virtual block device from an area on already existing block device. I can use either dmsetup (device mapper) or losetup for this purpose. What are practical differences ...
0
votes
1answer
27 views

How the IOs are throttled from IO scheduler to scsi low level drivers

IO scheduler has a queue depth of 128 by default. And block device has a queue depth of 32 by default. Where does the IOs are buffered. Does IO scheduler send all IOs to scsi low level drivers and ...
6
votes
2answers
2k views

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-...
4
votes
3answers
21k views

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 ...
1
vote
0answers
60 views

How can I xor two block devices together?

I'm looking for a way to create a virtual block device that when accessed returns the XOR of two block devices. I feel like dmsetup would be used here somewhere but I can't find anything related to ...
0
votes
2answers
33 views

Skipping the middle mapping with cryptsetup luksOpen

I'm mounting a bunch of encrypted disks like so cryptsetup luksOpen some_source some_mapping && mount /dev/mapper/some_mapping /some_mountpoint How can I abstract away the middle mapping? I ...
1
vote
1answer
296 views

Does lvm-thin use dm-thin underneath or they are completely separate utilities?

LVM snapshots seem to have extremely poor performance It seems that dm-thin snapshots use a new implementation: Another significant feature is support for an arbitrary depth of recursive ...
2
votes
2answers
2k views

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?
0
votes
1answer
74 views

Have an SSD and HDD as the same filesystem and overflow from one to the other?

Is it possible in Linux (specifically OpenSUSE) to have an SSD and a HDD set up in such a way that they appear as a single filesystem, yet data is always written to the SSD until full, and then "...
2
votes
1answer
705 views

veritysetup verify successful but mount fails after upgrade to new kernel

We are using dm-verity for a squashfs root file system. Using kernel 4.8.4 everything was ok, after upgrading to kernel 4.14.14 mount fails, even though the veritysetup verify command validates the ...
2
votes
2answers
368 views

LVM volume on USB drive fails: Read-only file system

This is on a Raspberry Pi running Raspbian 8 (Linux kernel 4.9.) I have a 64 GB USB pen drive plugged (as /dev/sda) and configured as an LVM physical volume. There's only one volume group ("data") and ...
5
votes
1answer
2k views

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 "...
3
votes
0answers
97 views

Is there a way for a device mapper target to limit the rate at which i/o is sent to it?

I am writing a device mapper target and am having a issue. While running an i/o test, the number of i/o inflight to my target gets very high, presumably from the filesystem paging out the cache. At ...
0
votes
1answer
1k views

How to take space from one VG and add it to another?

I've seen that /dev/mapper/VGP4--CHK-LVP4--CHK is running out of space. I would like to increase this. Filesystem Size Used Avail Use% Mounted on udev ...
4
votes
2answers
5k views

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 ...
0
votes
1answer
341 views

Can't create persistent snapshot device with `dmsetup`

I am trying to create a dmsetup snapshot device be able to rollback changes made by fsck. I think I'm calling dmsetup incorrectly. Here's an example: $ truncate -s 4096 real snapshot $...
4
votes
1answer
333 views

dmsetup: Where is persistent metadata stored?

The dmsetup snapshot documentation says: <persistent?> is P (Persistent) or N (Not persistent - will not survive after reboot). O (Overflow) can be added as a persistent store option to allow ...
2
votes
0answers
472 views

Create a block device made of files

TL;DR: Given 2TB worth of 4MB files, how would I create a block device with those files as backing storage? Background I want to trial use of Sia for storage, since: Storing 1TB on Sia costs ...
13
votes
1answer
2k views

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 ...
1
vote
1answer
82 views

Is Block device aware of the actual user/process which initiates read/write?

The VFS knows which user/process has sent read/write request. Is the actual block device aware of these details. Does 'bio' struct contain any details which point to the user space parameters? Using ...
3
votes
0answers
380 views

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/...
0
votes
1answer
270 views

Devicemapper maintenance- dmsetup is missing

I manage docker environment on RHEL 7.1 host. Currently I use docker engine v1.9 and what I'd like to do is to upgrade this docker engine to v1.13. My docker engine uses devicemappers as storage, and ...
0
votes
1answer
114 views

Why does libdevmapper have data structures?

As I'm looking through libdevmapper.h for clues on how to properly use device mapper ioctls (or potentially use libdevmapper instead), I'm confused as to why there is code in here for creating/...
2
votes
1answer
411 views

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 ...
0
votes
2answers
51 views

Can dm-crypt be configured to ask for key on every read/write?

My understanding is that dm-crypt serves to abstract the actual block device so that the read/decrypt and write/encrypt happen automatically. However, assuming a device mapping with target: crypt is ...
1
vote
0answers
503 views

kpartx doesn't create block device

I am trying to create some block devices with losetup and kpartx as follow: #losetup --show -f disk.img /dev/loop0 #kpartx -avs /dev/loop0 # so nothing happend, and kpartx -l gives nothing as well: ...
0
votes
3answers
116 views

Can we predict the next registered SCSI mass storage device name

I need to anticipate the device name (sdX) that the next mass storage device (sda, sdb, sdc, …) will receive from the SCSI driver. If I remove one device and connect another one, I noticed that the ...
2
votes
0answers
511 views

create a device-mapper snapshot of an lvm volume multiple linear device with cow data outside of volume group

I need to make an in-memory snapshot of a running mounted root filesystem. The filesystem itself is on an lvm device, but there is zero free space in the VG and there is no way to expand it. However ...
4
votes
0answers
2k views

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 ...
3
votes
0answers
220 views

Clone dmsetup configuration of a disk - not the data?

Is there a way to clone the dmsetup configuration of a disk onto another disk and recreate the filesystems and mount points ? I do not need to copy the data of the file systems, only the configuration....
1
vote
2answers
629 views

Why does dm-verity use a salt?

In dm-verity, there is a root hash that is used to verify a data storage device. It is created when you run veritysetup. But in addition to the root hash, a salt is also given. Why?
2
votes
2answers
443 views

Why there are many mapper volumes created in my Suse Linux installation

Recently I installed Suse Linux and Sled. After the installation, I found out that more memory is allocated for mappers; I don't know what is the use of these things. Will they be used once the main ...
2
votes
0answers
65 views

recover last state of full lvm snapshot

I recently ran into the case that an LVM snapshot overflowed. The reasons are unclear: * there was probably no write access to the origin at all * both snapshot and origin have same size (100g, 25600 ...
0
votes
0answers
314 views

Create friendly-named “device-partition” devices - /dev/mapper?

I have a few USB disks and partitions which I would like to refer to in an intuitive way. I know it is possible to use udev to create a persistent named device eg /dev/seagate2tb. Is it possible ...
2
votes
0answers
48 views

software-level error detection and correction for raw storage

If I understand data storage correctly, all storage devices are unreliable to some extent, which is why most have hardware-level abstraction layers. Hard drives use error correction. If a sector is ...
1
vote
1answer
849 views

How to configure device mapper name of encrypted root partition with Grub2?

I would like to have my encrypted root partition mapped to the device mapper name system, i.e. it should eventually appear under /dev/mapper/system. My operating system is Fedora 24 Workstation Linux ...
2
votes
1answer
51 views

“Delete on write” with devicemapper and Docker

The current default behavior of Docker is COW (copy on write), aka allocate on write. This relies on free space in a drive in order to write to disk. In contrast - with memory, unreferenced files are ...
3
votes
1answer
127 views

Can I tell whether a block device is in use?

Let's assume this is based on device-mapper. How can I tell if a given block device is already in use? (For example, a PV of a currently in use VG, or a encrypted LUKS device that is currently ...
1
vote
0answers
332 views

What prevents a dm-verity mapping from being reset?

On Chrome OS and Android, dm-verity is used to verify the system partition. In Chrome OS, since there is no initial RAM disk, the mapping and the root digest are provided on the kernel command line ...
1
vote
0answers
35 views

Which is the correct dm-cache version

I am trying to install dm-cache on my CentOS machine. Which dm-cache version should I use. I read on wikipedia as below: Another dm-cache project with similar goals was announced by Eric Van ...
1
vote
1answer
1k views

Using Device mapper thin provisioning on loop devices

I have several KVM raw files that are read only (about 100gb). I am adding these raw files as loopback devices. I then create a snap file to allow the VM to have read/write access to its disk. This ...
4
votes
0answers
329 views

How to cache block devices (for device mapper)?

problem / observed effect It seems that the page cache ignores block devices which are not opened. And worse: Reads from device mapper (DM) devices which use a cached device are not cached at all (...