RH 5 Cluster Fence Problem On Vitual Box

I created 3 test machine and made them into cluster.
On Virtual
"Virtual Machine Manager 0.9.0"
Machines them selves are CentOS 5.11.

Code:
<cluster name="mycluster" config_version="3">
   <clusternodes>
     <clusternode name="one" nodeid="1">
         <fence>
         </fence>
     </clusternode>
     <clusternode name="two" nodeid="2">
         <fence>
         </fence>
     </clusternode>
     <clusternode name="three" nodeid="3">
         <fence>
         </fence>
     </clusternode>
   </clusternodes>
   <fencedevices>
   </fencedevices>
   <rm>
   </rm>
</cluster>

When I start cman service. I see get this:

Code:
[root@one ~]# time service cman restart
Stopping cluster: 
   Stopping fencing... done
   Stopping cman... done
   Stopping ccsd... done
   Unmounting configfs... done
                                                           [  OK  ]
Starting cluster: 
   Loading modules... done
   Mounting configfs... done
   Starting ccsd... done
   Starting cman... done
   Starting daemons... done
   Starting fencing... failed

                                                           [FAILED]

real	5m7.353s
user	0m0.063s
sys	0m0.095s
[root@one ~]#

clustat:

Code:
[root@one ~]# clustat 
Cluster Status for mycluster @ Tue Jun  2 11:10:28 2015
Member Status: Inquorate

 Member Name                                            ID   Status
 ------ ----                                            ---- ------
 one                                                        1 Online, Local
 two                                                        2 Offline
 three                                                      3 Offline

[root@one ~]#

Thank you.


Similar Content



Automating Script To Run Every Minute Through Other Manually Created User Using Crond

Hy All,

I have two nodes running RHEL 6.4 which are in cluster. I have clustered httpd service. Now I have certain application suppose X which reside in SAN partition. Now my job is to only automate this script to run by analyzing httpd status. I have successfully created the script apptrigger.sh whose content is given below,

-bash-4.1$ cat apptrigger.sh
a=0
b=0
c=0
d=0
a="service httpd status"
b=`eval $a`
##### CHECKING WHETHER HTTPD SERVICE IS RUNNING OR NOT #####
if [ "$b" != "httpd is stopped" ]; then
c="bash /switchapp/switch/ezlinkenterprise/bin/ezlink-cluster.sh status"
d=`eval $c`
##### CHECKING WHETHER EZ IS RUNNING OR NOT #####
if [ "$d" != "EzTaskMgr is Running" ]; then
ezstart
fi
fi

I have created this script in say test user. Now when I put this script to automate or run every minute through test user and defined its value in crontab -e of test user whose content is as shown below
$crontab -l
* * * * * /bin/bash /home/test/apptrigger.sh

but this script is running as root user so I cannot get the o/p
I think some environment variable need to be set. Anyone can guide me with this step? Thanks for your views and suggestion.

Using Cut -d" " To Cut Out The String Before, Not After

Hi Guys,
i have this Code:
uid=0(root) gid=0(root)

i would like to have the word "root" only from the first field, and later from the second field

i use the command
Code:
[root@v1-6 ~]# cat test-uid |cut -d"(" -f1
brms2
uid=0

[root@v1-6 ~]# cat test-uid |cut -d")" -f1
brms2
uid=0(root

it cut the word after the -d, how can i make it to cut the word BEFORE the -d

expected should be:
cut -d"(" -f1
root)

then i can proceed to eliminate the ) later on.
hope this is not confusing you guys

Thanks,

Rsync Script Problem

Hi all,

I am trying to write a script that syncs files from source to destination. I have one centralized server that can ssh to any servers without pw. Now when I run the script, it can ssh to source server perfectly fine, but you need to enter password for destination server. Was wondering how I can clean this up before I start using case statements

Below is a sample I wrote

#!/bin/bash

#This scripts syncs shit

echo "Type in ID: "
read ID

echo "Type in Server : " #source server
read S

echo "Type in Destination Server: "
read DS

if [ $S == 9 ]; then
ssh -t "root@"$S"webserver1" "rsync -av /home/rlui/"$ID "root@"$DS"webserver2:/home/rlui/";
ssh -t "root@"$S"webserver1" "rsync -av /home/rlui/tmp/"$ID "root@sl"$DS"webserver2:/home/rlui/tmp/"
exit 1

where S and DS are cluster numbers

I apologize in advance if I am not clear on anything

Running Gauss On A Cluster

Hi,
I'm new to Linux and I need to run a program in Gauss on a cluster.
I want to run it in the background as it is a very big job. I've tried commands like gauss -nodesktop or gauss -nodisplay or both or gauss -b but whatever I do I get the following message:"Failed to get the primary output on the screen" and Gauss application opens. Does anyone know what it means and what is the solution?

Rsync, Reliable "copy And Paste" Type Of Backup In Case Things Break?

What I did in windows was create images of my drive and restore them.

in linux I am running

Code:
rsync -aAXv --exclude={"/home/*","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /path/to/backup/folder

and this creates a folder for me with all my files, and apparently saves meta data like permissions and paths...

Since I'm using arch and things break sometimes,I'm booted into a CLI with errors and cannot figure my way out since I'm a noob... would I be able to just delete my entire root and replace it with the rsync backup without a problem?

"vconsole.conf" Show Unicode

Hi!

Here is mine configuration and I want make it show unicode(russian) in console, it works perfect in X11 but not when I logging into tty.

vconsole.conf
Code:
LOCALE="en_US.UTF-8"
KEYMAP="sv-latin1"
FONT_UNIMAP="lat1"
FONT_MAP="ISO8859-1"
CONSOLEFONT="ruscii_8x8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Stockholm"
USECOLOR="yes"

Basic Bash Script

Code:
PREFIX=192.168.1
OCTET=1
while [ $OCTET -lt "255" ]; do
    echo -en "Pinging ${PREFIX}.${OCTET}..."
    ping -c1 -w1 ${PREFIX}.${OCTET} > /dev/null 2>&1
    if [ "$?" -eq "0" ]; then
       echo "OK"
    else
       echo "Failed"
    fi
    let OCTET=$OCTET+1
done

My question is, in the penultimate line, why is it OCTET, and not $OCTET, with a dollar before it, meaning, the variable?

What if it were written:
Code:
let $OCTET=$OCTET+1

Like in C++ (I think) or Python or whatever?

Mutt Does Not Show Full Subject

I use following shell script to send email. But the subject of email always shows "This" instead of "This is L_1.R is finished". You may refer http://www.linuxquestions.org/questions/linux-newbie-8/how-to-define-variable-in-%60ssh%60-4175540566/
Code:
host_list=("c15-0330-01.ad.mtu.edu" "c15-0330-02.ad.mtu.edu" "c15-0330-03.ad.mtu.edu" "c15-0330-04.ad.mtu.edu")
program=("L_1" "L_2" "L_3" "L_4")
subject="The job is finished"
ssh -f c15-0330-01.ad.mtu.edu 'echo' "the job ${program[0]} is finished" '|' 'mutt "zwang10@mtu.edu" -s' "This is "${program[0]}".R is finished";

Systemd Starting Services

hi all

I am learning systemd and how to add new services as part of the LFS201 course and I have a question about the services:
Code:
Lab 4.2: Adding a New Startup Service with systemd
For example a very minimal file named
/etc/systemd/system/fake2.service:
[Unit]
Description=fake2
After=network.target
[Service]
ExecStart=/bin/echo I am starting the fake2 service
ExecStop=/bin/echo I am stopping the fake2 service
[Install]
WantedBy=multi-user.target

Code:
root@ubuntu:/etc/systemd/system# systemctl start fake.service
root@ubuntu:/etc/systemd/system# systemctl status fake.service
 fake.service - fake
   Loaded: loaded (/etc/systemd/system/fake.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

May 16 11:41:05 ubuntu systemd[1]: Started fake.
May 16 11:41:05 ubuntu systemd[1]: Starting fake...
May 16 11:41:05 ubuntu echo[1798]: I am starting the fake2 service
May 16 11:41:05 ubuntu echo[1800]: I am stopping the fake2 service
root@ubuntu:/etc/systemd/system# ps aux | grep fake*
root      1809  0.0  0.0  13688  2272 pts/8    S+   11:41   0:00 grep --color=auto fake.service
root@ubuntu:/etc/systemd/system#

as you can see the fake2 service is really only two lines. And when I grep for the service via ps I can't fine it. I guess it is because it has finished running. I am wondering how can I change it so that I can keep it running?

thanks

Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.