openhab-syno-spk icon indicating copy to clipboard operation
openhab-syno-spk copied to clipboard

problem uninstalling openHAB2

Open Curio84 opened this issue 6 years ago • 9 comments

Hello,

i use openHAB-2.4.0.001-syno-noarch-0.001.spk. I have a problem uninstalling Openhab2. I get the following error message: "The package was successfully uninstalled. Stop TMPFS was Failed, check TMPFS log in '/var/services/homes/openhab '. " The user "openhab" and the folder /homes/openhab were not deleted. How can I solve the problem?

Thanks for your help, Curio

Curio84 avatar Feb 05 '19 10:02 Curio84

Can you look here: /var/services/homes/openhab the TMPFS log file? And can you delete the openhab user manually (in the WebGUI)?

cniweb avatar Feb 06 '19 20:02 cniweb

I had same problem. After googleling for about 2hours i found this one ... Best thing is you enter the synology with putty. Enalble SSH login in the synology first. Login via putty (take care that you have correct port. Standart is 2811 Enter as admin with you synology password sudo -i then again you password and you are logged in as root.

Do df -h Then you will get a

thereafter you will get a list

root@Hypothalamus:/volume1/homes# df -h Filesystem Size Used Avail Use% Mounted on /dev/md0 2.4G 994M 1.3G 44% / none 348M 0 348M 0% /dev /tmp 350M 1.2M 349M 1% /tmp /run 350M 3.1M 347M 1% /run /dev/shm 350M 4.0K 350M 1% /dev/shm /dev/vg1000/lv 913G 1.2G 912G 1% /volume1 none 20M 0 20M 0% /volume1/homes/test/tmpfs

then you can see last entry is what you looking for.....

umount /volume1/homes/test/tmpfs

then again df -h

I think you have to do it for three archives .... rm: cannot remove ‘openhab/tmpfs’: Device or resource busy rm: cannot remove ‘openhab/userdata/logs’: Device or resource busy rm: cannot remove ‘openhab/userdata/persistence’: Device or resource busy and thereafter you can delete all archive with rm

thats it... Regards Dennis

Dennis1108 avatar Mar 21 '19 00:03 Dennis1108

I had to

  • remove the user in the Synology web UI
  • restart the server
  • use @Dennis1108 's solution to unmount the folders in the openhab user's home (even if df -h no longer listed them)

petermorlion avatar Mar 22 '19 19:03 petermorlion

@petermorlion can you build a script for this procedure? Then I can integrate it on the uninstall mechanism for the synology uninstall process. Thanks!

cniweb avatar Apr 04 '19 05:04 cniweb

@cniweb tricky, I'm not sure my knowledge reaches this far. What would be the preferred way of executing a script after rebooting? A cron job (that then also removes the cron job after it has executed)?

petermorlion avatar Apr 04 '19 11:04 petermorlion

@petermorlion The question is, why a reboot is necessary? Maybe a kill of the process is enough?

cniweb avatar Apr 08 '19 20:04 cniweb

Hm, possibly. Though I have no way of knowing, as I have now already updated to 2.4.0. :(

petermorlion avatar Apr 09 '19 07:04 petermorlion

This does the job, your path may differ:

1 stop package 2 open putty and logon to server 3 umount /volume1/homes/openhab/tmpfs 4 rm -r /volume1/homes/openhab/tmpfs 5 umount /volume1/homes/openhab/userdata/logs 6 rm -r /volume1/homes/openhab/userdata/logs 7 umount /volume1/homes/openhab/userdata/persistence 8 rm -r /volume1/homes/openhab/userdata/persistence

beinaendi avatar Apr 09 '20 15:04 beinaendi

Also make sure to delete those startup scripts left behind:

/usr/local/etc/rc.d/openHAB-*.sh

And there's more...

./sys/fs/cgroup/memory/pkgctl-openHAB
./sys/fs/cgroup/cpuacct/pkgctl-openHAB
./usr/syno/etc/packages/openHAB

sreuter avatar Nov 30 '20 11:11 sreuter