|
| 1 | +# LVM as an alternative backend to Mayastor (Experimental!) |
| 2 | + |
| 3 | +Mayastor, a cloud-native declarative data plane written in Rust, aims to abstract storage resources |
| 4 | +and their differences through the data plane. |
| 5 | + |
| 6 | +In this document, we’ll explore how to integrate Logical Volume Management (LVM) as an alternative |
| 7 | +backend for Mayastor pools. |
| 8 | +LVM, a mature and widely adopted storage management system in Linux environments, offers robustness |
| 9 | +and extensive features that can enhance Mayastor’s storage services. |
| 10 | + |
| 11 | +## Motivation |
| 12 | + |
| 13 | +LVM is a mature and widely adopted storage management system in Linux environments. |
| 14 | +While the SPDK Blobstore (LVS) has been a reliable option, integrating LVM as an alternative backend |
| 15 | +can captivate a broader audience due to its robustness and maturity, feature set, |
| 16 | +and community support make it an attractive choice for Mayastor users. |
| 17 | +By integrating LVM, we can also allow users to upgrade existing non-replicated LVM volumes |
| 18 | +(eg: lvm-localpv) seamlessly. |
| 19 | + |
| 20 | +## Goals |
| 21 | + |
| 22 | +Alternative Backend: Enable Mayastor to use LVM volume groups as an alternative backend for storage |
| 23 | +pools. |
| 24 | +Dynamic Volume Management: Leverage LVM’s volume management features (resizing, snapshots, |
| 25 | +thin provisioning) within Mayastor. |
| 26 | +Simplicity: Abstract LVM complexities from users while providing robust storage services. |
| 27 | + |
| 28 | +### Supporting Changes |
| 29 | +1. Pools |
| 30 | + |
| 31 | + Mayastor pools represent devices supplying persistent backing storage. |
| 32 | + Introduce a new pool type: LVM Pool. |
| 33 | + Users can create new Mayastor pools with the LVM backend type. |
| 34 | + |
| 35 | +2. LVM Integration |
| 36 | + |
| 37 | + Extend Mayastor to integrate with LVM. |
| 38 | + Implement LVM-specific logic for pool and replica creation, replica resizing, and snapshot management. |
| 39 | + Ensure seamless interaction between Mayastor and LVM. |
| 40 | + |
| 41 | +3. Replication (HA) |
| 42 | + |
| 43 | + Extend Mayastor’s replication mechanisms to work with LVM-backed logical units. |
| 44 | + In short, make LVM backed volumes highly available across nodes. |
| 45 | + |
| 46 | +4. Volume Management |
| 47 | + |
| 48 | + Mayastor will expose LVM volume management features through its pool API. |
| 49 | + Users can resize volumes online. |
| 50 | + Snapshots are managed transparently. |
| 51 | + |
| 52 | +Features |
| 53 | +--- |
| 54 | + |
| 55 | +- [x] Pool Operations |
| 56 | + - [x] Create |
| 57 | + - [x] Destroy |
| 58 | + - [x] Import |
| 59 | + - [x] List |
| 60 | +- [x] Replica Operations |
| 61 | + - [x] Create |
| 62 | + - [x] Destroy |
| 63 | + - [x] Share/Unshare |
| 64 | + - [x] Resize |
| 65 | + - [x] List |
| 66 | +- [ ] Thin Provisioning |
| 67 | +- [ ] Snapshots |
| 68 | +- [ ] Clones |
| 69 | +- [ ] RAIDx |
| 70 | + |
| 71 | +### Limitation |
| 72 | +- Thin provisioning and snapshot support is not yet integrated |
| 73 | +- RAID is not yet integrated |
| 74 | + |
| 75 | +## Conclusion |
| 76 | + |
| 77 | +By integrating LVM with Mayastor, you can leverage the benefits of both technologies. LVM provides dynamic volume management, |
| 78 | +while Mayastor abstracts storage complexities, allowing you to focus on your applications. |
| 79 | +Happy storage provisioning! 🚀 |
| 80 | + |
| 81 | + |
| 82 | +```mermaid |
| 83 | +graph TD; |
| 84 | + subgraph Volume Group - VG |
| 85 | + VG_1 --> LV_1["replica 1"] |
| 86 | + VG_1 --> LV_2["replica 2"] |
| 87 | + VG_2 --> LV_3["replica 3"] |
| 88 | + end |
| 89 | +
|
| 90 | + subgraph Mayastor Volume |
| 91 | + LV_1 --> VOL_1["1-replica volume"] |
| 92 | + LV_2 --> VOL_2["2-replica volume"] |
| 93 | + LV_3 --> VOL_2["2-replica volume"] |
| 94 | + end |
| 95 | +
|
| 96 | + subgraph Physical Volumes |
| 97 | + PV_1 --> VG_1["Volume Group - VG 1"] |
| 98 | + PV_2 --> VG_1 |
| 99 | + PV_3 --> VG_2["Volume Group - VG 2"] |
| 100 | + end |
| 101 | +
|
| 102 | + subgraph Node1 |
| 103 | + /dev/sda --> PV_1 |
| 104 | + /dev/sdb --> PV_2 |
| 105 | + end |
| 106 | + subgraph Node2 |
| 107 | + /dev/sdc --> PV_3 |
| 108 | + end |
| 109 | +``` |
0 commit comments