summaryrefslogtreecommitdiff
path: root/Device mapper.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:01:49 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-18 21:01:49 +0200
commita8a8e1f984f20c8008f3a5f57cd39b416eb73104 (patch)
tree2262794b52d82c5fd9cbc55b503b52fafbd3af8a /Device mapper.md
parent5fa69499917fab7a026c90c8321dbcc22734106a (diff)
parentab409a3701bf59dd73dc1e0324376bdac8b6d74f (diff)
vault backup: 2025-04-18 21:01:49
Diffstat (limited to 'Device mapper.md')
-rw-r--r--Device mapper.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/Device mapper.md b/Device mapper.md
new file mode 100644
index 0000000..150338b
--- /dev/null
+++ b/Device mapper.md
@@ -0,0 +1,30 @@
+---
+tags:
+ - linux
+ - devices
+ - kernel
+---
+Device mapper is a kernel driver to map physical block devices to virtual ones; this means that for example we can have many physical devices be represented by a single virtual one (linear mapping).
+
+How does it work?
+What is its function in relation to multipath?
+
+Logical devices using device-mapper can be managed using `man 8 dmsetup`
+```
+[jasras@n04.compute.vps2-lej1 ~]$ sudo dmsetup info 3600a098038314d736724566a67346538
+Name: 3600a098038314d736724566a67346538
+State: ACTIVE
+Read Ahead: 256
+Tables present: LIVE
+Open count: 1
+Event number: 3
+Major, minor: 253, 12
+Number of targets: 1
+UUID: mpath-3600a098038314d736724566a67346538
+```
+
+If dmsetup cannot remove a device because a process still has it open, but lsof does not show any processes that open it, use `-f` which replaces the device with a fake that rejects all I/O.
+
+---
+[device-mapper](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/device_mapper#device_mapper)
+[dmsetup](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/dmsetup#dmsetup) \ No newline at end of file