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
0 votes
0 answers
11 views

Linux Docker container on Windows host: Device Mapper "snapshot" target is missing

Take a look at this: C:\> docker run --rm -it --privileged ubuntu:focal root@4c806ae5de55:/# apt-get update ... root@4c806ae5de55:/# apt-get install dmsetup ... root@4c806ae5de55:/# dmsetup targets ...
user avatar
0 votes
0 answers
14 views

Failed to start File System check on /Dev/mapper/hostname--vg-home [duplicate]

whenever booting I am greeted with the message that the OS is in "Emergency Mode and that the root account is locked. I am instructed that I could use various commands '*'journalctl -xb' to view ...
user avatar
-3 votes
0 answers
31 views

Kali failed to start file system check on /dev/mapper/hostname--vg-home

Kali Linux 5.16.0 Lenovo ThinkPad G580 Intel i3 3110M @2.40GHz Mem: 8192MB whenever booting I am greeted with the message that the OS is in "Emergency Mode and that the root account is locked. I ...
user avatar
1 vote
1 answer
25 views

Parted on /dev/mapper/, What are the differences between Ignore and Cancel?

I am using parted to partition a /dev/mapper/luks_device. I know that I have to use kpartx to load the partition mappings afterwards (with reference to this thread). However while creating partition ...
user avatar
  • 255
0 votes
0 answers
29 views

How can I see the expected and found metadata block size when calling pdata_tools, e.g. thin_dump?

How can I see the expected and found metadata block size when calling pdata_tools, e.g. thin_dump? The background to the question is that I try to recover from a too small thin pool on a QNAP NAS. [~] ...
user avatar
1 vote
2 answers
78 views

How to check if a LUKS device is unlocked, without sudo permissions?

Is there any way to check if a LUKS device is unlocked, without having sudo permissions? I'm aware of two questions, but all the answers require sudo. It seems that I've found an indirect way (...
user avatar
  • 768
0 votes
0 answers
20 views

Is it possible to re-attach a drive to an open DM-crypt device?

Imagine a setup where ZFS is on top of LUKS which sits on a physical drive. While the FS is mounted, the drive drops out/is disconnected (user error, intermittent issue etc.). Now we have the ...
user avatar
  • 335
1 vote
1 answer
87 views

Properly Extend virtual volumes on a CentOS VM, new space in /dev/cl/ not occupied by /dev/mapper

I have a CentOS VM (on a windows host, managed with virtualbox) that ran out of disk space. I extended the virtual disk size, then used gparted to assign the new space to the existing partition Then I ...
user avatar
2 votes
0 answers
71 views

what is linux kernel module dm_bio_prison?

A kernel module name dm_bio_prison and descripted with "device-mapper bio prison" is loaded on a linux system. It is used by the modules dm_cache and dm_thin_pool. #lsmod | grep ...
user avatar
-1 votes
2 answers
64 views

The merits and demerits about the different FS mounting methods between non-DM and DM

Are there any other (de)merits about the following FS mounting methods? For example: the DM method, just means /dev/mapper/<VG>-<LV>, can handle its own multipath I/O. the non-DM methods, ...
user avatar
  • 103
0 votes
1 answer
166 views

Why does `mount /dev/dm-8` mount `/dev/dm-39` instead?

On a debian 10 GNU with Linux kernel system the following line does not - as expected - mount /dev/dm-8 but (imho incorreclty) /dev/dm-37: mount /dev/dm-8 /mnt I am puzzled really now the reason and/...
user avatar
  • 517
1 vote
0 answers
143 views

How to setup mdadm raid1 auto-assembly, where external bitmap is itself on another mdadm raid1?

How can the assembling of a raid (as via information stored in mdadm.conf) succeed, given that its assembling requires a bitmap file, which itself is only available after another device has become ...
user avatar
  • 517
2 votes
0 answers
274 views

Can linux device-mapper be used to throttle disk IO?

The device-mapper framework of the linux kernel offers many useful modes of operation or targets. Some prominent are: dm-crypt allowing to include encryption of block devices dm-raid for multi device ...
user avatar
2 votes
0 answers
30 views

Suspend devmapper target when underlying device removed

If you create a table with dmsetup and the underlying device gets forced removed, the target will begin to throw I/O errors. Is there any way to specify that the target should suspend itself if any of ...
user avatar
1 vote
0 answers
73 views

Where can I see the difference in those mounts?

# mount | grep 'rootvg-var\b' /dev/mapper/rootvg-var on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/mapper/rootvg-var on /var/lib/docker/containers type xfs (rw,relatime,seclabel,...
user avatar
2 votes
1 answer
1k views

Cryptsetup with dm-integrity - weird benchmark results

I'm benchmarking various cryptsetup volumes and I'm getting unexpected results on Debian. I'm using numbers from this talk as a rough reference. One of the slides shows benchmark results for various ...
user avatar
  • 669
1 vote
0 answers
152 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 ...
user avatar
  • 111
4 votes
2 answers
1k 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 ...
user avatar
1 vote
0 answers
77 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 ...
user avatar
  • 111
0 votes
1 answer
256 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 ...
user avatar
0 votes
1 answer
329 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 ...
user avatar
3 votes
2 answers
2k 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 ...
user avatar
  • 1,842
0 votes
1 answer
67 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 ...
user avatar
1 vote
0 answers
157 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 ...
user avatar
  • 293
0 votes
2 answers
77 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 ...
user avatar
  • 26.3k
0 votes
1 answer
143 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 "...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
3 votes
0 answers
202 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 ...
user avatar
  • 31
0 votes
1 answer
4k 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 ...
user avatar
  • 61
4 votes
1 answer
696 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 ...
user avatar
  • 25k
0 votes
1 answer
908 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 $...
user avatar
  • 25k
2 votes
0 answers
729 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 about $2 ...
user avatar
  • 25k
1 vote
1 answer
152 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 ...
user avatar
2 votes
2 answers
1k 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 ...
user avatar
  • 23
1 vote
2 answers
2k 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 ...
user avatar
  • 43
0 votes
1 answer
551 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 ...
user avatar
0 votes
1 answer
170 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/...
user avatar
  • 97
5 votes
0 answers
899 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/...
user avatar
  • 97
4 votes
1 answer
1k 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 ...
user avatar
  • 97
0 votes
2 answers
70 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 ...
user avatar
  • 97
1 vote
0 answers
1k 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: ...
user avatar
  • 325
2 votes
0 answers
754 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 ...
user avatar
5 votes
0 answers
4k 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 ...
user avatar
3 votes
3 answers
5k 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, ...
user avatar
  • 25k
3 votes
0 answers
280 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....
user avatar
2 votes
0 answers
81 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 ...
user avatar
  • 1,075
2 votes
2 answers
952 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 ...
user avatar
  • 121
4 votes
2 answers
9k 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 ...
user avatar
  • 1,213
0 votes
0 answers
443 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 ...
user avatar
  • 25k
15 votes
1 answer
10k 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 "...
user avatar
  • 25k