You are not logged in.
Pages: 1
Hi, sorry in advance because I'am very new and very nob.
I researched but I did not find any solution for what I'am trying to do, so, maybe is not possible or maybe I'am doing something wrong.
I'am trying to use btrfs for the first time, I installed Arch. in nvme0n1p1 with btrf fs and some toplevel subvolumes like @, @home, @snapshots mounted, respectively, in /, /home and /.snapshots, I can use snapper for sanpshots an everything seems to work fine.
Than I made one btrfs raid1 with sda1 and sdb1 and also it seem to work fine because when I mount sdb1 lsblk -f show sda1 as mounted instead.
At this point my goal is to mount sda1 in mnt/data, create one toplevel subvolume "@data" and mount it in /mnt/data, but, when I try to mount it with mount -o <options>,subvol=@data /dev/sda1 /mnt/data it does not work and the error message say that the mountpoint does not exist (fsconfig system call failed: No such file or directory).
If I create one @test subvolume inside the mounted -0 subvolid=5 sda1, it create the "@test" toplevel subvolume and the "@test" folder; I would like, instead to create a standard "test" folder in which i can mount the "@test" subvolume.
Probably I have to study a lot more about btrfs to understand how it works.
Does anyone know if is possible to do what I want?
Thanks in advance and sorry for my poor English.
Offline
it's hard to grasp what's your goal is - maybe give https://www.deepl.com/ a try to get some better wording out of it
https://wiki.archlinux.org/title/Btrfs should be your starting point - which links to https://archive.kernel.org/oldwiki/btrf … vices.html
another source: https://btrfs.readthedocs.io/en/latest/index.html
personal I recommend using ZFS over BtrFS
Offline
Thank you for the suggestion!
My goal is to use /dev/sda1 and /dev/sdb1 in a RAID1 configuration (mkfs.btrfs -m raid1 -d raid1 /dev/sda1 /dev/sdb1) mounted in /mnt/mydata to store my data and prevent data loss if one hdd fail.
Regarding the first point, I think I got the desired result by creating RAID1 with the previous command and mounting /dev/sda1 in /mnt/mydata. Is that correct?
Now, I would like to create two folder in the mounted /dev/sda1 and mount two subvolumes in it in a flat configuration, so, both subvolumes with ID 5; so I can perform separate snapshots for each.
In order to try to do it I mounted /dev/sda1 with -o subvolid=5; now, if I create a new @mydata_01 subvolume inside /mnt/mydata it is created with ID=5 but it create also automatically a @mydata_01 folder. I would prefer to create a @mydata_01 subvolume with ID=5 and than mount it inside a /mnt/mydata/mydata_01 standard folder. Today I haven't had a chance to do any more testing yet, so I don't know if I can just rename the @mydata_01 folder to mydata_01 or if, in general, I am making some conceptual error regarding the use of btrfs and subvolumes.
I hope I have explained myself better, and thank you in advance for any answers.
B.R.
Last edited by And84 (2024-10-01 16:06:40)
Offline
-- Update --
I think I did it. I need to test it but it seems as desired.
Mounted /dev/sda1 with -o subvolid=5 in /mnt/mydata,
created @mydata_01 and @mydata_02 inside /mnt/mydata, it creates @mydata_01 and @mydata_02 inside /mnt/mydata,
unmounted /dev/sda1,
mkdir mydata_01 and mydata_02 folder inside /mnt/mydata,
mounted @mydata_01 and @mydata_02 inside /mnt/mydata/mydata_01 and /mnt/mydata/mydata_02,
now I have a full flat configuration without nested subvolumes, all mounted in standard dir and not in @dir.
Thanks again for the help
B.R.
Offline
Pages: 1