Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
content:serverbasics [2024/04/20 10:26] – [Raided EFI-BOOT] Danielcontent:serverbasics [2024/04/20 13:02] (aktuell) – [UMask- Approach] Daniel
Zeile 16: Zeile 16:
  
 Always use LVM, as this has many benefits. On OpenSuSE btrfs is the best Filesystem if you disable Quotas on datapartitions. Always use LVM, as this has many benefits. On OpenSuSE btrfs is the best Filesystem if you disable Quotas on datapartitions.
 +
 +==== Example-Setup ====
 +
 +My small Homeoffice-Server described here, will have 5 Disks:
 +
 +  * 2x SSD with 2 TB each
 +  * 3x HDD with 4 TB each
 +
 +My Setup will look like this:
 +
 +The SSDs will bothe have the same Layout:
 +
 +  * 1x 1GB Raid1 FAT32 EFIBOOT
 +  * 1x 100%FREE LVM2 PV in Volumegroup vgssd
 +      * 100GB Raid1 lvroot btrfs,compress=zstd:3 root
 +      * 50GB Raid1 lvmariadb xfs for docker service mariadb
 +      * Space left blank for other high performance- services or growth
 +
 +The HDDs will have:
 +
 +  * 1x 100%Free LVM2 PV Volumegroup vgdata
 +      * 1x 100GB Raid5 xfs, home and docker-service
 +      * 1x 4,4TB Raid5 lvbackup btrfs,compress=zstd:7 for internal daily Backup
  
 ==== Raided EFI-BOOT ==== ==== Raided EFI-BOOT ====
  
-Nowadays, UEFI is always the best choice to boot. UEFI- Boot is quite straight forward: You first take some device, make it gpt- partitioned, create a partition (i would at least take 500 MB today, better 1GB in size), format that partition with FAT32 and mark the partition as efi-boot via the partition flag. Thats all. After some OS installed to that partition in a UEFI- way, the bios can load those files and start the OS.+Nowadays, UEFI is always the best choice to boot. UEFI- Boot is quite straight forward: You first take some device, make it gpt- partitioned, create a partition (i would at least take 500 MB today, better 1GB in size), format that partition with FAT32 and mark the partition as efi-boot via the partition flag. Thats usually all for a small office system. After some OS installed to that partition in a UEFI- way, the bios can load those files and start the OS.
  
-Unfortunatelly, the designers of UEFI forgot, that if your not using hardware- raid (which i don't recommend, as your losing the ability to switch harddisks between your hardware), there is no standard way to raid the partition as FAT32 is not suitable for that while it would overwrite the parts in the partition, that are needed by MD Raid1 to store its metadata.+But: Unfortunatelly, the designers of UEFI forgot, that if your not using hardware- raid (which i don't recommend, as your losing the ability to switch harddisks between your hardware), there is no standard way to raid the partition as FAT32 is not suitable for that while it would overwrite the parts in the partition, that are needed by MD Raid1 to store its metadata.
  
-Fortunatelly the designers of OSS software- raid were smarter: They found a way to work around that: They made a special Version of MD Metadata calle 1.0 which will store its Metadata at the end of the partition - so it will not interfere with FAT32. For FAT32 it can work as usual and for MD-Tools it will be able to detect the devices as Raid1.+Fortunatelly the designers of OSS software- raid were smarter: They found a way to work around that: They made a special Version of MD Metadata called V1.0 which will store its Metadata at the end of the partition - so it will not interfere with FAT32. For FAT32 it can work as usual and for MD-Tools it will be able to detect the devices as Raid1.
  
-So I would suggest to use two disks both partioned with GPT and same sized efi-partitions (make them about 500 Megabytes in Size to store Bios or UCODE updates for Firmware Updater) and before creating the FAT32 filesystem do software raid on it. E.g.:+But still - LVM will not work in this case. MD Partitions and Raid1 need to be outside of the LVM-Partition. 
 + 
 +So I would suggest to use two disks both partioned with GPT and same sized efi-partitions (as said, at least 500 Megabytes in Size to store Bios or UCODE updates for Firmware Updater) and before creating the FAT32 filesystem do software raid on it. E.g.:
  
 <code> <code>
Zeile 39: Zeile 64:
 ==== LVM ==== ==== LVM ====
  
-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.+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. 
 === Mirror- Raided LVM- Volumes (RAID1) === === Mirror- Raided LVM- Volumes (RAID1) ===
  
Zeile 78: Zeile 104:
  
 where i equals the number of devices with Data (not including parity- storage) where i equals the number of devices with Data (not including parity- storage)
- 
  
 === Useful Commands === === Useful Commands ===
Zeile 133: Zeile 158:
  
 </code> </code>
- 
  
 == Resizing logical Volumes with mounted Filesystem == == Resizing logical Volumes with mounted Filesystem ==
Zeile 146: Zeile 170:
 ==== Filesystem ==== ==== Filesystem ====
  
-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.+Brtfs is the way to go everywhere where you need big data and flexibility. There are some disadvanteges while it is still in developement and sometimes it is 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. 
 + 
 +And there is one Reason: Docker - at the current time of writing this (20.04.2024) you should NOT USE BTRFS with Docker. More is explained later. 
  
 ==== Mountoptions ==== ==== Mountoptions ====
Zeile 156: Zeile 183:
 While autodefrag should not be necessary on ssd- harddiscs. 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+For **Databases**  or files that need speed and __**are well backed up otherwise**__  : nodatacow,nodatasum,noatime,nodiratime 
 === Sources: === === Sources: ===
  
Zeile 276: Zeile 304:
 By default the umask is 0002 or 0022. Those values are substracted from 0777, which would mean full access for everyone. You can check out the docs in the net how they work. I won't explain here, cause there is a big problem with umask: The value can only be changed on process level or user or systemwide. This means you cannot set them per directory - which would be intentional to the user. By default the umask is 0002 or 0022. Those values are substracted from 0777, which would mean full access for everyone. You can check out the docs in the net how they work. I won't explain here, cause there is a big problem with umask: The value can only be changed on process level or user or systemwide. This means you cannot set them per directory - which would be intentional to the user.
  
-So forget about umask.+So you should maybe think of setting a better umask than 022 - which would make all users of you group have read access to you files to lets say 077. Or - even better don't use the group "users", but make a group with the same name as the user per User itself. Than you can have umask 007. 
 + 
 +On my system the umask can be defined in the file ''/etc/login.defs''
 + 
 +But to go on directory- permissions: forget about umask. 
  
 ==== FACLs ==== ==== FACLs ====
  • content/serverbasics.1713608790.txt.gz
  • Zuletzt geändert: 2024/04/20 10:26
  • von Daniel