feat: Set up filesystems
Automatically set up btrfs root and data filesystem, as well as external HDD. This automation change assumes a layout exactly as in current bob to function by default, can be changed to any btrfs layout with the `btrfs_mounts` configuration option, however.
This commit is contained in:
parent
a217d65640
commit
bb9de502ce
6 changed files with 112 additions and 0 deletions
38
roles/filesystem/README.md
Normal file
38
roles/filesystem/README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
filesystem
|
||||
=========
|
||||
|
||||
Mounts the filesystem(s) required for bob.
|
||||
Focused on correct `btrfs` layout and mounting,
|
||||
but also mounts an external `ext4` HDD by default.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
This role requires a btrfs filesystem _existing_ on _any device_ that is targeted with the role (using the 'btrfs_mounts') configuration option.
|
||||
Optionally, an external HDD is required if the mount toggle is true.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
`btrfs_mounts` can be used to set up the various (top-level) btrfs subvolumes, and their later mount points in the system.
|
||||
Define an entry by giving the `uuid` of the targeted btrfs filesystem (or device), give the name of the `subvol` you intend to give, and define the `path` where it should ultimately be mounted by `fstab`.
|
||||
You can additionally provide some `opts` which are given to `fstab` for the mount process as well.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
btrfs_mounts:
|
||||
- path: "/home"
|
||||
subvol: "@home"
|
||||
uuid: "3204f33f-5fa7-4c11-bdd8-979c539fce91"
|
||||
opts: "defaults,ssd,noatime,compress=zstd:3,space_cache=v2"
|
||||
|
||||
- path: "/srv/media"
|
||||
subvol: "@media"
|
||||
uuid: "2256bd23-7751-486a-bfc4-b216a6b0c4f4"
|
||||
opts: "defaults,noatime,compress=zstd:3,space_cache=v2"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`should_mount_external_hdd` can be toggled to automatically mount a USB-connected HDD on boot, or not.
|
||||
Loading…
Add table
Add a link
Reference in a new issue