Håvard O. Nordstrand 4 年 前
コミット
31ac4fa0de
3 ファイル変更19 行追加8 行削除
  1. 6 2
      config/linux-server/debian.md
  2. 11 5
      config/linux-server/storage-zfs.md
  3. 2 1
      it/network/routing.md

+ 6 - 2
config/linux-server/debian.md

@@ -57,8 +57,8 @@ If you didn't already configure this during the installation. Typically the case
 1. Packages:
     - (Optional) Enable the `contrib` and `non-free` repo areas by setting `main contrib non-free` for every `deb`/`deb-src` in `/etc/apt/sources.list`.
     - Update, upgrade and auto-remove.
-    - Install basics: `sudo ca-certificates`
-    - Install tools: `tree vim screen curl net-tools dnsutils htop iotop irqtop nmap`
+    - Install (essentials): `sudo ca-certificates`
+    - Install (extra): `tree vim screen curl net-tools dnsutils moreutils htop iotop irqtop nmap`
     - (Optional) Install per-user tmpdirs: `libpam-tmpdir`
 1. (Optional) Configure editor (Vim):
     - Update the default editor: `update-alternatives --config editor`
@@ -216,6 +216,10 @@ This is typically correct by default.
 
 Everything here is optional.
 
+- Setup BASH auto-completion:
+    - This is typically installed by default.
+    - Install it: `apt install bash-completion`
+    - Enable it globally: Find the commented `bash-completion` block in `/etc/bash.bashrc` and uncomment it.
 - Setup Fail2Ban:
     - Recommended for public-facing servers.
     - Fix the firewall first so it configures itself correctly wrt. which firewall is used.

+ 11 - 5
config/linux-server/storage-zfs.md

@@ -79,18 +79,24 @@ The installation part is highly specific to Debian 10 (Buster). The backports re
 ### General
 
 - Show version: `zfs --version` or `modinfo zfs | grep '^version:'`
-- Be super careful when destroying stuff! ZFS never asks for confirmation. When entering dangerous commands, considering adding a `#` to the start to prevent running it half-way by accident.
+    - The kernel module and userland tools should match.
+- Be super careful when destroying stuff! ZFS never asks for confirmation.
+    - When entering dangerous commands, considering adding a `#` to the start to prevent running it half-way by accident.
+- Upgrade pool to support new features: `zpool upgrade <pool>`
+    - `zpool status` shows if any pool required upgrades.
+    - This is needed/recommended after upgrading ZFS.
 
 ### Pools
 
 - Recommended pool options:
     - Set thr right physical block/sector size: `ashift=<9|12>` (for 2^9 and 2^12, use 12 if unsure)
-    - Enabel compression: `compression=lz4` (use `zstd` when supported)
+    - Enabel compression: `compression=zstd`
+        - Use `lz4` for boot drives (`zstd` booting isn't currently supported) or if `zstd` isn't yet available in the version you're using.
     - Store extended attributes in the inodes: `xattr=sa` (`on` is default and stores them in a hidden file)
     - Don't enable dedup.
 - Create pool:
     - Format: `zpool create [options] <name> <levels-and-drives>`
-    - Basic example: `zpool create -o ashift=<9|12> -O compression=lz4 -O xattr=sa <name> [mirror|raidz|raidz2|...] <drives>`
+    - Basic example: `zpool create -o ashift=<9|12> -O compression=zstd -O xattr=sa <name> [mirror|raidz|raidz2|...] <drives>`
     - Create encrypted pool: See encryption section.
     - Use absolute drive paths (`/dev/disk/by-id/` or similar).
 - View pool activity: `zpool iostat [-v] [interval]`
@@ -194,8 +200,8 @@ The installation part is highly specific to Debian 10 (Buster). The backports re
     - E.g. 12 for 4kB (Advanced Format (AF), common on HDDs) and 9 for 512B (common on SSDs).
     - Check the physical block size with `smartctl -i <dev>`.
     - Keep in mind that some 4kB disks emulate/report 512B. They should be used as 4kB disks.
-- Always enable compression.
-    - Generally `lz4`. Maybe `zstd` when implemented. Maybe `gzip-9` for archiving.
+- Always enable compression on datasets (or pools so all datasets inherit it).
+    - Generally `zstd`, but `lz4` for bootable pools or old installations without `zstd` support.
     - For uncompressable data, worst case it that it does nothing (i.e. no loss for enabling it).
     - The overhead is typically negligible. Only for super-high-bandwidth use cases (large NVMe RAIDs), the compression overhead may become noticable.
 - Never use deduplication.

+ 2 - 1
it/network/routing.md

@@ -75,7 +75,8 @@ breadcrumbs:
     - Update: Exchanges new route advertisements or withdrawals.
     - Notification: Signals errors and/or closes the session.
     - Keepalive: Shows it's still alive in the absence of update messages. Both keepalives and updates reset the hold timer.
-- Letter of Agency (LOA), Internet Routing Registry (IRR) and Resource Public Key Infrastructure (RPKI) are methods to secure BGP in order to prevent route leaks/hijacks.
+- Internet Routing Registry (IRR) and Resource Public Key Infrastructure (RPKI) are methods to secure BGP in order to prevent route leaks/hijacks. While all routes should use IRR and RPKI (for providing valid bindings of prefixes to ASNs).
+- Letter of Agency (aka Letter of Authorization) (LOA) required in certain countries to be allowed to announce a prefix.
 - The "default-free zone" (DFZ) is the set of ASes which have full-ish BGP tables instead of default routes.
 - Communities are used to exchange arbitrary policy information for announcements between peers. See [BGP Well-known Communities (IANA)](https://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.xhtml).
 - "Soft reconfiguration" is a feature to cache all incoming raw announcements from peers, such that the BGP table can be quickly rebuilt if it needs to be cleared. This reduces the impact of clearing the table and is recommended, but does increase memory usage.