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
diff --git a/doc/topics/storage.rst b/doc/topics/storage.rst
index ca6253c..b28964b 100644
--- a/doc/topics/storage.rst
+++ b/doc/topics/storage.rst
@@ -60,9 +60,9 @@ table. A disk command may contain all or some of the following keys:
6060
61**ptable**: *msdos, gpt*61**ptable**: *msdos, gpt*
6262
63If the ``ptable`` key is present and a valid type of partition table, curtin63If the ``ptable`` key is present and a curtin will create an empty
64will create an empty partition table of that type on the disk. At the moment,64partition table of that type on the disk. Curtin supports msdos and
65msdos and gpt partition tables are supported.65gpt partition tables.
6666
67**serial**: *<serial number>*67**serial**: *<serial number>*
6868
@@ -613,6 +613,11 @@ The ``spare_devices`` key specifies a list of the devices that will be used for
613spares in the raid array. Each device must be referenced by ``id`` and the613spares in the raid array. Each device must be referenced by ``id`` and the
614device must be previously defined in the storage configuration. May be empty.614device must be previously defined in the storage configuration. May be empty.
615615
616**ptable**: *msdos, gpt*
617
618To partition the array rather than mounting it directly, the
619``ptable`` key must be present and a valid type of partition table,
620i.e. msdos or gpt.
616621
617**Config Example**::622**Config Example**::
618623
@@ -801,6 +806,7 @@ Learn by examples.
801- LVM806- LVM
802- Bcache807- Bcache
803- RAID Boot808- RAID Boot
809- Partitioned RAID
804- RAID5 + Bcache810- RAID5 + Bcache
805- ZFS Root Simple811- ZFS Root Simple
806- ZFS Root812- ZFS Root
@@ -1045,6 +1051,76 @@ RAID Boot
1045 path: /1051 path: /
1046 device: md_root1052 device: md_root
10471053
1054Partitioned RAID
1055~~~~~~~~~~~~~~~~
1056
1057::
1058
1059 storage:
1060 config:
1061 - type: disk
1062 id: disk-0
1063 ptable: gpt
1064 path: /dev/vda
1065 wipe: superblock
1066 grub_device: true
1067 - type: disk
1068 id: disk-1
1069 path: /dev/vdb
1070 wipe: superblock
1071 - type: disk
1072 id: disk-2
1073 path: /dev/vdc
1074 wipe: superblock
1075 - type: partition
1076 id: part-0
1077 device: disk-0
1078 size: 1048576
1079 flag: bios_grub
1080 - type: partition
1081 id: part-1
1082 device: disk-0
1083 size: 21471690752
1084 - id: raid-0
1085 type: raid
1086 name: md0
1087 raidlevel: 1
1088 devices: [disk-2, disk-1]
1089 ptable: gpt
1090 - type: partition
1091 id: part-2
1092 device: raid-0
1093 size: 10737418240
1094 - type: partition
1095 id: part-3
1096 device: raid-0
1097 size: 10735321088,
1098 - type: format
1099 id: fs-0
1100 fstype: ext4
1101 volume: part-1
1102 - type: format
1103 id: fs-1
1104 fstype: xfs
1105 volume: part-2
1106 - type: format
1107 id: fs-2
1108 fstype: ext4
1109 volume: part-3
1110 - type: mount
1111 id: mount-0
1112 device: fs-0
1113 path: /
1114 - type: mount
1115 id: mount-1
1116 device: fs-1
1117 path: /srv
1118 - type: mount
1119 id: mount-2
1120 device: fs-2
1121 path: /home
1122 version: 1
1123
10481124
1049RAID5 + Bcache1125RAID5 + Bcache
1050~~~~~~~~~~~~~~1126~~~~~~~~~~~~~~

Subscribers

People subscribed via source and target branches