MyRaspberryAndMe

Tinkering with Raspberry (and other things)

Owncloud – Good bye (for now)

10 Comments

Sorry I have been quite for a while, but real life starts to kick in. I changed from freelance projects to a permanent position and that leaves less time for tinkering. (Less home office, more work).

So what is this about discarding Owncloud?

As you may have read I used a Raspberry Pi with lighttpd and Owncloud to manage my own Caldav and Carddav server. This worked fine and reliable until some days ago. I suddenly could not ssh into my server any more and experienced random but numerous synchronization errors. Attaching a monitor and keyboard to check what had happened (never ever put a machine into a shelf in a way that you can’t easily attach a monitor/keyboard…) was the only way to access it.
The log files didn’t produce anything helpful so I checked for the ssh daemon (again: OK) and for better access opted to shut the machine down and do further investigations on my workbench. That was a great mistake…

After shutting down and rebooting all I got was a kernel panic, a corrupt file system and a non-working system. I tried to repair the filesystem on my Linux machine, using fsck. No success, the filesystem was damaged beyond repair. I took a new SD-card and copied a backup of my owncloud installation on it, to get my server up and running again. This worked. For exactly 9 hours. Then I had the exact same boot messages and the exact same corrupt filesystem.

I’m not giving up easily, so I took a third SD card (different manufacturer, different size, different speed class), did the backup thing again and, believe it or not, after one day this card’s filesystem has been corrupted, too.

At the moment I have no idea whatsoever, why my Raspberry Pi “eats” filesystems. On the other hand I need to have my contacts and appointments synced on a handful of devices, so I am in the need of a working caldav/carddav server. That is why I returned to Google. Yes, I know and I am not comfortable with that solution either. But until I have resolved that filesystem issue there seems to be no other way.

Funnily enough (no, not really), my second Raspberry Pi when running Owncloud with lighttpd is corrupting the filesystem at the same speed…

So I now suspect that something in my installation is issuing way too many read/write cycles that quickly “wear out” the SD card. I need to do some further testing on this but that is the only thing I can of think of as the cause.

If anyone of you has experienced the same filesystem corruptions on a Raspberry Pi that is supposed to be running 24/7 please use the comments section for tips and tricks or your findings. Perhaps together we may solve that issue.

Advertisements

10 thoughts on “Owncloud – Good bye (for now)

  1. look forward to hear your solution to the problem. I have a few project where I was thinking about using own cloud, but have a full time job and even expanding a day to a 4-5hr nights has its limitations. Please post when you figure it out. How about a clean install? This may not be related but… when I clone my chips, I use identical chips (I think I purchased about 20 of the same Patriot pros just that I can be consistent), the first boot afted dd if=theimage of=the new chip (this is not the exact syntax, just for ilustration purposes) I have to run a fsck. No idea why. But after second boot life is good. Did not deploy Owncloud yet, but had these weird file system error before, but they went away.

    Hope you resolve it it, but 9 hrs is too short. Can you use the chip elsewhere and store data reliably? (like camera, etc)

    • I think I’ll leave it there… A RW-test of the SD cards showed they were OK and I was even able to retrieve the logfiles from the cards. They didn’t show any unusual entries, nor did I find an unusual amount of RW cycles etc. Even the kernel logs were OK, apart from the kernel panic, that is. But from the files I can’t tell why the thing crashed so badly.

      What bothers me most is that the current Owncloud version (I did a quick fresh install on a Raspberry Pi) is slow. I have the impression that with every new version they are trying to cramp more features into Owncloud to make it a full-featured group collaboration suite, and all I need is a lightweight Carddav/Caldav solution. Tweaking the underlying webserver (fastcgi and so on) did not have any speeding effect at all.

      That said, I am not going to investigate further and will now look into some other Carddav/Caldav solutions that may fit my needs more. Or I just stick with Google. That way there is no need for port-forwarding on my home router (which is always risky) and, for my personal well-being, I do not need to tell “The best wife ever” that I need to reconfigure her phone, tablet etc. yet again because something with the homebrew server solution didn’t work out…

      • Thanks for the comment on the results. Yeah without our wives we would not be able to do all this fun stuff, but think out it, that in a real environment it is the same thing you can keep upsetting people and break productivity. If you find other solution please post. I wonyt be looking into cloud solutions for a month or two. Quite busy too. Needless to say, thank you for sharing the results. I am sure they will halp someone.

        Ed.

  2. OK, here’s an update. As I do only need CalDAV and CardDAV I am currently looking into “Baikal” (https://github.com/jeromeschneider/Baikal), which should be a real lightweight server. No document/photo sharing, just appointments and contacts. Perfect.
    I have not finished a thorough check, but it seems that this might work. It’s PHP-based, a webserver is needed (of course) and there is the usual hustle with creating self-signed SSL-certificates (watch out for Heartbleed-affected library version and install newer ones) and installing them on all devices.

    Yet the problem with a homebrew server is that you need a portforwarding of some kind that could compromise ones router at home. And, as the server needs to be online 24/7 you can’t just switch everything at home off if you’re not there for some time (holiday, work abroad etc.).

    This is going to be a never ending thing…

  3. I’ve got the solution for you..

    My raspberry PI uses Arch Linux with owncloud, though ive not used it 24/7, it cant fuck up my SDcard for some reasons..

    One of the reasons is F2FS filesystem.
    I DO NOT use the / (root) to write logs
    I mounted /var /tmp on USB drives (in case they fuck up, its easy to replace)
    The logs that was going to be written on /etc/ is writte on a symlink at /var.

    This works flawlessly.. my files are wrote on another /home/Media where /media is an external HDD..

    I would recommend you to get an USB hub and try this setting..

    • That is cool. I will give it a try, although I wanted the server to be as lightweight (in terms of hardware, too) as possible.

  4. Couldn’t edit my last post,, this is how my lsblk looks like

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 3.7T 0 disk
    `-sda1 8:1 0 3.7T 0 part /home/user/Media
    sdb 8:16 1 7.3G 0 disk
    |-sdb1 8:17 1 512M 0 part [SWAP]
    `-sdb2 8:18 1 6.8G 0 part /var
    sdc 8:32 1 7.2G 0 disk
    `-sdc1 8:33 1 7.2G 0 part /tmp
    mmcblk0 179:0 0 29.9G 0 disk
    |-mmcblk0p1 179:1 0 90M 0 part /boot
    |-mmcblk0p2 179:2 0 1K 0 part
    `-mmcblk0p5 179:5 0 29.8G 0 part /

    Forgot to mention that i’ve a swap partition on one of the USBS

  5. Hi! I have also managed to wear off one SD card. Turned out that he power supply wore off and dropped the voltage.
    I am guessing both RPis had the same results because you used the same power supply on them.
    Check the voltage on your Pi!
    Oh, and thank you for your OwnCloud manuals. I’m setting this up right now on external HDD. 🙂

    Greets!

    • Hi!
      Thanks for your comment. I’m not sure whether this was a power supply problem or something else. At the moment I suspect it may be caused by too much read/write cycles from OwnCloud logging. Nevertheless, I “outsourced” my OwnCloud to my rented webspace and it is working fine since then.

  6. in my make series pi starter kit from radio shack, it came with a 2 amp power supply and warns about overloading the usb power drain. so I only power everything through a powered usb hub like my usb hdd, and keyboard and mouse.

    raspi and owncloud tips:
    I also set mine up to upload all pi and owncloud log files to my google drive and gmail so I know right away if something is wrong. because I get gmail instantly on my android phone.
    ….. you have to be smarter than what you are working with..