My chainstate folder got corrupted twice for no reason when launching bitcoind. I am not sure if it's because my external SSD was formatted to exFat or because I am also running a samba server pointing to that drive. I am running Ubuntu Server 20.04.1 and I followed
this guide.
bitcoind should not care which filesystem is underlying the folder. If you pointed bitcoin's folder to some other partition, then there is either a problem with the way the filesystem was made, or, like this guide is doing, you're symlinking the folder from filesystem to another and it's giving the read/write system calls hiccups.
If it's the latter, and it probably is if other folders on that filesystem are getting corrupted too, then the ext4 filesystem was made on the wrong device. You should be making it on one like /dev/sda1 or sda2, not /dev/sda (which is reserved for the partition table on-disk).
For reference, this is the correct way to format a disk and create an ext4 filesystem on the first partition of a disk.
$ sudo fdisk /dev/sda
Command (m for help): n
You’ll be prompted to enter the partition number. Hit “Enter” to use the default value (1):
Partition number (1-128, default 1):
Next, the command will ask you to specify the first sector. Generally it is always recommended to use the default values for the first value. Hit “Enter” to use the default value (2048):
First sector (2048-500118158, default 2048):
On the next prompt, you’ll need to enter the last sector. You can use an absolute value for the last sector or relative value to the start sector, using the + symbol following by the partition size. The size can be specified in kibibytes (K), mebibytes (M), gibibytes (G), tebibytes (T), or pebibytes (P).
Enter +100G to set the partition size to 100 GiB:
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-500118158, default 500118158): +100G
Created a new partition 1 of type 'Linux filesystem' and of size 100 GiB.
...
Save the changes by running the w command:
The command will write the table to disk and exit the fdisk menu.
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
The kernel will read the device partition table without the need to reboot the system.
...
$ sudo mkfs.ext4 -F /dev/sda1
Alternatively, you may use some other partitioning utility besides fdisk such as
gparted. Adjust the instructions accordingly.
Your samba share is for all purposes unknown to bitcoind and so should not be related to this problem.
I ended up splitting my SSD into two separate partitions (exFat and ext4). I need to keep the exFat one because I want to be able to occasionally use that SSD with my Windows laptop on the go. Now, I am trying to figure out how to force RaspiBlitz to mount and use only the ext4 partition. The automatic installer insists on making one large partition, so I can't proceed with the installation.
Perhaps you can create a docker container and pass the mount point of your ext4 partition as a volume and install raspiblitz inside that? Then it will only be able to see the ext4 partition.