How to mount /var from mSATA?

This is question especially for @quietsche who claims success in mounting /var partition from external drive. I’ve tried the same, defined /var in /etc/config/fstab but the only thing I got was inaccessible router due to late mounting, where part of state files has been already written into the tmpfs and then they were missing from the mounted drive.

So, what is the trick to make it work?

My advice, format a new var partition on your new drive, and mount it over the existing one.

Changed all /var writing progs to /static/var, did a copy of running /var to a premounted /static/var, edited /etc/config/fstab, removed /var, created symlink from /static/var to /var. Reboot. Profit. (That should do the trick, but don’t remember exactly, changed a lot and play around, especially with move of /tmp)

root@kukuzi:~# grep -B 3 static /etc/config/fstab
config mount
      option enabled '1'
      option uuid 'xxxxxxx-xx-xxxx-xxxx-xxxxxxxxxxxx'
      option target '/static'
root@kukuzi:~# mount | grep static
/dev/sda1 on /static type btrfs (rw,relatime,ssd,noacl,space_cache,subvolid=5,subvol=/)
root@kukuzi:~# ls -ld /var
lrwxrwxrwx    1 root     root            12 Nov 25 10:53 /var -> /static/var/