Comments (6)
from disko.
What type of backing devices? I've not used multidevice btrfs before but I thought you only needed the one mkfs command without anything special before it
from disko.
Yes, to make a multidevice btrfs filesystem, you use a command like follows:
mkfs.btrfs -m raid1 -d raid1 /dev/device1 /dev/device2
Looking at the source of this module, I can make that happen by configuring device1 and adding "-m dup -d dup /dev/device2" as extra mkfs options.
However, before the mkfs.btrfs is run, the devices have to be ready. I use LVM on LUKs on all my disks and use a lv on each disk as the devices for the btrfs volume. Thus the btrfs filesystem depends on both disk's logical volumes. Adding that dependency is what I could not figure out
from disko.
If it helps, my current disk setup is here: https://github.com/accelbread/config-flake/tree/master/nixos/common/disks
from disko.
Yeah I was worried you were gonna say something like that
As disko is right now, it creates LVs in lexographical order, so as long as you put the type = "btrfs"
content in the last lv alphabetically, they should all be created by that point and it will technically work to provision. I think you only need to mount one device for btrfs to get all of them, so it should even work with the NixOS config part too like that
As it is right now though, I don't think there is an explicit way to order devices by dependency (#80 is related) and there is definitely no expicit multi-device btrfs support (that would probably have to be its own top-level type like VGs are now, but given mounting only needs to happen for one device anyway, the extraArgs
kludge is probably sufficient)
from disko.
Thanks; that answers my question, so I'll close the issue.
from disko.
Related Issues (20)
- btrfs creating snapshot of root beetween _create and _mount HOT 2
- Questions: ZFS encyption / swap size automation HOT 1
- Cannot specify a relative flake path (flake reference '.' is not an absolute path)
- Support for day 2 operations like resizing HOT 1
- How do I actually create a zfs pool on a running system? HOT 2
- security hole /boot and /boot/loader/random-seed HOT 3
- Wrong type for an EFI System Partition (ESP) HOT 4
- Importing disko from inputs in the same file than the disk configuration throw an error HOT 5
- Ignore Partitions
- Disko v1.3.0 requires a `./` for the disko file and gives a cryptic error when missing
- [feature-request] mode to output fileSystems nix configuration HOT 4
- [example-request] btrfs and bcachefs raids without lvm/mdam
- Using disko to generate raspberry pi sd card images
- Random boot failues due to partition confusion because disko now relies on `by-partlabel` HOT 8
- ZFS Features Support: Dataset property inheritance HOT 2
- Converting an existing system to use disko? HOT 5
- GRUB Mirrored boot entries with disko HOT 2
- zpool create error: one or more vdevs refer to the same device HOT 1
- How to test luks setup with `--vm-test` HOT 5
- device already has a partition, skipping creating zpool zroot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disko.