Diese Version wurde durch eine neuere bestätigte Version ersetzt.DiffDiese Version (2023/02/18 11:50) wurde bestätigt durch Daniel.Die zuvor bestätigte Version (2023/02/18 11:49) ist verfügbar.Diff

Dies ist eine alte Version des Dokuments!


Linux: Basic Server Configuration

These setting here are an advice to think about when setting up a new linux- machine (here on an opensuse distrubution, which i really like).

By default openSuSE will set some conservative mountoptions, that are save, but not best choice for homeoffice use and maybe could also improve company servers. Here are some proposals to think about chenging mount Options.

LVM is a powerful partition-management-layer and should always be used, when there is some none low-end hardware present. If you can use the KDE Partitioning- Tool (which means having Plasma=KDE Desktop compatible support), the support is very inuitive and opens a lot of flexibility whne handling partitions, like adding more disk space or moving partitions, but also on console this offers good functionality. OpenSuSE offer to create LVM- Styled system setup in installation optionally (not by default). If you can: use it.

Brtfs is the way to go everywhere. There are some disadvanteges while it is still in developement and sometime a bit oversized for homeoffice, but no other filesystem is that good in general usage. Only use other Filesystems, if there are reasons for - e.g. when exchanging files with another windows on that pc.

BTRFs has a lot of Mountoptions and some here are really odd ones for every linux. I would suggest at least those:

For Desktopusage: compress=zstd:1,noatime,nodiratime,autodefrag

While autodefrag should not be necessary on ssd- harddiscs.

For Databases or files that need speed and are well backed up otherwise : nodatacow,nodatasum,noatime,nodiratime

Sources:

Brief: Quotas should be disabled

BTRFS comes with included support of disk quotas. It is enabled by default if a btrfs-volume is created. Disk quotas are useful to mangage diskspace, as they store informations of directory sizes in the filesystem. There may be programs, that calculate disk usage of directories only that way. One example is snapper: It will automatically delete old snapshots, if the space is running low on a device using snapshots. This is done, by checking the qoutas. Running snapper without qoutas will make this not working anymore. Instead other functions will be used - e.g. the maximum number of old snapshots to keep.

To find out, if quoutas are enabled, do:

btrfs qgroup show /

Quotas are complicated to manage by btrfs. As there are many situations, where the qoutas may get incorrect, they will often be invalidated and will need to be recalculated from scratch. Furthermore checking if they are correct is often needed - e.g. at startup or after some time. This process consumes a lot of cpu and disk utilisation and makes the hardware slow, sometimes rendering a computer useless for some time.

Because of this, the kernel.org- team recommends to turn disk quotas off if not needed.

This can be done by:

btrfs quota disable /

Snapper

After that, /etc/snapper/configs/root should be checked:

# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="10"
NUMBER_LIMIT_IMPORTANT="10"

If you have a lot of Ram, you may adjust the swappiness to better fit your needs - or turn off swap completely.

e.g. /etc/sysctl.conf:

vm.swappiness = 60
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
  • content/serverbasics.1676720997.txt.gz
  • Zuletzt geändert: 2023/02/18 11:49
  • von Daniel