Revision history [back]

click to hide/show revision 1
initial version

Problem in Setting up scripts for running Swift

hello my friends

I do:

  1. mkdir ~/bin
  2. Create ~/bin/resetswift By nano ~/bin/resetswift

I want:

(substitute /dev/sdb1 with /srv/swift-disk.)

(If you did not set up rsyslog for individual logging, remove the find /var/log/swift... line):

!/bin/bash

swift-init all stop
find /var/log/swift -type f -exec rm -f {} \;
sudo umount /mnt/sdb1
sudo mkfs.xfs -f /dev/sdb1
sudo mount /mnt/sdb1
sudo mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4
sudo chown <your-user-name>:<your-group-name> /mnt/sdb1/*
mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4
sudo rm -f /var/log/debug /var/log/messages /var/log/rsyncd.log /var/log/syslog
find /var/cache/swift* -type f -name *.recon -exec rm -f {} \;
sudo service rsyslog restart sudo service memcached restart

but:

root@......:~# !/bin/bash

Bash:!/bin/bash: event not found.?????

why???

thanks

Problem in Setting up scripts for running Swift

hello my friends

I do:

  1. mkdir ~/bin
  2. Create ~/bin/resetswift By nano ~/bin/resetswift

I want:

(substitute /dev/sdb1 with /srv/swift-disk.)

(If you did not set up rsyslog for individual logging, remove the find /var/log/swift... line):

!/bin/bash

swift-init all stop
find /var/log/swift -type f -exec rm -f {} \;
sudo umount /mnt/sdb1
sudo mkfs.xfs -f /dev/sdb1
sudo mount /mnt/sdb1
sudo mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4
sudo chown <your-user-name>:<your-group-name> /mnt/sdb1/*
mkdir -p /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4
sudo rm -f /var/log/debug /var/log/messages /var/log/rsyncd.log /var/log/syslog
find /var/cache/swift* -type f -name *.recon -exec rm -f {} \;
sudo service rsyslog restart sudo service memcached restart

but:

root@......:~# !/bin/bash

Bash:!/bin/bash: event not found.?????

why???

Perhaps Should write These in the Nano environment ???

thanks