Hi,
I want to move the userdata folder from the internal eMMC to the external USB SSD. This should be an easy task, but I am unable to figure this out where to specify the OpenHAB folders.
I am using the openhab3 Arch Linux package from the AUR. There is a file /etc/default/openhab3
where I can set custom java options. But anything I put there is not being applied to the final karaf command.
For example I tried:
EXTRA_JAVA_OPTS="-Dopenhab.userdata=/srv/storage/openhab3 -Dkaraf.base=/srv/storage/openhab3 -Dkaraf.data=/srv/storage/openhab3"
and the full command line is still with all the defaults:
/usr/lib/jvm/java-11-openjdk/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab3 -Dopenhab.conf=/etc/openhab3 -Dopenhab.runtime=/usr/share/openhab3/runtime -Dopenhab.userdata=/var/lib/openhab3 -Dopenhab.logdir=/var/log/openhab3 -Dfelix.cm.dir=/var/lib/openhab3/config -Djava.library.path=/var/lib/openhab3/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dnashorn.args=--no-deprecation-warning -Dorg.apache.cxf.osgi.http.transport.disable=true -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dopenhab.userdata=/srv/storage/openhab3 -Dkaraf.base=/srv/storage/openhab3 -Dkaraf.data=/srv/storage/openhab3 --add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-module java.base=/usr/share/openhab3/runtime/lib/endorsed/org.apache.karaf.specs.locator-4.3.4.jar --patch-module java.xml=/usr/share/openhab3/runtime/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.4.jar --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=java.security.sasl/com.sun.security.sasl=ALL-UNNAMED -Dkaraf.instances=/var/lib/openhab3/tmp/instances -Dkaraf.home=/usr/share/openhab3/runtime -Dkaraf.base=/var/lib/openhab3 -Dkaraf.data=/var/lib/openhab3 -Dkaraf.etc=/var/lib/openhab3/etc -Dkaraf.log=/var/log/openhab3 -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab3/tmp -Djava.util.logging.config.file=/var/lib/openhab3/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab3/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.3.4.jar:/usr/share/openhab3/runtime/lib/boot/org.apache.karaf.jaas.boot-4.3.4.jar:/usr/share/openhab3/runtime/lib/boot/org.apache.karaf.main-4.3.4.jar:/usr/share/openhab3/runtime/lib/boot/org.apache.karaf.specs.activator-4.3.4.jar:/usr/share/openhab3/runtime/lib/boot/osgi.core-7.0.0.jar:/usr/share/openhab3/runtime/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/usr/share/openhab3/runtime/lib/jdk9plus/jakarta.xml.bind-api-2.3.3.jar:/usr/share/openhab3/runtime/lib/jdk9plus/javax.annotation-api-1.3.2.jar:/usr/share/openhab3/runtime/lib/jdk9plus/jaxb-runtime-2.3.3.jar:/usr/share/openhab3/runtime/lib/jdk9plus/org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:/usr/share/openhab3/runtime/lib/jdk9plus/txw2-2.3.3.jar org.apache.karaf.main.Main
How can I set a different path for the userdata?
- Platform information:
- Hardware: OdroidC4 / 4GB / eMMC / USB-mSATA-SSD
- OS: arch linux
- Java Runtime Environment: OpenJDK Java 11 (1.0.13.u8-1)
- openHAB version: 3.2.0-1