Code Monkey home page Code Monkey logo

Comments (9)

jbonhag avatar jbonhag commented on June 30, 2024

Thanks for the note -- I'm checking this out now.

from db2-docker.

jbonhag avatar jbonhag commented on June 30, 2024

So, now for some reason the initial setup fails for me, whereas before setup would finish but the database wouldn't start.

Removing sysctl -w kernel.shmmax=18446744073709551615 shouldn't affect that, though, because it didn't run until after the initial build.

At what point does the build break on your machine?

from db2-docker.

rjminsha avatar rjminsha commented on June 30, 2024

The first sign of an error was found when trying to start a newly created instance with db2start:
$ db2start
SQL1042C An unexpected system error occurred

Here is an explanation from a member of the DB2 team (my knowledge in this space is pretty limited).
A couple of flags to the open Unix system call are disabled on AUFS to enforce copy on write. DB2 happens to use one of those flags when running instances, specifically O_DIRECT. Although installation is possible on AUFS, creating and using a DB2 instance is not.

The root cause of the error was due to the failure of an open call with O_DIRECT supplied as one of the flags. The fix is to mount a Docker volume to the DB2 instance's home directory. The volume will have a ext4 filesystem, one that readily accepts calls to open with O_DIRECT specified.

from db2-docker.

rieske avatar rieske commented on June 30, 2024

Another solution to this problem is to switch the docker storage backend from AUFS to devicemapper:
http://muehe.org/posts/switching-docker-from-aufs-to-devicemapper/

I was initially using a dated RHEL box as a host system which apparently had devicemapper as default storage backend. When hosting this image on a recent Ubuntu system, I experienced the same issue and the fix was either to use an externally mounted volume or switch to devicemapper.

from db2-docker.

jbonhag avatar jbonhag commented on June 30, 2024

So, is this more of a Docker issue than an issue with this particular container? Can we include either fix in the Dockerfile?

from db2-docker.

rjminsha avatar rjminsha commented on June 30, 2024

I have not dug further into this over the past week or so but so far all I have found are solutions that are containable within the dockerFile. Perhaps there are startup options with DB2 that can be explored. I think this is a good topic for the docker-dev IRC.

from db2-docker.

jbonhag avatar jbonhag commented on June 30, 2024

After doing a little more testing (whew, has it been two months already?!?!) I agree with @rieske that the solution is to switch the Docker backend. I don't know if you can switch the backend per-Dockerfile. I'm using boot2docker at the moment and it looks like it's a one-or-the-other decision.

This seems to confirm that DB2 is picky about its filesystem: http://xcoolwinds.wordpress.com/2013/05/20/db2-doesnt-start-on-linux/

from db2-docker.

deeky666 avatar deeky666 commented on June 30, 2024

Btw if you do not want to switch to devicemapper, you can also use btrfs storage backend which is probably a much better alternative (had many problems with devicemapper).
A pretty easy and good tutorial can be found here: https://meta.discourse.org/t/rough-notes-getting-btrfs-working-on-digital-ocean/20246
Hope this helps.

from db2-docker.

jbonhag avatar jbonhag commented on June 30, 2024

@deeky666 Appreciate it!

from db2-docker.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.