Project

General

Profile

Bug #172 » ceph_client_test_script.sh

Wido den Hollander, 06/03/2010 05:11 AM

 
#!/bin/sh

# mount -t ceph -o rw,noatime 192.168.6.209:/ /mnt/ceph

# Kernel: 2.6.34-020634-generic ( Ubuntu )

# root@ceph-client:/usr/src/ceph-client# git branch
# rbd
# * unstable
# root@ceph-client:/usr/src/ceph-client#

cd /mnt/ceph
mkdir static
cd static

echo "Downloading and unpacking kernel."
wget -q http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2
tar -vxjf linux-2.6.34.tar.bz2 > /var/log/ceph_unpack.log

echo "Creating snapshot."
mkdir .snap/kernel_snap

echo "Removing kernel files."
rm -vr linux-2.6.34.tar.bz2 linux-2.6.34 >> /var/log/ceph_unpack.log

echo "Restoring the files from the snapshot."
cp -va .snap/kernel_snap/* . >> /var/log/ceph_unpack.log

echo "Removing snapshot"
rmdir .snap/kernel_snap

echo "Removing kernel files"
rm -rv linux-2.6.34.tar.bz2 linux-2.6.34 >> /var/log/ceph_unpack.log
(5-5/11)