Quellcode durchsuchen

add startsector for partitions

pull/128/head
Piotr Kruk vor 7 Jahren
Ursprung
Commit
d51911ba5c
2 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. +2
    -1
      README.rst
  2. +3
    -0
      linux/storage/disk.sls

+ 2
- 1
README.rst Datei anzeigen

@@ -1437,7 +1437,7 @@ LVM group `vg1` with one device and `data` volume mounted into `/mnt/data`
mount: ${linux:storage:mount:data}

Create partitions on disk. Specify size in MB. It expects empty
disk without any existing partitions.
disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048)

.. code-block:: yaml

@@ -1445,6 +1445,7 @@ disk without any existing partitions.
storage:
disk:
first_drive:
startsector: 1
name: /dev/loop1
type: gpt
partitions:

+ 3
- 0
linux/storage/disk.sls Datei anzeigen

@@ -20,6 +20,9 @@ create_disk_label_{{ disk_name }}:
- pkg: parted

{% set end_size = 0 -%}
{% if disk.get('startsector', None) %}
{% set end_size = disk.get('startsector')|int %}
{% endif %}

{%- for partition in disk.get('partitions', []) %}


Laden…
Abbrechen
Speichern