disk-handling: use 16G swap by default and limit VG names at 120
This commit is contained in:
parent
288313f70e
commit
05cb97c929
2 changed files with 3 additions and 2 deletions
|
@ -113,7 +113,7 @@ in rec {
|
||||||
|
|
||||||
# LVM
|
# LVM
|
||||||
sudo vgcreate ${ownLib.disk.volumeGroup diskId} ${ownLib.disk.lvmPv diskId encrypted}
|
sudo vgcreate ${ownLib.disk.volumeGroup diskId} ${ownLib.disk.lvmPv diskId encrypted}
|
||||||
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -L 2G -n swap
|
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -L 16G -n swap
|
||||||
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -l 100%FREE -n root
|
sudo lvcreate ${ownLib.disk.volumeGroup diskId} -l 100%FREE -n root
|
||||||
|
|
||||||
# Filesystem
|
# Filesystem
|
||||||
|
|
|
@ -32,8 +32,9 @@
|
||||||
shortenGptPartlabel = partlabel: (builtins.substring 0 36 partlabel);
|
shortenGptPartlabel = partlabel: (builtins.substring 0 36 partlabel);
|
||||||
|
|
||||||
# LVM doesn't allow most characters in VG names
|
# LVM doesn't allow most characters in VG names
|
||||||
|
# Maximum length for VGs and LVs is 128, therefore the VG name must adhere to VG <= 128-LV.
|
||||||
# TODO: replace this with a whitelist for: [a-zA-Z0-9.-_+]
|
# TODO: replace this with a whitelist for: [a-zA-Z0-9.-_+]
|
||||||
volumeGroup = diskId: builtins.replaceStrings [ ":" ] [ "" ] diskId;
|
volumeGroup = diskId: (builtins.substring 0 120 (builtins.replaceStrings [ ":" ] [ "" ] diskId));
|
||||||
|
|
||||||
# This is important at install-time
|
# This is important at install-time
|
||||||
bootGrubDevice = diskId: "/dev/disk/by-id/" + diskId;
|
bootGrubDevice = diskId: "/dev/disk/by-id/" + diskId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue