0

I noticed that I am unable to change the StateDirectory of a blockchain to an external hard drive because I believe that systemd only allows relative paths for the StateDirectory option. The reason I want to use an external hard drive is that my service's state is notoriously large. Specifically, I want to use it to store the bitcoin blockchain.

Should I simply forget about using a StateDirectory, or is there some other option? Or, do I have an incorrect concept of how to use StateDirectory entirely?

mpls
  • 101
  • You can mount the filesystem on your external drive to the `StateDirectory` of the service with an fstab entry / mount unit. You might need / want to add the absolute path of the StateDirectory to `RequiresMountsFor` under `[Unit]` of the service. – Tom Yan Aug 21 '21 at 13:19
  • With that said, I have no idea whether `StateDirectory` is really what you need to set to achieve what you want. (I mean, I do not know what it does or what you want to do exactly.) – Tom Yan Aug 21 '21 at 13:22

0 Answers0