mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 next 0/5] dm: lvm: Initial Logical Volume Management support
@ 2026-09-25 10:54 Tobias Waldekranz
  2026-09-25 10:54 ` [PATCH v2 next 1/5] " Tobias Waldekranz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tobias Waldekranz @ 2026-09-25 10:54 UTC (permalink / raw)
  To: barebox

This series adds basic support for accessing LVM logical volumes.

Example session:

    wkz@spa:~/src/github.com/barebox/barebox$ ./barebox -i disk0=infix-x86_64.disk,blkdev
    [...]
    barebox@Sandbox:/ lvm info
    VG "internal":
      UUID:    sN8htx-oD18-wHWH-SuCU-1EWy-th1l-5WPU6j
      SeqNum:  1
      Size:    132 MiB (1 MiB extents)
      #PV:     1
      #LV:     1
      PV disk0.2:
        UUID:  6VHjVF-WVt7-Gk4Y-oTrK-lsgY-ve7N-GJ0CUn
        Size:  134 MiB
      LV "infix-x86_64.raw":
        UUID:  Xp76Ig-9XXj-aBfK-Xv2U-rbsY-nEWX-omt4Bo
        Type:  linear
        Size:  132 MiB
    barebox@Sandbox:/ lvm activate internal infix-x86_64.raw
    [GPT warnings...]
    Created internal-infix-x86_64.raw
    barebox@Sandbox:/ ls /mnt/internal-infix-x86_64.raw.0/
    mounted /dev/internal-infix-x86_64.raw.0 on /mnt/internal-infix-x86_64.raw.0
    bin       boot      cfg       config    dev       etc       home
    lib       lib64     loader    log       media     mnt       opt
    proc      root      run       sbin      srv       sys       tmp
    usr       var
    barebox@Sandbox:/

A while back, I sent an RFC of this series [1]. Based on the lack of
critique of the overall structure, I went ahead and added the missing
tests and fixed up the issues it uncovered.

[1]: https://lore.kernel.org/barebox/20260824183203.3759144-1-tobias@waldekranz.com/

v1 -> v2:
  - Labgrid test fixups requested by Sascha

Tobias Waldekranz (5):
  dm: lvm: Initial Logical Volume Management support
  dm: lvm: Add fuzz testers for metadata parser and binary headers
  test: self: lvm: Add tests for metadata parser and binary headers
  commands: lvm: inspect VGs, activate LVs
  test: py: lvm: Add basic LV activation test

 commands/Kconfig                              |  11 +
 commands/Makefile                             |   1 +
 commands/lvm.c                                | 264 ++++++
 .../boards/configs/enable_dm_testing.config   |   2 +
 drivers/block/dm/Kconfig                      |  10 +
 drivers/block/dm/Makefile                     |   1 +
 drivers/block/dm/lvm/Makefile                 |   3 +
 drivers/block/dm/lvm/lvm-core.c               | 714 +++++++++++++++
 drivers/block/dm/lvm/lvm-fuzz.c               | 182 ++++
 drivers/block/dm/lvm/lvm-md.c                 | 423 +++++++++
 drivers/block/dm/lvm/lvm-md.h                 | 109 +++
 drivers/block/dm/lvm/lvm2.h                   |  79 ++
 images/Makefile.sandbox                       |   2 +
 include/lvm.h                                 | 100 +++
 scripts/lvm-pvs.guestfish                     |  55 ++
 test/py/test_lvm.py                           |  75 ++
 test/self/Kconfig                             |  14 +
 test/self/Makefile                            |   2 +
 test/self/lvm.c                               | 818 ++++++++++++++++++
 test/testdata/fuzz/lvm-md.dict                |  29 +
 test/testdata/fuzz/lvm.dict                   |  30 +
 test/testdata/lvm-pvs.disk.xz                 | Bin 0 -> 2968 bytes
 22 files changed, 2924 insertions(+)
 create mode 100644 commands/lvm.c
 create mode 100644 drivers/block/dm/lvm/Makefile
 create mode 100644 drivers/block/dm/lvm/lvm-core.c
 create mode 100644 drivers/block/dm/lvm/lvm-fuzz.c
 create mode 100644 drivers/block/dm/lvm/lvm-md.c
 create mode 100644 drivers/block/dm/lvm/lvm-md.h
 create mode 100644 drivers/block/dm/lvm/lvm2.h
 create mode 100644 include/lvm.h
 create mode 100755 scripts/lvm-pvs.guestfish
 create mode 100644 test/py/test_lvm.py
 create mode 100644 test/self/lvm.c
 create mode 100644 test/testdata/fuzz/lvm-md.dict
 create mode 100644 test/testdata/fuzz/lvm.dict
 create mode 100644 test/testdata/lvm-pvs.disk.xz

-- 
2.43.0




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-25 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 10:54 [PATCH v2 next 0/5] dm: lvm: Initial Logical Volume Management support Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 1/5] " Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 2/5] dm: lvm: Add fuzz testers for metadata parser and binary headers Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 3/5] test: self: lvm: Add tests " Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 4/5] commands: lvm: inspect VGs, activate LVs Tobias Waldekranz
2026-09-25 10:54 ` [PATCH v2 next 5/5] test: py: lvm: Add basic LV activation test Tobias Waldekranz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox