I found out that the script that handles the storage is in /usr/libexec/format_and_set_srv.sh
. These are the key commands:
uci set storage.srv.uuid="$UUID"
uci set storage.srv.old_uuid="rootfs"
uci commit storage
Which result in mounting of the partition, and binding it to /srv/
. Another way to do it is via the LuCI interface and just provide a mountpoint there. And yet another method is to put an entry into /etc/fstab
manually.
Any of these 3 methods work fine. Note that combining the uci
way and the LuCI way results in badness – I experienced that in /srv/www directory deleted after reboot - which resulted in an unintentional double-mount. So just use one of these methods, and you’re good.