storageDriver | A generic Database independent storage driver | Database library

 by   NikosEfthias Go Version: Current License: No License

kandi X-RAY | storageDriver Summary

kandi X-RAY | storageDriver Summary

storageDriver is a Go library typically used in Database applications. storageDriver has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

A generic Database independent storage driver
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              storageDriver has a low active ecosystem.
              It has 5 star(s) with 1 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 6 open issues and 5 have been closed. On average issues are closed in 78 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of storageDriver is current.

            kandi-Quality Quality

              storageDriver has no bugs reported.

            kandi-Security Security

              storageDriver has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              storageDriver does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              storageDriver releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of storageDriver
            Get all kandi verified functions for this library.

            storageDriver Key Features

            No Key Features are available at this moment for storageDriver.

            storageDriver Examples and Code Snippets

            No Code Snippets are available at this moment for storageDriver.

            Community Discussions

            QUESTION

            Can't delete images from a Docker proxy / mirror / cache registry
            Asked 2020-Nov-23 at 16:04

            Running the registry:2 image via docker-compose 1.27.4, docker itself is at 19.03.13.

            The registry is configured as a "pull through cache", also referred to as "proxy" or "mirror" by some. The setup is very basic and follows the official documentation:

            ...

            ANSWER

            Answered 2020-Nov-23 at 16:04

            The pull through cache functionality of the registry:2 image is designed for exactly that, pulling. Any other actions, like push or delete, aren't supported and are expected to give errors. To delete the manifest at the source, you'll want to run the delete command against that registry. I don't believe there's any API to prematurely remove a manifest from only the cache, it's a fixed 7 day expiration time.

            Source https://stackoverflow.com/questions/64931860

            QUESTION

            How to download a big file directly to the disk, without storing it in RAM of a server and browser?
            Asked 2020-Aug-12 at 07:01

            I want to implement a big file downloading (approx. 10-1024 Mb) from the same server (without external cloud file storage, aka on-premises) where my app runs using Node.js and Express.js.

            I figured out how to do that by converting the entire file into Blob, transferring it over the network, and then generating a download link with window.URL.createObjectURL(…) for the Blob. Such approach perfectly works unless the files are small, otherwise it will be impossible to keep the entire Blob in the RAM of neither server, nor client.

            I've tried to implement several other approaches with File API and AJAX, but it looks like Chrome loads the entire file into RAM and only then dumps it to the disk. Again, it might be OK for small files, but for big ones it's not an option.

            My last attempt was to send a basic Get-request:

            ...

            ANSWER

            Answered 2020-Jun-27 at 21:43

            Chrome can't show nice progress of downloading because the file is downloading on the background. And after downloading, a link to the file is created and "clicked" to force Chrome to show the dialog for the already downloaded file.

            It can be done more easily. You need to create a GET request and let the browser download the file, without ajax.

            Source https://stackoverflow.com/questions/62608679

            QUESTION

            What happens to a docker container when I delete its image?
            Asked 2019-Nov-13 at 00:34

            According to the docker documentation the relation between docker image and its respective containers is that the image contains the layers it used during its creation and a container from that image only adds another layer with its modifications. This is depicted bellow

            With that in mind, I thought that deleting an image that has instantiated containers would invalidate them, since they would lose all the layers they depend upon. This theory is enforced by the error message you get when trying to delete an image thas has containers:

            Error response from daemon: conflict: unable to delete dee20bb93b6a (must be forced) - image is being used by stopped container c44b4080aa76

            But for my surprise when I forced the deletion of the image with -f flag and started the container, it just ran. Like that. No errors, no corruption, no missing files. No halt and catch fire. Nothing. It simply ran flawless from the exact state it was before having its image deleted.

            My question is: what just happened? Why didn't the container become invalid?

            ...

            ANSWER

            Answered 2019-Nov-13 at 00:34

            The container is an instantiated instance of the container image. As long as the previously created container exists and is not deleted, it does not have dependencies on the underlying container image.

            Source https://stackoverflow.com/questions/58828646

            QUESTION

            How to fix Docker error "hnsCall failed in Win32: An adapter was not found" when deploying service?
            Asked 2019-Oct-16 at 14:24

            I'm attempting to run a four-node swarm from my host machine, with my machine being the manager, and three Hyper-V VMs as worker nodes. I'm attempting to run a static web page as a service across all nodes, but keep receiving hnsCall failed in Win32: An adapter was not found error on my host machine, and No such image from the VMs (trying to pull the service image from private registry). This happens when deploying a stack or using service create. I can, however, run the static page via container instance and it works fine.

            I followed this guide to set up and create my VMs, which I suspect is where my problem arises. The Virtual Switch that I created via the HyperV Virtual Switch Manager, named thevswitch, is both external and set on the correct adapter. I initialized a swarm using the IPv4 of my host machine under thevswitch for the --advertise-addr flag, and successfully joined the VMs as worker nodes to this IP, while using the driver. Docker doesn't seem to see the virtual switch I created regardless.

            ...

            ANSWER

            Answered 2019-Oct-16 at 14:24

            For anyone who is running into a similar issue:

            The issue was NOT actually network related like these error messages implied. The problem ACTUALLY ended up being that the swarm nodes (but not my host) were all using Linux containers and trying to pull a Windows-only image. They were silently throwing architecture errors -- I only found this out when I tried to pull my image directly from a node. The errors generated while deploying to the whole swarm were highly misleading.

            I did not "fix" this per say. We ended up restructuring our entire solution around this fact, and the situation no longer applies.

            Source https://stackoverflow.com/questions/56366762

            QUESTION

            Files deleted from within /var/lib/docker/aufs/diff/
            Asked 2019-Jul-30 at 15:08

            The Docker docs state:

            Warning: Do not directly manipulate any files or directories within /var/lib/docker/. These files and directories are managed by Docker.

            Let's say someone hasn't read that hint and deleted some files from /var/lib/docker/aufs/diff to free up some disk space. These files didn't live in a Docker volume and are not part of the original Docker image but have been created in the container writable layer. Restarting the given container frees up the disk space but are there any known side effects?

            And for the next time: Does removing that kind of files or directories from within the container (via docker exec .. rm ..) result in a proper removal or are they only marked as deleted? The documentation currently doesn't describe this special case.

            ...

            ANSWER

            Answered 2019-Jul-30 at 15:08

            Restarting the given container frees up the disk space but are there any known side effects?

            As you stated in your question, you should not "manipulate any files or directories within /var/lib/docker/", as any side-effect may appear and no documentation trace anything about this: it's internal Docker plumbing which may highly change other Docker versions, ut's not supposed to be exposed to end-users nor be tempered with. You could look at Docker code for your Docker version and all it's dependencies to understand what happened, but it's not really practical :-)

            are there any known side effects?

            There maybe be side effects - I insist on the may as anything can happen depending on your Docker version and configuration. Even if it may seem to be working, some things may be broken.

            Well known side effect is Docker installation corruption, which may have present itself in various fashions: random container crash, data loss, unexplained bug, etc.

            • Best case scenario, you just discarded some data in your container and everything will work fine in the future.
            • Not-so-good scenario: you actually broke something in your installation and corrupted it, you'll be better of re-installing Docker entirely.

            Does removing that kind of files or directories from within the container (via docker exec .. rm ..) result in a proper removal or are they only marked as deleted?

            Deleting a file in the container will not always remove it from the system, it depends on the drive your are using. Doc has a section about writing files for all of them:

            • AUFS - it seemed implied that file is deleted, AUFS will copy the file from the image layer and work on it, it should then delete the copy

              When a file is deleted within a container, a whiteout file is created in the container layer. The version of the file in the image layer is not deleted [...] Subsequent writes to the same file operate against the copy of the file already copied up to the container.

            • BTRFS - deleted and space reclaimed, doc is quite clear:

              If a container creates a file and then deletes it, this operation is performed in the Btrfs filesystem itself and the space is reclaimed.

            • devicemapper - may not be deleted depending on config:

              if you are using direct-lvm, the blocks are freed. If you use loop-lvm, the blocks may not be freed

            • OverlayFS - seemed implied that file is deleted, but the image file is kept

              When a file is deleted within a container, a whiteout file is created in the container (upperdir). The version of the file in the image layer (lowerdir) is not deleted

            • ZFS - deleted:

              If you create and then delete a file or directory within the container’s writable layer, the blocks are reclaimed by the zpool.

            • VFS is using a copy of the previous layer and work directly in a directory representing that layer, a deletion in the container should probably delete it from the related directory on host machine

            The documentation currently doesn't describe this special case.

            Yes, and it probably won't ;)

            Source https://stackoverflow.com/questions/57267537

            QUESTION

            Workaround for OS X Docker 'Directory renamed before its status could be extracted'
            Asked 2019-Jun-25 at 12:44

            Using Docker Desktop Community 2.0.0.3 on OS X 10.14.5, I've started up an ubuntu image and inside it am running the installer for some arm cross-compilers. This causes a host of errors like:

            tar: ./sysroots/cortexa9hf-neon-poky-linux-gnueabi/etc: Directory renamed before its status could be extracted

            Some googling suggests that this is a common Docker bug, and that a workaround for this is to change the storage driver, e.g. to aufs, but when I try this on a Mac, docker fails to start, with an error referencing graphdriver. And indeed the Docker documentation suggests changing storage driver is not supported on Macs.

            Has anyone found a way to workaround this tar error?

            ...

            ANSWER

            Answered 2019-Jun-25 at 12:44

            In the end I solved this by

            Source https://stackoverflow.com/questions/56715357

            QUESTION

            What does "Thin Pool" in docker mean?
            Asked 2018-Nov-07 at 04:56

            I guess this should be pretty elementary but I've tried to google it and I've read the docker documentation. However, I still can't grasp what exactly does "Thin Pool" mean and the role it plays in the docker world.

            ...

            ANSWER

            Answered 2018-Nov-07 at 04:56

            Short story:

            A thin pool is a storage source that provides on-demand allocation for storage space. It is more or less similar to virtual memory, which provides full address space to every process.

            Long story:

            Fat Provisioning

            The traditional storage allocation method is called "fat" or "thick" provisioning.

            For example, a user claims to use 10G storage space. Fat provisioning then reserves 10G physical storage space for this user even though he/she only uses 1% of it. No one else can use this reserved space.

            Thin Provisioning

            Thin provisioning provides a mechanism of on-demand storage allocation, which allows a user to claim more storage space than has been physically reserved for that user.

            In other words, it enables over-allocation for storage space. Think about RAM's over-commit feature.

            Thin Pool

            Thin pool is a conceptional term which stands for the backing storage source used by thin provisioning. Thin provisioning allocates virtual chunks of storage from thin pool, while fat provisioning allocates physical blocks of storage from the traditional storage pool.

            Thin Pool in Docker

            The Docker Engine can be configured to use Device Mapper as its storage driver. This is where you deal with thin provisioning. According to Docker's documentation:

            Production hosts using the devicemapper storage driver must use direct-lvm mode. This mode uses block devices to create the thin pool.

            Two different spaces of thin pool need to be taken care of: the Metadata space (which stores pointers) and the Data space (which stores the real data). At the very beginning, all the pointers in Metadata space point to no real chunks in the pool. No chunk in data space is really allocated until a write request arrives. This is nothing new if you are familiar with the virtual memory mechanism.

            Let's take a look at the output of docker info:

            Source https://stackoverflow.com/questions/49531525

            QUESTION

            Docker Private Registry on Windows: Service Unavailable
            Asked 2018-Jul-13 at 20:01

            I want to run a private Docker registry on Windows. Since Docker only includes a Linux registry image, I need to create one. However, I'm encountering a very vague error.

            I get the following error when attempting to run a new private docker registry on Windows:

            When visiting the registry service url http://docker_registry:5000/, it throws this error:

            ...

            ANSWER

            Answered 2017-Sep-21 at 04:58

            Docker images are now multi platform: https://blog.docker.com/2017/09/docker-official-images-now-multi-platform/

            There is a Dockerfile for running the registry on Windows. I would recommend avoiding using third party images though. https://hub.docker.com/r/stefanscherer/registry-windows/

            Source https://stackoverflow.com/questions/45829378

            QUESTION

            How file lookup work in Docker container
            Asked 2017-Sep-14 at 18:12

            According to Docker docs, every Dockerfile instruction create a layer, and all the layers are kept when you create new image based on an old one. Then when I create my own image, I might have hundreds of layers involved because of the recursive inherit of layers of base image.

            In my understand, file lookup in container work this way:

            1. process want to access file a, lookup starts from the container layer(thin w/r layer) .
            2. UnionFS check whether this layer have a record for it (have it or marked as deleted). If yes, return it or say not found respectively, ending the lookup. If no, pass the task to the layer below.
            3. the lookup end at the bottom layer.

            If that is the way, consider a file that resides in the bottom layer and unchanged by other layers, /bin/sh maybe, would need going through all the layers to the bottom. Though the layers might be very light-weight, a lookup still need 100x time than a regular one, noticeable. But from my experience, Docker is pretty fast, almost same as a native OS. Where am I wrong?

            ...

            ANSWER

            Answered 2017-Sep-14 at 11:23

            This is all thanks to UnionFS and Union mounts!

            Straight from wikipedia:

            It allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system.

            And from an interesting article:

            In the kernel, the filesystems are stacked in order of their mount sequence, the first mounted filesystem is at the bottom of the mount stack, and the latest mount is at the top of the stack. Only the files and directories of the top of the mount stack are visible. With union mounts, directory entries from the lower filesystems are merged with the directory entries of upper filesystem, thus making a logical combination of all mounted filesystems. Files with the same name in a lower filesystem are masked, as the upper one takes precedence.

            So it doesn't "go through layers" in the conventional sense (e.g one at a time) but rather it knows (at any given time) which file resides on which disk.

            Doing this in the filesystem layer also means none of the software has to worry about where the file resides, it knows to ask for /bin/sh and the filesystem knows where to get it.

            More info can be found in this webinar.

            So to answer your question:

            Where am I wrong?

            You are thinking that it has to look through the layers one at a time while it doesn't have to do that. (UnionFS is awesome!)

            Source https://stackoverflow.com/questions/46213821

            QUESTION

            How to browse the contents of a docker/btrfs container-specific layer
            Asked 2017-Jun-09 at 17:04

            I have read, and I believe understood, the docker pages on using btrfs, and notably this one

            My question is rather simple, I would need to be able to navigate (e.g. using cd and ls, but any other means is fine) in what the above link calls the Thin R/W layer attached to a given container.

            The reason I need this is, I use an image that I have not built myself - namely jupyter/scipy-notebook:latest - and what I can see is that each container starts with a circa 100-200 Mb impact on overall disk usage, even though nothing much should be going on in the container.

            So I suspect some rather verbose logs get created that I need to silent down a bit; however the whole union fs is huge - circa 5Gb large - so it would help me greatly to navigate only the data that is specific to one container so I can pinpoint the problem.

            ...

            ANSWER

            Answered 2017-Jun-09 at 17:04

            To list the files that are changed/stored since the original image use

            Source https://stackoverflow.com/questions/44395134

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install storageDriver

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/NikosEfthias/storageDriver.git

          • CLI

            gh repo clone NikosEfthias/storageDriver

          • sshUrl

            git@github.com:NikosEfthias/storageDriver.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link