Merge ~mwhudson/curtin:document-ptable-raid into curtin:master

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Ryan Harper
Approved revision: 08a530fa3582455826eae22a8f305dc7d1871b3f
Merge reported by: Ryan Harper
Merged at revision: 37a257fb7b6185940af90662cd3988f0ed0cb99c
Proposed branch: ~mwhudson/curtin:document-ptable-raid
Merge into: curtin:master
Diff against target: 114 lines (+79/-3)
1 file modified
doc/topics/storage.rst (+79/-3)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper (community) Approve
Review via email: mp+348364@code.launchpad.net

Commit message

document that you can set ptable on raids

Description of the change

As discovered the hard way :)

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) :
Revision history for this message
Ryan Harper (raharper) wrote :

Yes, that looks good.

Let's add a short example with a partition:

** RAID Partition Example **::

# create RAID5 array /dev/md0 and first partition /dev/md0p1
- id: md0
   type: raid
   name: md0
   raidlevel: 5
   ptable: gpt
   devices:
     - sda1
     - sdb1
     - sdc1
   spare_devices:
     - sdd1
- id: md0p1
  type: partition
  device: md0
  size: 10G

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
90a04da... by Michael Hudson-Doyle

we do not expect to handle any other partition types ...

08a530f... by Michael Hudson-Doyle

add partitioned raid example

Revision history for this message
Ryan Harper (raharper) wrote :

Thanks!

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=37a257fb

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/doc/topics/storage.rst b/doc/topics/storage.rst
2index ca6253c..b28964b 100644
3--- a/doc/topics/storage.rst
4+++ b/doc/topics/storage.rst
5@@ -60,9 +60,9 @@ table. A disk command may contain all or some of the following keys:
6
7 **ptable**: *msdos, gpt*
8
9-If the ``ptable`` key is present and a valid type of partition table, curtin
10-will create an empty partition table of that type on the disk. At the moment,
11-msdos and gpt partition tables are supported.
12+If the ``ptable`` key is present and a curtin will create an empty
13+partition table of that type on the disk. Curtin supports msdos and
14+gpt partition tables.
15
16 **serial**: *<serial number>*
17
18@@ -613,6 +613,11 @@ The ``spare_devices`` key specifies a list of the devices that will be used for
19 spares in the raid array. Each device must be referenced by ``id`` and the
20 device must be previously defined in the storage configuration. May be empty.
21
22+**ptable**: *msdos, gpt*
23+
24+To partition the array rather than mounting it directly, the
25+``ptable`` key must be present and a valid type of partition table,
26+i.e. msdos or gpt.
27
28 **Config Example**::
29
30@@ -801,6 +806,7 @@ Learn by examples.
31 - LVM
32 - Bcache
33 - RAID Boot
34+- Partitioned RAID
35 - RAID5 + Bcache
36 - ZFS Root Simple
37 - ZFS Root
38@@ -1045,6 +1051,76 @@ RAID Boot
39 path: /
40 device: md_root
41
42+Partitioned RAID
43+~~~~~~~~~~~~~~~~
44+
45+::
46+
47+ storage:
48+ config:
49+ - type: disk
50+ id: disk-0
51+ ptable: gpt
52+ path: /dev/vda
53+ wipe: superblock
54+ grub_device: true
55+ - type: disk
56+ id: disk-1
57+ path: /dev/vdb
58+ wipe: superblock
59+ - type: disk
60+ id: disk-2
61+ path: /dev/vdc
62+ wipe: superblock
63+ - type: partition
64+ id: part-0
65+ device: disk-0
66+ size: 1048576
67+ flag: bios_grub
68+ - type: partition
69+ id: part-1
70+ device: disk-0
71+ size: 21471690752
72+ - id: raid-0
73+ type: raid
74+ name: md0
75+ raidlevel: 1
76+ devices: [disk-2, disk-1]
77+ ptable: gpt
78+ - type: partition
79+ id: part-2
80+ device: raid-0
81+ size: 10737418240
82+ - type: partition
83+ id: part-3
84+ device: raid-0
85+ size: 10735321088,
86+ - type: format
87+ id: fs-0
88+ fstype: ext4
89+ volume: part-1
90+ - type: format
91+ id: fs-1
92+ fstype: xfs
93+ volume: part-2
94+ - type: format
95+ id: fs-2
96+ fstype: ext4
97+ volume: part-3
98+ - type: mount
99+ id: mount-0
100+ device: fs-0
101+ path: /
102+ - type: mount
103+ id: mount-1
104+ device: fs-1
105+ path: /srv
106+ - type: mount
107+ id: mount-2
108+ device: fs-2
109+ path: /home
110+ version: 1
111+
112
113 RAID5 + Bcache
114 ~~~~~~~~~~~~~~

Subscribers

People subscribed via source and target branches