Git Product home page Git Product logo

zcow's Introduction

zcow

Manages temporary zram backed COW (Copy On Write) devices. zcow uses Device Mapper to combine a zram device and the origin device, such that unchanged blocks are read from the origin device and written blocks are stored in the zram device.

Dependencies

  • Linux
  • bash
  • udevadm
  • dmsetup
  • zramctl

Synopsis

Create a zram device for /dev/sda4:

$ zcow create /dev/sda4

Create a zcow device for /dev/sda4, but with the custom name foo:

$ zcow create /dev/sda4 foo

List all zcows:

$ zcow
sda4	/dev/sda4	/dev/zram0
foo	/dev/sda4	/dev/zram1

Get info about the zcow named foo:

$ zcow info foo
Origin:	/dev/sda4
COW:	/dev/zram1

NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle       100M   0B    0B    0B       8 

Remove the zcow named foo:

$ zcow destroy foo

systemd

Register a systemd unit that manages a zcow device for /dev/sda4:

$ sudo systemctl enable zcow@/dev/sda4

Install

wget -O zcow-0.1.0.tar.gz https://github.com/postmodern/zcow/archive/v0.1.0.tar.gz
tar -xzvf zcow-0.1.0.tar.gz
cd zcow-0.1.0/
sudo make install

PGP

All releases are PGP signed for security. Instructions on how to import my PGP key can be found on my blog. To verify that a release was not tampered with:

wget https://raw.github.com/postmodern/ruby-install/master/pkg/zcow-0.1.0.tar.gz.asc
gpg --verify zcow-0.1.0.tar.gz.asc zcow-0.1.0.tar.gz

Limitations

  • Cannot work with loopback devices.

  • Cannot mount zcow devices for some unknown reason:

    mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/zcow-test, missing codepage or helper program, or other error.
    

zcow's People

Contributors

postmodern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zcow's Issues

Write tests

Since zcow requires a actual block device that we control, this makes writing tests which are ran in a container or VM somewhat a bit difficult...

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.