Bläddra i källkod

add startsector for partitions

pull/128/head
Piotr Kruk 7 år sedan
förälder
incheckning
d51911ba5c
2 ändrade filer med 5 tillägg och 1 borttagningar
  1. +2
    -1
      README.rst
  2. +3
    -0
      linux/storage/disk.sls

+ 2
- 1
README.rst Visa fil

@@ -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 Visa fil

@@ -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', []) %}


Laddar…
Avbryt
Spara