Giter VIP home page Giter VIP logo

Comments (10)

tyler274 avatar tyler274 commented on June 12, 2024 3

Any update on this?

from bcachefs.

modelrockettier avatar modelrockettier commented on June 12, 2024 1

So at least on debian-based systems, mounting by UUID or label is actually handled in userspace by libblkid from util-linux.

If you want to try it out, I have a prototype version of util-linux with bcachefs support

from bcachefs.

koverstreet avatar koverstreet commented on June 12, 2024 1

I made a little tool to solve exactly this problem: https://github.com/yshui/bcachefs-mount

Cool! And it's in Rust, lovely.

I'd love to pull this into bcachefs-tools - and I'd love to use Rust for more userspace code, so I'm happy to add the Rust dependency. Would you like to merge this into the bcachefs-toos repo, so I can pull it in?

If you call it mount.bcachefs, mount(8) should call it automatically.

from bcachefs.

tristan-k avatar tristan-k commented on June 12, 2024

@modelrockettier @koverstreet How do I mount a bcachefs disk group (foreground and background) with /etc/fstab, so grub can pick it up accordingly? Please see my reddit post here.

$ sudo bcachefs format /dev/nvme0n1p3 /dev/sdc1 --foreground_target /dev/nvme0n1p3 --promote_target /dev/nvme0n1p3 --background_target /dev/sdc1
External UUID:			c093338c-b395-4581-8288-82be715bf2af
Internal UUID:			930086d9-59fa-476d-b306-8c3c3da8c57f
Label:				
Version:			9
Block_size:			4.0K
Btree node size:		256.0K
Error action:			remount-ro
Clean:				0
Metadata replicas:		1
Data replicas:			1
Metadata checksum type:		crc32c (1)
Data checksum type:		crc32c (1)
Compression type:		none (0)
Foreground write target:	1
Background write target:	2
Promote target:			1
String hash type:		siphash (2)
32 bit inodes:			0
GC reserve percentage:		8%
Root reserve percentage:	0%
Devices:			2 live, 2 total
Sections:			members
Superblock size:		872

Members (size 120):
  Device 0:
    UUID:			73140b61-5181-4c8a-8b05-af45e424f1ce
    Size:			222.9G
    Bucket size:		256.0K
    First bucket:		0
    Buckets:			912796
    Last mount:			(never)
    State:			readwrite
    Group:			�
    Data allowed:		journal,btree,data
    Has data:			(none)
    Replacement policy:		lru
    Discard:			0
  Device 1:
    UUID:			3b13fcab-082b-497b-a2c3-ce6c4efdab50
    Size:			4.5T
    Bucket size:		256.0K
    First bucket:		0
    Buckets:			19077224
    Last mount:			(never)
    State:			readwrite
    Group:			�
    Data allowed:		journal,btree,data
    Has data:			(none)
    Replacement policy:		lru
    Discard:			0
Creating config file /etc/default/grub with new version
grub-probe: error: failed to get canonical path of `/dev/nvme0n1p3:/dev/sdc1'.
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/nvme0n1p3:/dev/sdc1'.
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.132) ...
Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is how my fstab looks like. I really dont know how to handle a bcachefs disk group in fstab.

cat /etc/fstab 
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/disk/by-partuuid/b04533a8-efe2-4884-a703-63ba54eb48ad /               bcachefs rw,relatime 0 0
/dev/disk/by-partuuid/0e80457c-d028-4efa-b126-2efda6371c6d /               bcachefs rw,relatime 0 0
/dev/disk/by-partuuid/7c7b8528-2eb1-40b9-8ba9-18c71a4c0463 /boot           ext4     rw,relatime 0 2
/dev/disk/by-partuuid/7d2bc4b3-5d08-4448-97cc-208177da9403 /boot/efi       vfat     umask=0077  0 1

from bcachefs.

colttt avatar colttt commented on June 12, 2024

any news on this?
it would be nice to have something like that, because its a mess if you use bcachefs with many disks (I've other setups with 120disks)

from bcachefs.

RlndVt avatar RlndVt commented on June 12, 2024

I see a lot of commits on this issue, is it possible yet? Any update you could give us?

from bcachefs.

yshui avatar yshui commented on June 12, 2024

I made a little tool to solve exactly this problem: https://github.com/yshui/bcachefs-mount

from bcachefs.

yshui avatar yshui commented on June 12, 2024

@RlndVt All this commits are linked here because they contains the string #1 in their commit message, but they are all irrelevant. I think it's better to move this issue to bcachefs-tools

Edit: Ah, bcachefs-tools repo doesn't take issues. Maybe close this and reopen? @piedar

from bcachefs.

yshui avatar yshui commented on June 12, 2024

Would you like to merge this into the bcachefs-toos repo, so I can pull it in?

I would love to. But I am not sure how the build systems would fit together.

If you call it mount.bcachefs, mount(8) should call it automatically.

This tool doesn't take the usual mount options. I intend to make it more mount(8) compatible, but it would take some time.

from bcachefs.

koverstreet avatar koverstreet commented on June 12, 2024

Having the makefile call cargo build for the mount.bcachefs target should work fine.

I'd like to get this merged in, we can continue to make improvements.

from bcachefs.

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.