Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
separate /var on btrfs is it recomendated or not?
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
st834
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2022
Posts: 95

PostPosted: Thu Jul 18, 2024 8:49 am    Post subject: separate /var on btrfs is it recomendated or not? Reply with quote

Hello,

I use Gentoo on btrfs and this question is more theoretical than a description of the problem.

Is it advisable (recommended) or not to use/var in a separate section (in the case of btrfs - subvolume)?

I have read a large number of different manuals about recommendated shemas of disk partitioning. For example, Fedora or Arch indicate that some parts of /var are strongly related to other parts of the file system and it is not recommended to put them in a separate tray. At the same time, nested parts/var, such as/var/www/.. ,/var/tmp/portage can be placed in a separate sub-volume without any problems.

The issues of uneven filling of sections for btrfs are not very relevant. If /var is placed in a separate subvolume, it is excluded from system snapshots. If some parts of /var are related to other elements of the system, then the snapshot will not be complete if /var is placed on a separate partition.

When reading the Gentoo documentation (installation and btrfs), I did not find any restrictions and information about whether Gentoo (maybe it is common for all systems) has the same relationship between /var elements and other parts of the system? Is it really advisable to place/var in a separate sub-volume?

Thanks a lot for any answers
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5094
Location: Bavaria

PostPosted: Thu Jul 18, 2024 11:51 am    Post subject: Re: separate /var on btrfs is it recomendated or not? Reply with quote

st834 wrote:
[...] Is it really advisable to place/var in a separate sub-volume?

No. As fedora already correctly said, only subdirectories (e.g. /var/www) should be separated from it. Under Gentoo, for example, the /var/tmp/portage is very often mounted as tmpfs (if enough main memory is available):
Code:
$ mount
...
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var/tmp/portage type tmpfs (rw,nosuid,nodev,noatime,size=25165824k,mode=1775,uid=250,gid=250)

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
st834
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2022
Posts: 95

PostPosted: Thu Jul 18, 2024 11:59 am    Post subject: Reply with quote

Thank so much for answer!

I used to mount /var/tmp/portage as zram with ext4 file system according Gentoo guide.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5094
Location: Bavaria

PostPosted: Thu Jul 18, 2024 12:30 pm    Post subject: Reply with quote

st834 wrote:
I used to mount /var/tmp/portage as zram with ext4 file system according Gentoo guide.

Yes, also a very good solution. :D
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
st834
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2022
Posts: 95

PostPosted: Thu Jul 18, 2024 12:48 pm    Post subject: Reply with quote

Thanks for approving ! :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