Ask Your Question

Problem in Setting up scripts for running Swift [closed]

asked 2013-08-06 22:33:32 -0500

baran gravatar image

updated 2013-08-07 00:51:07 -0500

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):


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 </your-group-name></your-user-name>


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

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


Perhaps Should write These in the Nano environment ???


edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by smaffulli
close date 2013-08-08 17:32:54.200952

1 answer

Sort by ยป oldest newest most voted

answered 2013-08-07 11:12:30 -0500

smaffulli gravatar image

It appears to me that you're copying commands from somewhere without fully understanding their meaning. #!/bin/bash is usually the first line of a bash shell script and it's not needed if you're not executing a script. Maybe you want to start from learning unix before attempting more complex tasks?

edit flag offensive delete link more


It is true. I am currently training to learn. Thanks for the guide

baran gravatar imagebaran ( 2013-08-07 23:24:53 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-08-06 22:33:32 -0500

Seen: 104 times

Last updated: Aug 07 '13