Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thrawn01/scrub-snapshot


https://github.com/thrawn01/scrub-snapshot

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# == Test Instructions ==

# If clean up is needed from a previous test
sudo lvremove /dev/volume/original -ff
sudo pvremove /dev/sdb -ff
# ----------

# Write NULL's to the first 100M on the disk
sudo ./write.py /dev/sdb 0 25600

# Create a physical Volume of 100M on /dev/sdb
sudo pvcreate /dev/sdb --setphysicalvolumesize 100M

# Create a Volume Group called 'volume'
sudo vgcreate volume /dev/sdb

# Create a volume called 'original'
sudo lvcreate -L8M -n original volume

# Write 65's char(A) to the entire volume
sudo ./write.py /dev/volume/original 65 2048

# Make a snapshot
sudo lvcreate -L8M -s -n backup /dev/volume/original

# Write 66's char('B') to the first 5 sectors using direct IO
# Avoid using buffered IO, or the data will not show in the cow imediatly
sudo ./write.py /dev/volume/original 66 5

# See what is in the COW (Should be 5 exceptions in the cow)
# -d skips the scrub, and simply counts the exceptions
sudo ./scrub-snapshot.py /dev/volume/backup -d -vv

# Scrub the snapshot
sudo ./scrub-snapshot.py /dev/volume/backup -v