NAS OS の Rockstor を使ってみる

# Motivation
- Main NAS は TrueNAS Scale を使っている
- Backup NAS は、仮で Ubuntu+mdadm を入れている
    - 運用は Zabbix を使って監視しようかと思っていたが、他にやりたいことが出てきたので面倒になった
- **Backup NAS も TrueNAS にしても良かったが、慣れた同じ TrueNAS にするのも面白くない**
  - (TrueNAS にすると Replication を TrueNAS の責任で行わせられるので楽ではある)
  - Rockstor は知っていたので、とりあえず使ってみる

## What is Rockstor
- https://rockstor.com/
- TrueNAS のような NAS 用 OS の仲間
- ファイルシステムは Brtfs
  - TrueNAS は OpenZFS
- ベースとなる OS は、古くは CentOS、最近は OpenSUSE になっているらしい
  - TrueNAS は FreeBSD/Debian
- TrueNAS より HW 要件が緩い
  - Raspberry Pi 4 も公式にサポートされている
- **ただし、Stable Channel で Update を受けるためにはサブスクが必要 (24EUR)**
  - https://opencollective.com/the-rockstor-project
  - https://rockstor.com/docs/interface/system/update_channels.html#stable-channel

# HW
- 今回は、じゃんぱらで安く入手した Dell Wyse5070 を使う
  - CPU: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz
  - Mem: 8GB (4GBx2)
    - Toshiba KKN2NM-MIE
    - SK_Hynix HMA851S6DJR6N-XN
  - Storage: 128GB (SATA SSD)
    - Sandisk SD9SN8W-128G

# Install 
- https://rockstor.com/docs/installation/install.html 
1. .iso (openSUSE Leap15.6) ダウンロード
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/402ef052-2854-4698-a836-a31ed5350bb9.png)
   - https://rockstor.com/dls.html
   - カスタムする場合は https://github.com/rockstor/rockstor-installer 参照 
1. Rufus で USB ディスク作成
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/e9fdf590-c3d7-4a04-b495-a8c56f7c7de4.png)
     - デバイス名は使いまわしているため
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/bfbe9232-1eb0-44f7-8113-6b902ff75f44.png)
     - **ここで必ず DD イメージモードを選択する**
3. USB Boot
   - SecureBoot が Enabled かつ、SecureBoot Mode が Deplyed Mode の場合、`Operating System Loader failed signature verification. WARNING: The file may have been tampered with` と表示されて Boot できない可能性がある
   - 上記の場合、SecureBoot を Disabled にするか、SecureBoot Mode を Audit Mode に設定する
4. Menu が表示されるので、`Install Rockstor-Leap15.6-generic` を選択
   - ![IMG_4195 (カスタム).JPG](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/f922e3a3-eae3-43f1-a56c-3a09c3a089fc.jpeg)
5. インストールを進める
   1. Select Instllation Disk
   2. Select system locale
   2. Select keyboard layout
   2. License Agreement
   2. Select time zone
   2. Enter root password
   2. Confirm root password
   2. 以降インストールが進行してログインプロンプトが表示される。その後 `[  OK  ] Finished Rockstor bootstrapping tasks.` が表示されるまで待つ
      - このブートメッセージが表示されると WebUI にアクセスできるようになる

# Configuration
6. WebUI にアクセス
6. 初回セットアップを行う
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/1490b6e7-42b0-4c19-8118-6010e3b8cc66.png)
7. NTP 有効化
   1. 左メニュー or 右上のメニューの `System` から `NTP` を ON
   1. `ntp.nict.jp` をセット
8. Disk 初期化
   1. 左メニュー or 右上のメニューの `STORAGE > Disks` を選択 
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/b63133ac-9f39-4536-969b-195853b23094.png)
   2. 必要なディスクの歯車マークをクリック
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/3779c2cf-3bfa-4139-824a-29ca925b98af.png)
   3. Select Partition to use (filesystem) で `Whole Disk (None) - active` を選択
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/162f92b5-24fe-4db2-af4a-1b672873ba07.png)
   4. エラーが出たら SSH で接続して強制的にフォーマットする
      - ![Screenshot 2025-02-22 at 07-30-03 Rockstor.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/11a9b18d-5598-4c30-8fd7-4294e0c88b57.png)
      - **SSH は root ユーザで行う**
      ```sh
      rockstor:~ # /usr/sbin/wipefs -af       /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0\:0
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffbf000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffbe000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffbd000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffbc000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffbb000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffba000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb9000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb8000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb7000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb6000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb5000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb4000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffb3000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_34518000263E-0:0: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
      
      rockstor:~ # /usr/sbin/wipefs -af       /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0\:0
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffbf000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffbe000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffbd000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffbc000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffbb000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffba000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb9000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb8000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb7000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb6000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb5000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb4000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffb3000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Kuroutoshikou_GW3.5AM-SU3G2P_3651800002A3-0:0: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
      
      rockstor:~ # /usr/sbin/wipefs -af       /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0\:0
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffbf000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffbe000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffbd000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffbc000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffbb000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffba000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb9000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb8000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb7000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb6000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb5000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb4000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffb3000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AB-0:0: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
      
      rockstor:~ # /usr/sbin/wipefs -af       /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0\:0
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffbf000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffbe000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffbd000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffbc000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffbb000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffba000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb9000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb8000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb7000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb6000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb5000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb4000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffb3000 (zfs_member): 0c b1 ba 00 00 00 00 00
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
      /dev/disk/by-id/usb-Logitec_LGB_USB_Device_18130000000013AC-0:0: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
      ```
   5. wipefs の結果を反映させるため、再起動する
   5. `?` になっていれば OK
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/13b41fca-64b5-4faf-b9c0-3475988ea72e.png)
8. Pool 作成
   1. 左メニュー or 右上のメニューの `STORAGE > Pools` を選択
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/2fb62f7d-fc9c-46ae-9bc5-5c8a8f4844e5.png)
   2. `Create Pool` 選択
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/c3b1bde9-54f5-4046-8d15-c32423e542d2.png)
   3. オプションとディスクを選択して `Submit`
      - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/47809113-ab35-4839-8984-91cee2459663.png)
   4. Rockstor の場合、`Pool = Volume` なので作成終了
      - https://rockstor.com/docs/interface/storage/pools-btrfs.html#pools
   5. マウントされているのは `/mnt2` 以下
      ```sh
      rockstor:~ # lsblk
      NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
      sda            8:0    0 119.2G  0 disk 
      ├─sda1         8:1    0     2M  0 part 
      ├─sda2         8:2    0    64M  0 part /boot/efi
      ├─sda3         8:3    0     2G  0 part [SWAP]
      └─sda4         8:4    0 117.2G  0 part /var
                                             /usr/local
                                             /tmp
                                             /srv
                                             /root
                                             /opt
                                             /home
                                             /boot/grub2/x86_64-efi
                                             /boot/grub2/i386-pc
                                             /.snapshots
                                             /
      sdb            8:16   0  14.6T  0 disk /mnt2/backup
      sdc            8:32   0  14.6T  0 disk 
      sdd            8:48   0  14.6T  0 disk 
      sde            8:64   0  14.6T  0 disk 
      sdf            8:80   1  14.4G  0 disk 
      ├─sdf1         8:81   1 830.5M  0 part 
      └─sdf2         8:82   1    20M  0 part 
      mmcblk0      179:0    0  14.7G  0 disk 
      mmcblk0boot0 179:8    0     4M  1 disk 
      mmcblk0boot1 179:16   0     4M  1 disk 
      
      rockstor:~ # mount
      /dev/sda4 on / type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=258,subvol=/@/.snapshots/1/snapshot)
      devtmpfs on /dev type devtmpfs (rw,nosuid,size=4096k,nr_inodes=983499,mode=755,inode64)
      tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
      devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
      sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
      securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
      cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
      pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
      efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
      bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
      proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
      tmpfs on /run type tmpfs (rw,nosuid,nodev,size=1590720k,nr_inodes=819200,mode=755,inode64)
      systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=20720)
      hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
      mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
      debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
      tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
      fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
      configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
      /dev/sda4 on /.snapshots type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=257,subvol=/@/.snapshots)
      /dev/sda4 on /boot/grub2/i386-pc type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=266,subvol=/@/boot/grub2/i386-pc)
      /dev/sda4 on /boot/grub2/x86_64-efi type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=267,subvol=/@/boot/grub2/x86_64-efi)
      /dev/sda4 on /home type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=259,subvol=/@/home)
      /dev/sda4 on /opt type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=260,subvol=/@/opt)
      /dev/sda4 on /root type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=261,subvol=/@/root)
      /dev/sda4 on /srv type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=262,subvol=/@/srv)
      /dev/sda4 on /tmp type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=263,subvol=/@/tmp)
      /dev/sda4 on /usr/local type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=265,subvol=/@/usr/local)
      /dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
      /dev/sda4 on /var type btrfs (rw,noatime,ssd,discard=async,space_cache,subvolid=264,subvol=/@/var)
      tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=795356k,nr_inodes=198839,mode=700,inode64)
      /dev/sdb on /mnt2/backup type btrfs (rw,relatime,compress=zstd:3,space_cache=v2,subvolid=5,subvol=/)
      tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
      ```


# SSH Configuration
- デフォルトでは SSH できるのが root ユーザだけなので、ユーザを追加する
- `/etc/ssh/sshd_config` の `AllowUsers` を変更
   ```diff
   --- /etc/ssh/sshd_config.bak    2025-02-22 08:06:34.886955074 +0900
   +++ /etc/ssh/sshd_config        2025-02-22 08:06:50.279015542 +0900
   @@ -130,4 +130,4 @@
    #      ForceCommand cvs server
    ###BEGIN: Rockstor SFTP CONFIG. DO NOT EDIT BELOW THIS LINE###
    Subsystem      sftp    internal-sftp
   -AllowUsers root
   +AllowUsers root uyiromo
   ```
- 変更したら Reboot

## メール通知
- 今回は Discord の Channel に送る
  - https://github.com/uyiromo/postfix-discord

1. 左メニュー or 右上のメニューの `System` から `Email Alerts` を 選択
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/c34a995f-44ac-434f-8416-56ed0c0a95c4.png)
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/cc8ae687-37ba-46a8-baf2-2b922a09b1d0.png)
2. `Add an email account` 選択
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/6b6ef645-de42-4b9f-8753-8bf622f9a35c.png)
3. SMTP 設定を入力
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/c2d932ae-88c1-47b8-a9f7-ecae731bf3a0.png)
 4. `Test current SMTP params` をクリック
    - `SMTP Authentication was successfull Submit your settings` が表示されれば OK (**この時、テストメールは送信されない**)
    - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/5578de8f-a753-44ad-9d7a-51e5d63b25b7.png)
5. `Submit` で保存
6．Email Alerts の画面に戻って来るので、Actions の紙飛行機のアイコンをクリックしてテスト
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/24640022-7124-483f-a270-1c582ca4b630.png)
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/b1d6037d-70be-4d94-83bf-a13fe864c5a3.png)
   - Discord 側のイメージ
     - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/55982034-ac78-4864-ad6b-28fbd6127bbc.png)

# Network I/F の設定
- 1 GbE の他に 2.5 GbE を USB 経由でつなげるのでその設定
1. 左メニュー or 右上のメニューの `System` から `Network` を 選択
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/80a8c83b-4d3f-4782-bd11-a50c038693ef.png)
2. 変更したいアダプタの✏️を選択
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/9142573b-1f3d-4cc2-98a0-9c7863aa2ba8.png)
3. `Config Method` を `Manual` にして必要事項を入力して `Submit`
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/b28b1c3c-c166-4171-b38e-68112aa8d554.png)


# 終了
- Dashboard に飛ぶたびに Popup 出てくるのはしつこいと思う
   - ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/e515a6b0-fb17-4a5a-900e-d1e922205929.png)