Giter VIP home page Giter VIP logo

Comments (6)

Mic92 avatar Mic92 commented on May 24, 2024

cc @lilyinstarlight

from disko.

lilyinstarlight avatar lilyinstarlight commented on May 24, 2024

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.

accelbread avatar accelbread commented on May 24, 2024

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.

accelbread avatar accelbread commented on May 24, 2024

If it helps, my current disk setup is here: https://github.com/accelbread/config-flake/tree/master/nixos/common/disks

from disko.

lilyinstarlight avatar lilyinstarlight commented on May 24, 2024

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.

accelbread avatar accelbread commented on May 24, 2024

Thanks; that answers my question, so I'll close the issue.

from disko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.