Summary: | BTRFS subvolume layout | ||
---|---|---|---|
Product: | IPFire | Reporter: | Stefan Schantl <stefan.schantl> |
Component: | --- | Assignee: | Assigned to nobody - feel free to grab it and work on it <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | - Unknown - | ||
Priority: | - Unknown - | CC: | cuf1618, michael.tremer |
Version: | 2 | ||
Hardware: | unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 13606 |
Description
Stefan Schantl
2024-03-03 18:08:25 UTC
I had a phone call to Arne about this topic and he mentioned the following directories as well: * /root ( because of the bash history) * /var/backup ( IMPORTANT ) * The directory which keeps the RRD graphs * The direcotry which holds the vnstat DB * The directory which contains the OVPN one time pad key ( OVPN OTA ) * RRD graphs are placed in "/var/log/rrd" * vnstats are located in "/var/log/vnstat" So there is no need to place them on an own subvolume because "/var/log" is already one. OVPN one time pad key ( OVPN OTA ) is not needed because we do not use the incremented file approach. (In reply to Stefan Schantl from comment #0) > We need to design a subvolume layout in case BTRFS is used. > > A good layout is necessary because in case a snapshot of the root filesystem > will be restored all kind of different data files, for example log files, > databases, mail queues etc also will will be set back to the snapshoted > state. > > This mostly will result in a massively data lost. If those data is stored on > a different subvolume than the root filesystem, those data would not be part > of a snapshot and keeps untouched during a roll-back > > Currently the following subvolumes are created by the installer: > (https://git.ipfire.org/?p=people/stevee/ipfire-2.x.git;a=blob;f=src/ > installer/hw.c;h=26c473e9c42a3941f9a293f49c3ee5f5083ba418;hb=refs/heads/next- > BTRFS#l47) > > @root | / | Which contains the root filesystem > @snapshots | /.snapshots | The subvolume where the snapshots will be stored > @home | /home | Contains the user homes (may not required) > @cache | /var/cache | Contains various cached files > @lib | /var/lib | Folder which contains a lot of different > databases (suricata, libloc etc) > @logs | /var/log | Contains the log files, which never should be > rolled back. > @mails | /var/mail | Directory for system mails > @tmp | /var/tmp | Folder which contains temporary downloaded files > (no snaphotting needed for them) > > Please feel free to add any forgotten system directories which contains any > kind of data which never should be rolled back. You may want to add @srv because /srv is common used for www and nfs. (In reply to c Farley from comment #3) > You may want to add @srv because /srv is common used for www and nfs. This might be difficult because we have the web UI files in /srv which should be part of the rollback. |