forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devices: create
/dev/mapper/<logical-volume>
as well
When we create the device node inside the buildroot so far it's very minimal - just `/dev/{vg}-{lv}` with the appopriate major/minor. However when mount runs it will create a mapper device with the same major/minor under `/dev/mapper/{escaped(vg)}-{escaped(lv)}` and use that to mount the actual filesystem. Without this additional device findmnt will not be able to detect the udev attributes of the source (as the source is just missing from /dev). This commit create the right mapper in the same way that we create the non-mapper device node.
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/python3 | ||
|
||
DEVICES_NAME = "org.osbuild.lvm2.lv" | ||
|
||
|
||
def test_lvm2_escaped_lv_mapper_name(devices_module): | ||
expected = "1d2b2150--8de2--4b68--b387--f9bc709190e8-lvroot" | ||
assert devices_module.escaped_lv_mapper_name("1d2b2150-8de2-4b68-b387-f9bc709190e8", "lvroot") == expected |