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.

Filter by
Sorted by
Tagged with
1
vote
0answers
6 views

What is mounted on what with xfs; storage drivers for docker

I have a virtual redhat linux machine, that I am using for Docker. Apparently, I haven't set it properly up for production mode as I am still running the storage mode as a loop-back device with ...
4
votes
2answers
70 views

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

How can I concatenate thousands of files into a single device

I'am using split to cut a an iso into multiples chunks. Then a can use cat to rebuild initial iso that I can convert into a mountable device with losetup and then mount. The problem is when initial ...
0
votes
1answer
27 views

Can’t mount mapper device at boot on Debian

My /etc/fstab file is the following: proc /proc proc defaults 0 0 /dev/root / ext4 rw,errors=remount-ro 0 1 tmpfs /dev/shm tmpfs mode=0777 ...
0
votes
0answers
13 views

Is it possible to ask the kernel to delete unused partition mappings automatically?

Does kpartx have a command-line switch to enable delayed deletion?
0
votes
1answer
84 views

Veritysetup Verification fails at hash-offset

I'm trying to get dm-verity to verify a sd-card partition. I did veritysetup format --hash-offset=24215552 /dev/sdb4 /dev/sdb4 To create a hash device on the same device at the given offset. Now I ...
1
vote
1answer
655 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 ...
0
votes
1answer
45 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 ...
1
vote
0answers
92 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
58 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 ...
0
votes
1answer
110 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
1k 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 ...
3
votes
0answers
148 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
2k 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
1answer
466 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 ...
0
votes
1answer
545 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 $...
2
votes
0answers
592 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 ...
1
vote
1answer
101 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 ...
2
votes
2answers
602 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 ...
1
vote
2answers
783 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
1answer
422 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
148 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/...
3
votes
0answers
536 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/...
2
votes
1answer
627 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
58 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
845 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: ...
2
votes
0answers
592 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 ...
5
votes
0answers
3k 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
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, ...
3
votes
0answers
252 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....
2
votes
0answers
68 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
2answers
658 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 ...
4
votes
2answers
7k 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
0answers
370 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 ...
7
votes
1answer
4k 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 "...
2
votes
0answers
63 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
1answer
60 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 ...
1
vote
1answer
428 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 ...
3
votes
1answer
203 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 ...
2
votes
2answers
4k 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?
2
votes
1answer
1k 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 ...
1
vote
0answers
353 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
1answer
4k 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
41 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
286 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
2answers
786 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?
1
vote
1answer
2k 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 ...
1
vote
1answer
620 views

How to handle (with LVM or DM (device mapper)) when a drive has gone away and come back as a new block device

(This correct answer is to one that bears little surface resemblance to this one. Asking the question and answering it myself with reference to that one.) Consider a virtual host environment in which ...
4
votes
0answers
402 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 ...