Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Searching for suggesstions on btrfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nurali
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2022
Posts: 146
Location: Somewhere,Earth

PostPosted: Tue Jan 24, 2023 3:43 am    Post subject: [SOLVED]Searching for suggesstions on btrfs Reply with quote

Hello everyone
I want to build my system on btrfs,but unfortunately,I am an amateur and unprofessional to all these stuff,so I have to ask for some advice from you.
I found an artcle about btrfs partioning on Gentoo,here is the link:
https://github.com/Baba280251/Gentoo-optimized-install-guide
So I am asking,can I create subvolumes just like that?
If answer is no,can someone give me some advice about subvolume?
I want to take snapshots for / to rescue the system when I need to.
I use systemd
I have a 512G SSD


Last edited by nurali on Sat Jan 28, 2023 6:33 am; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3136

PostPosted: Tue Jan 24, 2023 1:46 pm    Post subject: Reply with quote

I don't think we speak the same language right now, so here's a general advice for starting up:
Follow the guide exactly as is, and ask specific questions when you encounter some errors.

Maybe you will get what you want, maybe not, but at least you will know what needs to be changed, which typically narrows the problem down from "undefinable" to "flip this switch and keep going".
Gentoo has a steeper learning curve than most linux distros; this is the trade-off between flexibility and having things done for you by someone else. You will probably need a do-over anyway, so just get it running on defaults to learn how it does things, and then do that again the way you actually want to to have it.
And THEN you can move on to "never reinstall" maintenance phase.

The first installation can take a few days, so take your time. Once you know what you're doing (and not making mistakes), you can do the essentials in half an hour and fine tune the rest after you start using it.
Back to top
View user's profile Send private message
nurali
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2022
Posts: 146
Location: Somewhere,Earth

PostPosted: Tue Jan 24, 2023 2:12 pm    Post subject: Reply with quote

szatox wrote:
I don't think we speak the same language right now, so here's a general advice for starting up:
Follow the guide exactly as is, and ask specific questions when you encounter some errors.

Maybe you will get what you want, maybe not, but at least you will know what needs to be changed, which typically narrows the problem down from "undefinable" to "flip this switch and keep going".
Gentoo has a steeper learning curve than most linux distros; this is the trade-off between flexibility and having things done for you by someone else. You will probably need a do-over anyway, so just get it running on defaults to learn how it does things, and then do that again the way you actually want to to have it.
And THEN you can move on to "never reinstall" maintenance phase.

The first installation can take a few days, so take your time. Once you know what you're doing (and not making mistakes), you can do the essentials in half an hour and fine tune the rest after you start using it.

Thanks for replying
Yes,I do not speak English,I am Uyghur ,and I speak Chinese in most time,I have to use translator to communicate with you,so please don't mind
Thank you for the advices :P
I actually know how to install Gentoo as I want,also know how to fix some problems,but I do not know much about Gentoo's directory structure,I am learning abou that
I am using XFS to be my filesystem,and I want to use BTRFS because it's snapshot and some other features
So I just want some advice on creating BTRFS subvolumes,maybe "Which btrfs subvolumes should be created during install Gentoo?" is more specific?
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 709
Location: Sota algun pi o alzina...

PostPosted: Tue Jan 24, 2023 2:27 pm    Post subject: Reply with quote

it's important change default Checksum Algorithms and then everything else

https://wiki.tnonline.net/w/Btrfs/Checksum_Algorithms
_________________
"~amd64" --cpu 7700 non-x --DDR5 2x16GB 6000MHz --gpu RX 470
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3136

PostPosted: Tue Jan 24, 2023 7:25 pm    Post subject: Reply with quote

Alright, that changes the original question quite a bit.

I don't use btrfs, but this part does not seem to be FS-specific:
Quote:
Which btrfs subvolumes should be created during install Gentoo?
It depends.
What is the purpose of this system you're making?
How are you going to use it? Single user desktop? Multiuser desktop? Home server? What will be making the bulk of the data?
Dual boot with another linux?
This should be a good start to partitioning.


Also, in the meantime create a btrfs volume on some unused partition and see what it allows you to do. How it mounts things for example.
I've been working with ZFS for a while, it's interface is completely different than any other FS I've seen. E.g. it had its own options that replaced fstab entries.
Back to top
View user's profile Send private message
elover
Apprentice
Apprentice


Joined: 20 Nov 2019
Posts: 159
Location: Spain

PostPosted: Wed Jan 25, 2023 10:13 pm    Post subject: Reply with quote

Btrfs is very easy to use, you format the partition or disk to btrfs and mount it in a directory, then you can create subvolumes with btrfs subvol create subvolume_name

I have all my hard drives and ssd in btrfs, because it allows me to compress the files with zstd, create snapshots and backups with any of these programs

https://btrfs.wiki.kernel.org/index.php/Incremental_Backup

In the root directory I have these volumes by lxc or docker
ID 256 gen 7292 top level 5 path @root
ID 257 gen 3907 top level 256 path var/lib/lxd/storage-pools/default
ID 265 gen 3550 top level 257 path var/lib/lxd/storage-pools/default/images/f795ae9fa44ca9f9d5a1e20b9fc65f7354b45ad88fa29e6b450861d0d5a28033
ID 266 gen 3557 top level 257 path var/lib/lxd/storage-pools/default/images/27664d63b5774124095eea2b5e0e4a5f2a5460f80e43440bbd11268c17b03f10
ID 267 gen 7274 top level 256 path var/lib/lxd/storage-pools/storage
ID 270 gen 5171 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/opensuse-kde
ID 278 gen 6436 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/composed-earwig
ID 284 gen 6436 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/healthy-locust
ID 285 gen 6549 top level 256 path srv/var/lib/docker/btrfs/subvolumes/38486d2d31ed2932645749b7a82ec6ba43524a1cfae39173681cf54a2103199d
ID 290 gen 6543 top level 256 path srv/var/lib/docker/btrfs/subvolumes/2b56c8c5f0ee9b60740f33d22500da2d88b8a5d813cb0710ae7a03d858fe8b7b
ID 293 gen 6545 top level 256 path srv/var/lib/docker/btrfs/subvolumes/ba24c94bf2653fcef129d62402c6354312b599d27f5325ac6ed0050ae946f3f4
ID 306 gen 6557 top level 256 path srv/var/lib/docker/btrfs/subvolumes/83cc578bcd5ba18aabcce33f9d5dd7ebf81f01828047699099a567fc441e1e4b
ID 313 gen 6560 top level 256 path srv/var/lib/docker/btrfs/subvolumes/7625fe02daaca79984c267881a48493549f9934fa102d2ecd6358c42658c5049
ID 316 gen 6570 top level 256 path srv/var/lib/docker/btrfs/subvolumes/68759346712f9971cbe23bfef0485a4adba2922cd8fa47fe246fd201985d46be
ID 317 gen 6586 top level 256 path srv/var/lib/docker/btrfs/subvolumes/e78b1d5034e05273f8b277ea2845419365e8cafabbbb1fb64e90c582e71cd42d
ID 318 gen 7260 top level 267 path var/lib/lxd/storage-pools/storage/images/feec653742f094ee3c1872470ad3723ecf7672d983e92ace05b5e73cdd64feb8
ID 319 gen 7260 top level 267 path var/lib/lxd/storage-pools/storage/images/8248b8f28471086ac1ab3df6fea5954d257b1344345161fb84f885fe8f33def8
ID 320 gen 7263 top level 267 path var/lib/lxd/storage-pools/storage/images/204b4a12708048c9a1779c7f10c169c9f8179694c925d3dd89990a828eec391d
ID 321 gen 7267 top level 267 path var/lib/lxd/storage-pools/storage/images/31e7b219070293fa4701008136764a112648897d72a33a1acfa1a6dec0604e0c
ID 322 gen 7271 top level 267 path var/lib/lxd/storage-pools/storage/images/6171fda2dffb7e7a1d8f89f9a1cd59674f65241ecafb069a425d43812b969dc3
ID 323 gen 7274 top level 267 path var/lib/lxd/storage-pools/storage/images/57174f6a7cf1a46779c804616a0ac2545e37ebf18b55b006c8a1f3cf8852d73a

Fstab

1 │ # <fs> <mountpoint> <type> <opts> <dump/pass>
2 │ LABEL=Gentoo / btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@root 0 1
3 │ UUID=180B-1D00 /boot/efi vfat noatime,defaults 0 0
4 │ LABEL=Swap /swap btrfs noatime,ssd,discard=async,subvol=@swap 0 0
5 │ UUID=8642b80b-e1f8-4223-97c0-1ef127d96e1e /home btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@home 0 1
6 │ UUID=b5ec20b9-6ac7-4d0d-b7e7-4d5c8bf83f8d /cloud btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@cloud 0 0
7 │ UUID=0fa82ea5-1d48-416e-961b-1cfe96e8fc9f /vm btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@lfs 0 0
8 │ UUID=cc72fec8-3bd2-482e-b4ed-1a0a9b328f40 /w11 btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@other 0 0
9 │ UUID=bd797006-facb-4d15-80a3-35475594262b /backup btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@backup 0 0
10 │ /swap/swapfile none swap sw 0 0
11 │ tmpfs /tmp tmpfs rw,nosuid,noatime,nodev,size=12G,mode=1777 0 0


I recommend that you read the manuals or the wiki.
https://btrfs.readthedocs.io/en/latest/Volume-management.html
Back to top
View user's profile Send private message
nurali
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2022
Posts: 146
Location: Somewhere,Earth

PostPosted: Sat Jan 28, 2023 6:29 am    Post subject: Reply with quote

szatox wrote:
Alright, that changes the original question quite a bit.

I don't use btrfs, but this part does not seem to be FS-specific:
Quote:
Which btrfs subvolumes should be created during install Gentoo?
It depends.
What is the purpose of this system you're making?
How are you going to use it? Single user desktop? Multiuser desktop? Home server? What will be making the bulk of the data?
Dual boot with another linux?
This should be a good start to partitioning.


Also, in the meantime create a btrfs volume on some unused partition and see what it allows you to do. How it mounts things for example.
I've been working with ZFS for a while, it's interface is completely different than any other FS I've seen. E.g. it had its own options that replaced fstab entries.

Sorry to took so long to replying,I did not recieve the email....
The purpuse was ROOL BACK THE SYSTEM WHEN IT CRASH
But I changed my mind,that I should learn is solving the specific problem when the syatem get a problem,not rolling it back without knowing anything
So I gave up on btrfs
Thank you all for your help :D
Back to top
View user's profile Send private message
nurali
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2022
Posts: 146
Location: Somewhere,Earth

PostPosted: Sat Jan 28, 2023 6:31 am    Post subject: Reply with quote

elover wrote:
Btrfs is very easy to use, you format the partition or disk to btrfs and mount it in a directory, then you can create subvolumes with btrfs subvol create subvolume_name

I have all my hard drives and ssd in btrfs, because it allows me to compress the files with zstd, create snapshots and backups with any of these programs

https://btrfs.wiki.kernel.org/index.php/Incremental_Backup

In the root directory I have these volumes by lxc or docker
ID 256 gen 7292 top level 5 path @root
ID 257 gen 3907 top level 256 path var/lib/lxd/storage-pools/default
ID 265 gen 3550 top level 257 path var/lib/lxd/storage-pools/default/images/f795ae9fa44ca9f9d5a1e20b9fc65f7354b45ad88fa29e6b450861d0d5a28033
ID 266 gen 3557 top level 257 path var/lib/lxd/storage-pools/default/images/27664d63b5774124095eea2b5e0e4a5f2a5460f80e43440bbd11268c17b03f10
ID 267 gen 7274 top level 256 path var/lib/lxd/storage-pools/storage
ID 270 gen 5171 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/opensuse-kde
ID 278 gen 6436 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/composed-earwig
ID 284 gen 6436 top level 267 path var/lib/lxd/storage-pools/storage/virtual-machines/healthy-locust
ID 285 gen 6549 top level 256 path srv/var/lib/docker/btrfs/subvolumes/38486d2d31ed2932645749b7a82ec6ba43524a1cfae39173681cf54a2103199d
ID 290 gen 6543 top level 256 path srv/var/lib/docker/btrfs/subvolumes/2b56c8c5f0ee9b60740f33d22500da2d88b8a5d813cb0710ae7a03d858fe8b7b
ID 293 gen 6545 top level 256 path srv/var/lib/docker/btrfs/subvolumes/ba24c94bf2653fcef129d62402c6354312b599d27f5325ac6ed0050ae946f3f4
ID 306 gen 6557 top level 256 path srv/var/lib/docker/btrfs/subvolumes/83cc578bcd5ba18aabcce33f9d5dd7ebf81f01828047699099a567fc441e1e4b
ID 313 gen 6560 top level 256 path srv/var/lib/docker/btrfs/subvolumes/7625fe02daaca79984c267881a48493549f9934fa102d2ecd6358c42658c5049
ID 316 gen 6570 top level 256 path srv/var/lib/docker/btrfs/subvolumes/68759346712f9971cbe23bfef0485a4adba2922cd8fa47fe246fd201985d46be
ID 317 gen 6586 top level 256 path srv/var/lib/docker/btrfs/subvolumes/e78b1d5034e05273f8b277ea2845419365e8cafabbbb1fb64e90c582e71cd42d
ID 318 gen 7260 top level 267 path var/lib/lxd/storage-pools/storage/images/feec653742f094ee3c1872470ad3723ecf7672d983e92ace05b5e73cdd64feb8
ID 319 gen 7260 top level 267 path var/lib/lxd/storage-pools/storage/images/8248b8f28471086ac1ab3df6fea5954d257b1344345161fb84f885fe8f33def8
ID 320 gen 7263 top level 267 path var/lib/lxd/storage-pools/storage/images/204b4a12708048c9a1779c7f10c169c9f8179694c925d3dd89990a828eec391d
ID 321 gen 7267 top level 267 path var/lib/lxd/storage-pools/storage/images/31e7b219070293fa4701008136764a112648897d72a33a1acfa1a6dec0604e0c
ID 322 gen 7271 top level 267 path var/lib/lxd/storage-pools/storage/images/6171fda2dffb7e7a1d8f89f9a1cd59674f65241ecafb069a425d43812b969dc3
ID 323 gen 7274 top level 267 path var/lib/lxd/storage-pools/storage/images/57174f6a7cf1a46779c804616a0ac2545e37ebf18b55b006c8a1f3cf8852d73a

Fstab

1 │ # <fs> <mountpoint> <type> <opts> <dump/pass>
2 │ LABEL=Gentoo / btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@root 0 1
3 │ UUID=180B-1D00 /boot/efi vfat noatime,defaults 0 0
4 │ LABEL=Swap /swap btrfs noatime,ssd,discard=async,subvol=@swap 0 0
5 │ UUID=8642b80b-e1f8-4223-97c0-1ef127d96e1e /home btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@home 0 1
6 │ UUID=b5ec20b9-6ac7-4d0d-b7e7-4d5c8bf83f8d /cloud btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@cloud 0 0
7 │ UUID=0fa82ea5-1d48-416e-961b-1cfe96e8fc9f /vm btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@lfs 0 0
8 │ UUID=cc72fec8-3bd2-482e-b4ed-1a0a9b328f40 /w11 btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@other 0 0
9 │ UUID=bd797006-facb-4d15-80a3-35475594262b /backup btrfs noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@backup 0 0
10 │ /swap/swapfile none swap sw 0 0
11 │ tmpfs /tmp tmpfs rw,nosuid,noatime,nodev,size=12G,mode=1777 0 0


I recommend that you read the manuals or the wiki.
https://btrfs.readthedocs.io/en/latest/Volume-management.html

Thank you for recommanding :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum