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.

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
2answers
444 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 ...
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?
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 ...
5
votes
1answer
223 views

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 ...
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 ...
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: ...
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 ...
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 ...
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 ...
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 (...
4
votes
0answers
2k views

docker run always fails with “no such file or directory”

Every time that I try to run a container with docker I get the following error: # docker run hello-world Error response from daemon: Cannot start container ...
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 ...
3
votes
0answers
381 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/...
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....
3
votes
0answers
150 views

Device mapper target to “change” sector size?

I'm wondering if there exists a device mapper target that I can use to make a device appear to have a different sector size. For example, let's say I set the "virtual" sector size to 448; then, every ...
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 ...
2
votes
0answers
513 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 ...
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 ...
2
votes
0answers
49 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 ...
2
votes
0answers
446 views

About dev mapping of partitions

New Linux user. Today had bright idea of making a backup of two partitions on an sd card to another sd card already in use. Did this: shrunk partition on backup sd, thus creating unallocated space, ...
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 ...
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 ...
1
vote
0answers
504 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: ...
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
0answers
195 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/...
1
vote
0answers
380 views

Mount success but property of device mapper that dmsetup create is lost

I tried to create device mapper with dmsetup as followed: dmsetup create error_disk 0 20000 linear /dev/loop0 0 20000 1 error 20001 20959 linear /dev/loop0 20001 Then I check with command below: dd ...
1
vote
0answers
44 views

opening old external encrypted partition: error

I have an encrypted hard disk with luks encryption. When I try to open it via: cryptsetup luksOpen /dev/sdc1 backup It prompts me for a password, but then errors out on me: device-mapper: reload ...
1
vote
0answers
1k views

dm snapshot - how does it work?

Fedora uses dm-snapshot for making the root filesystem read-write. At least for me, when running a livecd (even without touching it), it will become unusable relatively quickly meaning it has ...
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
0answers
191 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
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 ...