OpenWrt Forum Archive

Topic: Any way to recover space on /jffs after failed ipkg install (openvpn)

The content of this topic has been archived on 17 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was attempting to install OpenVPN, via the webif2 interface.  While installing packages, it ran out of space, and bombed.

/jffs was reporting only 26k left.  None of the openvpn packages are listed, when doing 'ipkg list_installed'.  Running the filesystem out of space screwed up ipkg.

So, I attempted to delete some other packages, that I do not need (e.g. ppp, ppoe).  That produced a segfault. sad  Busybox was limping along, at this point.  Occasionally, locking up.  'reboot' from shell wouldn't work.

So I powercycled, and it came back.  This time I tried deleting 'tcpdump', as it doesn't have dependencies.  IT WORKED!  /jffs was down to 85%.  So, then I deleted several ppp/pppoe related packages.  However /jjfs usage remained at 85%.

Prior to the failed openvpn install, I was ~ 60-65%.  So, obviously the remnants of openvpn are still there, but ipkg doesn't know it, and I have no way to clean it up.

Is there a way to recover the space, and clean up the botched openvpn install?  Without going into failsafe and blowing away /jffs?

Regards,
Ben

Apologies for replying to an old post but I have just hit the exact same problem with the same package. I tried a similar solution as well by removing packages I wasn't using but was not able to reclaim the space. 

The router affected was a Asus wl500g with a 2mb /jffs partition.

My solution was simple.  I had already successfully installed openvpn on a Linksys WRT54GS so I pulled of a list of files contained in openvpn and its dependencies (kmod-tun libopenssl zlib liblzo) and deleted them from the wl500g.  It worked and I got the space back. 

It seems to me that ipkg is not handling the situation of installation failures particularly well.  Should it not attempt to remove files from a package when it fails to complete an installation?  Especially if the package is not considered as installed when "ipkg list_installed" is run?  Packages must be either fully installed or not installed with no remnant files left sitting around.  That might be acceptable on a PC with a large hard disk but with such small filesystems has exists on these routers ipkg needs to be ruthlessly efficient about cleaning up after itself.

I found the OP by searching and only after writing the above did I notice that it was posted to the WhiteRussian forum.  Both my routers are running Kamikaze 7.09 so I may be posting in the wrong forum.  It does however suggest that ipkg has had this problem for a while.

Cheers,

Gary

The discussion might have continued from here.