Browse Source

add startsector for partitions

atp-proxy
Piotr Kruk 7 years ago
parent
commit
d51911ba5c
2 changed files with 5 additions and 1 deletions
  1. +2
    -1
      README.rst
  2. +3
    -0
      linux/storage/disk.sls

+ 2
- 1
README.rst View File

mount: ${linux:storage:mount:data} mount: ${linux:storage:mount:data}


Create partitions on disk. Specify size in MB. It expects empty 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 .. code-block:: yaml


storage: storage:
disk: disk:
first_drive: first_drive:
startsector: 1
name: /dev/loop1 name: /dev/loop1
type: gpt type: gpt
partitions: partitions:

+ 3
- 0
linux/storage/disk.sls View File

- pkg: parted - pkg: parted


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


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



Loading…
Cancel
Save