1. Prerequisites - Pro-Tweaker/SEEDbox GitHub Wiki

Disk(s) Partitioning

Main or first disk

The configuration of the first disk is easily done through the web interface of the cloud provider.

Filesystem Mount Point Size
1 ext4 /boot 1 Gio
2 ext4 / 25 Gio
3 Swap swap 512 Mio
4 ext4 /mnt/data1 1.8 Tio

Extra Disks

For each additional disk, we will create a partition, format it, and mount it.

To list all the disks and their partitions, use the command lsblk

For each extra drives:

  • Start the fdisk utility with the device name:
    fdisk /dev/sdx
    
  • At the fdisk command prompt, press n to create a new partition. You will be asked to choose whether you want to create a primary or extended partition. Press p for primary or e for extended.
  • Next, specify the partition number (e.g., 1 for the first partition).
  • Define the starting and ending sectors for the partition. You can simply press Enter to use the default values and use the entire available space.
  • Apply the change to the partition table with the w command.
  • Format the newly created partition with and take note of the newly created filesystem UUID:
    mkfs -t ext4 /dev/sd{a-b-c}1
    
  • Create a mounting point folder for the new partition:
    mkdir -p /mnt/data{1-2-3}
    
  • Add the new partition and mounting point folder to the /etc/fstab file, use the UUID you noted when formatting the partition:
    UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx       /mnt/data{1-2-3}      ext4    defaults        0       0
    
  • Reboot

Final Partition Table

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0  1.8T  0 disk 
├─sda1   8:1    0    1G  0 part /boot
├─sda2   8:2    0   25G  0 part /
├─sda3   8:3    0  512M  0 part [SWAP]
├─sda4   8:4    0    1K  0 part 
├─sda5   8:5    0  1.8T  0 part /mnt/data1
└─sda6   8:6    0  1.9M  0 part 
sdb      8:16   0  1.8T  0 disk 
└─sdb1   8:17   0  1.8T  0 part /mnt/data2
sdc      8:32   1  1.8T  0 disk 
└─sdc1   8:33   1  1.8T  0 part /mnt/data3

Installing MergerFS

The mergerfs utility is a union filesystem tool that can logically merge multiple partitions into a single, unified view.

  • Install the mergerfs package:
    apt update && apt -y install mergerfs
    
  • Create a mounting point folder for the union filesystem:
    mkdir -p /mnt/storage
    
  • Add the union filesystem and mounting point folder to the /etc/fstab file:
    /mnt/data* /mnt/storage fuse.mergerfs  defaults,nonempty,allow_other,use_ino,cache.files=partial,moveonenospc=true,category.create=mfs,dropcacheonclose=true,minfreespace=250G,fsname=mergerfs 0 0
    
  • Reboot

Required Packages

Install the minimal required packages to use the SEEDbox playbook:

apt update && apt install -y git python3 python3-pip python3-passlib python3-lxml python3-pbkdf2 ansible
# optional
apt update && apt install -y python-is-python3 

Now, let’s install the Docker collection from Ansible Galaxy, which provides many useful modules for managing Docker resources:

ansible-galaxy collection install community.docker

Checking Ansible Install

ansible --version  
ansible --version | grep "python version"