From Fedora Project Wiki

No edit summary
No edit summary
Line 9: Line 9:


Create the file /etc/rsyncd.conf with the following contents
Create the file /etc/rsyncd.conf with the following contents
  $> tee /etc/rsyncd.conf <<EOF
  $> sudo tee /etc/rsyncd.conf <<EOF
  uid = swift
  uid = swift
  gid = swift
  gid = swift
Line 33: Line 33:


Start xinetd
Start xinetd
  $> service xinetd restart
  $> sudo service xinetd restart
  $> chkconfig xinetd on
  $> sudo chkconfig xinetd on


|actions=
|actions=
Select one of the data files on the a storage device and currupt its contents
Select one of the data files on the a storage device and currupt its contents
  $> ls / >> /srv/node/device1/objects/2970/d81/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data
  $> ls / | sudo tee /srv/node/device1/objects/2970/d81/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data





Revision as of 15:12, 18 September 2012

Description

Testing the swift auditor and replicator. The swift auditor is responsible for checking files for bit rot, when it finds a file whose hash does not match what it should it moves it into the quarantine for a replicator to replace

Setup

We first need to configure and enable rsync

$> sudo yum install -y xinetd rsync
$> sudo sed -i -e 's/disable.*/disable = no/g' /etc/xinetd.d/rsync

Create the file /etc/rsyncd.conf with the following contents

$> sudo tee /etc/rsyncd.conf <<EOF
uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = 127.0.0.1
[account]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/run/account.lock
[container]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/run/container.lock
[object]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/run/object.lock
EOF

Start xinetd

$> sudo service xinetd restart
$> sudo chkconfig xinetd on 

How to test

Select one of the data files on the a storage device and currupt its contents

$> ls /

Expected Results

After a short time ( < 1 minute), the corrupted file should have been moved by the auditor. And a fresh version should have been replaced by the replicater

$> find /srv/node/ -type f -name "1347830459.42610.data" -exec md5sum {} \;
3482e30580475b04a1b552d41c559582  /srv/node/device1/quarantined/objects/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data
ba1610dfb5b7fac8d6dd4a348761b5ee  /srv/node/device1/objects/2970/d81/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data
ba1610dfb5b7fac8d6dd4a348761b5ee  /srv/node/device2/objects/2970/d81/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data
ba1610dfb5b7fac8d6dd4a348761b5ee  /srv/node/device3/objects/2970/d81/b9a470cf10b569cf56acb7e71dab3d81/1347830459.42610.data