Issues with the drivers from 'linux-firmware' for the on-board Intel 82579LM NIC, using Realtek RTL8169 instead.
SSH into your system, switch to root user with su -
# as root:
apt-get update
apt-get upgrade -y
# install basic utilities:
apt-get install atop htop iftop curl net-tools sudo wget vim
# confirm, proceed installing software
apt-get install python3-pip git ufw
# install build dependencies - lots of packages...
apt-get install build-essential -y
apt build-dep linux
Enumerate all disks with lsblk, you should see:
root@antares:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 7.3T 0 disk
sdb 8:16 0 29.8G 0 disk
sdc 8:32 0 465.8G 0 disk
└─sdc1 8:33 0 465.8G 0 part
sdd 8:48 0 465.8G 0 disk
└─sdd1 8:49 0 465.8G 0 part
sde 8:64 0 465.8G 0 disk
├─sde1 8:65 0 512M 0 part /boot/efi
├─sde2 8:66 0 464.3G 0 part /
└─sde3 8:67 0 976M 0 part [SWAP]
nvme1n1 259:0 0 238.5G 0 disk
nvme0n1 259:1 0 13.4G 0 disk
Good, all drives present are enumerated (NOTE: one data drive is in RMA so normally there should be one more 8TB disk)
Because we use bcachefs, we need to address those drives by their device IDs, otherwise fstab cannot handle the GUID entries, it does not “know” bcachefs yet. To get the device ID-s, go to /dev/disk/by-id/, as you can see these paths are just symlinks to the /dev/<block_devices>
For the other devices formatted to btrfs we can use the UUID entries, see /dev/disk/by-uuid.
Make a note of the devices (purple highlight is for the bcachefs drives where we actually need the ID):
| /dev/disk/by-id/ | lsblk | Make, purpose |
|---|---|---|
| ata-ST8000VN004-2M2101_WSD3LGMB | /dev/sda | 8TB Seagate, solely for NextCloud data volume |
| ata-SanDisk_SDSA6DM-032G-1006_145039400579 | /dev/sdb | 30GB mSATA for DB volumes |
| ata-WDC_WD5000AAKS-00YGA0_WD-WCAS81679298 | /dev/sdc | old 500 GB for backups |
| ata-ST3500413AS_Z2A7ZX37 | /dev/sdd | old 500 GB for backups |
| ata-WDC_WDS500G1R0B-68A4Z0_194650800645 | /dev/sde | system disk, Seagate |
| nvme-INTEL_HBRPEKNX0101A_BTTE00151R5H256D-1 | nvme1n1 | 256GB Optane disk for bcachefs caching, not in RAID |
| nvme-INTEL_MEMPEK1J016GAL_BTBT84921Z16016N | nvme0n1 | 16GB Optane disk for docker container Logs |
asdfasdf
Now we know the device ID-s, but before formatting the drives to bcachefs we need a custom kernel that supports it. This is a large topic which deserves it's own page.
Once you are done, reboot into your new kernel, double-check you are on then new kernel
uname -a
Linux antares 6.1.0+ #3 SMP PREEMPT_DYNAMIC Wed Dec 28 04:35:18 GMT 2022 x86_64 GNU/Linux
Assuming compiling the kernel and the bcachefs-tools.deb was successful, simply install the .deb file:
root@antares:~# cd
cd /home/shrew/kustomkernel/
apt-get install ./bcachefs-tools_1.0.8-2~bpo8+1_amd64.deb
Now we need the device by-id numbers from Point 02.
then following the documentation we can create the bcachefs
NOTE: normally there would be 2 HDDs but one is faulty and it is in RMA, will be replaced soon (data replicas =2);
bcachefs format \
--label=ssd.optane /dev/disk/by-id/nvme-INTEL_HBRPEKNX0101A_BTTE00151R5H256D-1 \
--label=hdd.disk2 /dev/disk/by-id/ata-ST8000VN004-2M2101_WSD3LGMB \
--data_replicas=1 --metadata_replicas=1 \
--promote_target=ssd --foreground_target=ssd --background_target=hdd
aaaand that's it! Now just mount it to confirm you have a bcachefs filesystem just run
mkdir /mnt/bcachefs
mount -t bcachefs /dev/disk/by-id/ata-ST8000VN004-2M2101_WSD3LGMB:\
/dev/disk/by-id/nvme-INTEL_HBRPEKNX0101A_BTTE00151R5H256D-1 /mnt/bcachefs/
# to confirm it works:
bcachefs fs usage /mnt/bcachefs/
to test that everything works copy/rename/delete some files and dirs
as root:
echo -e 'raid1\nbcachefs\nbtrfs' >> /etc/initramfs-tools/modules
update-initramfs -u
vim /etc/fstab
/dev/disk/by-id/nvme-INTEL_HBRPEKNX0101A_BTTE00151R5H256D-1:/dev/disk/by-id/ata-ST8000VN004-2M2101_WSD3LGMB /mnt/bcachefs/ bcachefs defaults 0 0
UUID=7d9ae627-78f9-4bad-a207-93c134dcab04 /media/btrfsraid1 btrfs defaults 0 0
/dev/disk/by-id/nvme-INTEL_HBRPEKNX0101A_BTTE00151R5H256D-1:/dev/disk/by-id/ata-ST8000VN004-2M2101_WSD3LGMB /mnt/bcachefs/ bcachefs defaults 0 0
experiments: