Syncthing Cannot Access Folder in HDD

Hi I just bought a Freedombox Pioneer Edition this week, having it plugged into a router at home, and the version is 21.2, flashed from the Pioneer edition weekly image (15-Feb-2021). I connected it with an 1TB HDD via the SATA port, previously formatted with a single ext4 partition, and fired it up.

Following the instruction in this thread, I appended the HDD’s uuid to /etc/fstab: UUID=<the id> /mnt/data ext4 defaults 0 2 and rebooted it and confirmed that it is mounted. I can access and upload files to this folder in HDD via Samba from another PC.

But when I set up Syncthing to sync files from another PC with a folder in this directory it failed:

Failed to create folder marker: mkdir /mnt/data/(folder name)/.stfolder: permission denied
Error on folder “(folder name)” (ofds3-pvytx): folder marker missing

It failed even after I manually made the folder via the terminal in Cockpit. I wonder if anyone knows how to solve it? Is it better for me to instead make the OS boot from the HDD if I wanna take advantage of the HDD"s larger storage?

edited: ok it seems that Syncthing still does not support external storage. Is adding the external volume with a BTRFS file system on the HDD the only viable option?

1 Like

It’s possible to move your system over to the HDD, see the comments:

I don’t know if your device can directily boot from sata. It should be possible to continue using the bootloader on the sdcard to boot into the same btrfs after it migrated to the HDD, though.

BTW: It’s highly recommended not to use a sdcard for the root-filesystem. They break in short time under the write load.

Hi thank you for the guide. I reinstalled the Pioneer edition image on the SD card and formatted HDD with a btrfs partition on it, and I did the following after sudo su -l:

root@freedombox:~# apt install grub2-common
root@freedombox:~# umount /dev/sda1
root@freedombox:~# btrfs replace start -B -f /dev/mmcblk0p2 /dev/sda1 /

But there’s some problem with the grub operations:

root@freedombox:~# update-grub
/usr/sbin/grub-mkconfig: 253: /usr/sbin/grub-mkconfig: cannot create /boot/grub/ Directory nonexistent 
root@freedombox:~# grub-install /dev/sda
grub-install: error: /usr/lib/grub/arm-uboot/ doesn't exist. Please specify --target or --directory.

I rebooted it anyway and it booted successfully. Here is what is shown in the Cockpit’s Storage section after I sudo btrfs filesystem resize max /:

Seems like it’s done. Should I be worried about the error messages in the grub operations?

OK… I originally thought the included high endurance card edited (no that’s a normal SanDisk Eduge SDHC A1 10 32GB card I read it wrongly) could last way longer than a normal sd card for running an OS on it :thinking:

plus, I wonder if the included power supply can provide sufficient power for the lime2 and an HDD connected via the SATA port? Coz I read somewhere from the Olimex froum that it may not …, in comparison with an SSD?

If grub was not installed then your system must be using another bootloader. So there was no need to install grub, and if it didn’t overwrite anything (likely I guess), I think those errors may be ignored and you can just uninstall grub again, in your case.

Since it’s still booting with the bootloader on the sdcard it needs to be plugged of course. Someone else would have to tell if and how it’s possible to install that boot loader to the HDD.

I’m wondering about the umount(Edit: got that one, was your target partition) and the -f that you used, maybe it was because you had formatted the partition before, instead of just adding the empty partition to the btrfs filesystem? The disk replace can be done while the system is running from the btrfs filesystem, no need to unmount or reboot into another system.

That should definitely be the case (hopefully). But did they give you some numbers like guaranteed TBW (terrabytes written)?

Same with the power consumption of the HDD. I don’t know the Olimex device.

yes that -f was added because the partition was already formatted and I was prompted to use that option. I could have simply added an empty partition. I’m still a beginner in using Linux :sneezing_face:

The bootloader being on the SD card is not really a big problem since that’s a spare card anyway. I had a few tests after disk replace. I installed the image on another SD card, and the Freedombox OS in the HDD still could boot, taking precedence over the fresh OS in the sd card. But when I re-installed the Pioneer image onto the HDD and plugged just the HDD, it could not boot.

Was there really less space before? I had to reduce the size to move back, when I tried the btrfs replace, so assumed it would use the entire partition right away.

yes, 29.1 GiB, same as the old partition. And a bunch of unallocated space. That’s why I resized it. Dunno why :thinking: :thinking:

Anyway, thank you! Now I can finally use it for backup and a bunch of stuff :grin:

Oh no, found they added info under “caveats” instead of adding a check and tell or offer to resize it after the replace…

ok… :thinking: :thinking: it would be really great if the way to move the system to SSD/HDD and some other tricks are documented in the Freedombox manual so that other new users know how.

Good to know, that it just works. (Also for recovery.) :slight_smile:

Well, you can contribute to the documentation by editing the wiki. But it involves the command line and it’s already in the issue tracker (including the news from your experience).

Alright lemme dive into the wiki :laughing:

BTW I shall use SSD instead of HDD for, other than the potential power supply issue (the relevant thread about the A20 Lime2 that Freedombox Pioneer is based on, and here), it is faster from my observation.

Sure, concerning your interest in storage topics, maybe you’ll also like to check out the linked issues in this thread.

1 Like