-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(storage): config support for current size (#1617)
Add support to the storage config for resizing a partition using its current size as minimum or maximim limit, see [auto_storage.md](https://github.com/openSUSE/agama/blob/master/doc/auto_storage.md#specifying-the-size-of-a-device) document. For growing a partition as much as possible: ~~~json { "partitions": [ { "search": "/dev/vda1", "size": { "min": "current" } } ] } ~~~ For shrinking a partition as much as possible: ~~~json { "partitions": [ { "search": "/dev/vda1", "size": { "min": 0, "max": "current" } } ] } ~~~ For omittied size, the default size indicated by the product is used for a new partition. If the partition already exists (has a *search*), then the current device size is used as default (i.e., the device is not resized at all).
- Loading branch information
Showing
21 changed files
with
1,281 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"storage": { | ||
"drives": [ | ||
{ | ||
"partitions": [ | ||
{ | ||
"size": 2048 | ||
}, | ||
{ | ||
"size": "10 GiB" | ||
}, | ||
{ | ||
"size": ["1 GiB"] | ||
}, | ||
{ | ||
"size": [1024, "50 GiB"] | ||
}, | ||
{ | ||
"size": { | ||
"min": "1 GiB" | ||
} | ||
}, | ||
{ | ||
"size": { | ||
"min": 1024, | ||
"max": "50 GiB" | ||
} | ||
}, | ||
{ | ||
"search": {}, | ||
"size": ["current"] | ||
}, | ||
{ | ||
"search": {}, | ||
"size": [0, "current"] | ||
}, | ||
{ | ||
"search": {}, | ||
"size": ["current", "10 GiB"] | ||
}, | ||
{ | ||
"size": { | ||
"min": "current" | ||
} | ||
}, | ||
{ | ||
"size": { | ||
"min": 0, | ||
"max": "current" | ||
} | ||
}, | ||
{ | ||
"size": { | ||
"min": "current", | ||
"max": "10 GiB" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.