openfielr 2.3 cluster 配置测试
2016/6/8 7:56:13# hostname
openfiler01
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.155 openfiler01
192.168.1.156 openfiler02
10.10.5.155 openfiler01-priv
10.10.5.156 openfiler02-priv
192.158.1.157 openfiler-vip
#
#
#
#
#
#
#
#
# ssh openfiler02
root@openfiler02's password:
Last login: Wed Jun8 07:55:57 2016 from 192.168.1.1
# hostname
openfiler02
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.155 openfiler01
192.168.1.156 openfiler02
10.10.5.155 openfiler01-priv
10.10.5.156 openfiler02-priv
192.158.1.157 openfiler-vip
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
# arch
x86_64
# uname -a
Linux openfiler01 2.6.24.7-0.2.6.smp.gcc3.4.x86_64 #1 SMP Thu May 29 07:57:14 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
#
#
#
#
#
# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
53:16:d1:90:6a:7b:94:24:88:50:c8:06:7a:5d:ee:55 root@openfiler01
#
#
#
# ssh openfiler02
root@openfiler02's password:
Permission denied, please try again.
root@openfiler02's password:
Permission denied, please try again.
root@openfiler02's password:
Last login: Wed Jun8 07:56:42 2016 from openfiler01
#
#
# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
60:b3:d0:9e:a8:c0:8f:b7:f1:cf:40:f0:05:0b:ec:5a root@openfiler02
#
#
#
#
#
# exit
logout
Connection to openfiler02 closed.
# scp .ssh/id_dsa.pub root@openfiler02:~/.ssh/authorized_keys2
root@openfiler02's password:
id_dsa.pub 100%606 0.6KB/s 00:00
#
#
#
# ssh openfiler02
Last login: Wed Jun8 07:57:53 2016 from openfiler01
# scp .ssh/id_dsa.pub root@openfiler01:~/.ssh/authorized_keys2
The authenticity of host 'openfiler01 (192.168.1.155)' can't be established.
RSA key fingerprint is 66:df:47:a2:be:b1:0f:8d:4e:25:50:c7:b8:a6:52:cc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'openfiler01,192.168.1.155' (RSA) to the list of known hosts.
root@openfiler01's password:
id_dsa.pub 100%606 0.6KB/s 00:00
#
#
#
# ssh openfiler01
Last login: Wed Jun8 07:55:46 2016 from 192.168.1.1
# exit
logout
Connection to openfiler01 closed.
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
#
#
# mv /etc/drbd.conf /etc/drbd.conf.org
#
#
# vi /etc/drbd.conf
#
#
# cat /etc/drbd.conf
global {
# minor-count 64;
# dialog-refresh 5; # 5 seconds
# disable-ip-verification;
usage-count ask;
}
common {
syncer { rate 100M; }
}
resource cluster_metadata {
protocol C;
handlers {
pri-on-incon-degr "echo O > /proc/sysrq-trigger ; halt -f";
pri-lost-after-sb "echo O > /proc/sysrq-trigger ; halt -f";
local-io-error "echo O > /proc/sysrq-trigger ; halt -f";
# outdate-peer "/usr/sbin/drbd-peer-outdater";
}
startup {
# wfc-timeout 0;
degr-wfc-timeout 120; # 2 minutes.
}
disk {
on-io-error detach;
}
net {
after-sb-0pri disconnect;
after-sb-1pri disconnect;
after-sb-2pri disconnect;
rr-conflict disconnect;
}
syncer {
# rate 10M;
# after "r2";
al-extents 257;
}
on openfiler01 {
device /dev/drbd0;
disk /dev/sdb1;
address 192.168.1.155:7788;
meta-disk internal;
}
on openfiler02 {
device /dev/drbd0;
disk /dev/sdb1;
address 192.168.1.156:7788;
meta-disk internal;
}
}
resource vg0drbd {
protocol C;
startup {
wfc-timeout 0; ## Infinite!
degr-wfc-timeout 120; ## 2 minutes.
}
disk {
on-io-error detach;
}
net {
# timeout 60;
# connect-int 10;
# ping-int 10;
# max-buffers 2048;
# max-epoch-size 2048;
}
syncer {
after "cluster_metadata";
}
on openfiler01 {
device /dev/drbd1;
disk /dev/sdb2;
address 192.168.1.155:7789;
meta-disk internal;
}
on openfiler02 {
device /dev/drbd1;
disk /dev/sdb2;
address 192.168.1.156:7789;
meta-disk internal;
}
}
#
#
#
#
#
# scp /etc/drbd.conf openfiler02:/etc/
drbd.conf 100% 1354 1.3KB/s 00:00
#
#
#
#
#
# service iptables status
Firewall is stopped.
#
#
#
# fdisk -l
Disk /dev/sda: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sda1 * 1 13 104391 83Linux
/dev/sda2 14 1834 14627182+83Linux
/dev/sda3 1835 2088 2040255 82Linux swap / Solaris
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
# fdisk /dev/sdb
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): +500M
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (63-2610, default 63):
Using default value 63
Last cylinder or +size or +sizeM or +sizeK (63-2610, default 2610):
Using default value 2610
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
# partprobe
#
#
#
# fdisk -l
Disk /dev/sda: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sda1 * 1 13 104391 83Linux
/dev/sda2 14 1834 14627182+83Linux
/dev/sda3 1835 2088 2040255 82Linux swap / Solaris
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sdb1 1 62 497983+83Linux
/dev/sdb2 63 2610 20466810 8eLinux LVM
#
#
#
# ssh openfiler02
Last login: Wed Jun8 07:58:31 2016 from openfiler01
# fdisk -l /dev/sdb
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
# fdisk /dev/sdb
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): +500M
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (63-2610, default 63):
Using default value 63
Last cylinder or +size or +sizeM or +sizeK (63-2610, default 2610):
Using default value 2610
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
# partprobe
#
#
#
# fdisk -l /dev/sdb
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sdb1 1 62 497983+83Linux
/dev/sdb2 63 2610 20466810 8eLinux LVM
#
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
#
# drbdadm create-md cluster_metadata
--== This is a new installation of DRBD ==--
Please take part in the global DRBD usage count at http://usage.drbd.org.
The conter works completely anonymous. A random number gets created on
you machine, and that randomer number (as identifier for this machine) and
DRBD's version number are sent to usage.drbd.org.
The benifits for you are:
* As a respose to your data, the server (usage.drbd.org) will tell you
how many users before you have installed this version (8.0.11).
* With a high counter the DRBD developers have a high motivation to
continue development of the software.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5422698619167293786&git=b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b
In case you want to participate but know that this machines is firewalled
simply issue the query string with your favourite web browser or wget.
You can control all this by setting 'usage-count' in your drbd.conf.
* You may enter a free form comment about your machine, that gets
used on usage.drbd.org instead of the big random number.
* Enter 'no' to opt out.
* To count this node without comment, just press
--==Thank you for participating in the global usage survey==--
The server's response is:
In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.
Just press to continue: v08 Magic number not found
v07 Magic number not found
v07 Magic number not found
v08 Magic number not found
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block sucessfully created.
--== Creating metadata ==--
As with nodes we count the total number of devices mirrored by DRBD at
at http://usage.drbd.org.
The counter works completely anonymous. A random number gets created for
this device, and that randomer number and the devices size will be sent.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5422698619167293786&ru=16214409169078165549&rs=509935104
Enter 'no' to opt out, or just press to continue:
#
# drbdadm create-md vg0drbd
v08 Magic number not found
v07 Magic number not found
v07 Magic number not found
v08 Magic number not found
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block sucessfully created.
--== Creating metadata ==--
As with nodes we count the total number of devices mirrored by DRBD at
at http://usage.drbd.org.
The counter works completely anonymous. A random number gets created for
this device, and that randomer number and the devices size will be sent.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5422698619167293786&ru=15351232731115036999&rs=20958013440
Enter 'no' to opt out, or just press to continue:
#
#
# ssh openfiler02
Last login: Wed Jun8 08:07:45 2016 from openfiler01
#
#
#
#
# drbdadm create-md cluster_metadata
--== This is a new installation of DRBD ==--
Please take part in the global DRBD usage count at http://usage.drbd.org.
The conter works completely anonymous. A random number gets created on
you machine, and that randomer number (as identifier for this machine) and
DRBD's version number are sent to usage.drbd.org.
The benifits for you are:
* As a respose to your data, the server (usage.drbd.org) will tell you
how many users before you have installed this version (8.0.11).
* With a high counter the DRBD developers have a high motivation to
continue development of the software.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=15706896025977722875&git=b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b
In case you want to participate but know that this machines is firewalled
simply issue the query string with your favourite web browser or wget.
You can control all this by setting 'usage-count' in your drbd.conf.
* You may enter a free form comment about your machine, that gets
used on usage.drbd.org instead of the big random number.
* Enter 'no' to opt out.
* To count this node without comment, just press
--==Thank you for participating in the global usage survey==--
The server's response is:
In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.
Just press to continue: v08 Magic number not found
v07 Magic number not found
v07 Magic number not found
v08 Magic number not found
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block sucessfully created.
--== Creating metadata ==--
As with nodes we count the total number of devices mirrored by DRBD at
at http://usage.drbd.org.
The counter works completely anonymous. A random number gets created for
this device, and that randomer number and the devices size will be sent.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=15706896025977722875&ru=10161961416298249814&rs=509935104
Enter 'no' to opt out, or just press to continue:
#
#
#
#
#
#
# drbdadm create-md vg0drbd
v08 Magic number not found
v07 Magic number not found
v07 Magic number not found
v08 Magic number not found
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block sucessfully created.
--== Creating metadata ==--
As with nodes we count the total number of devices mirrored by DRBD at
at http://usage.drbd.org.
The counter works completely anonymous. A random number gets created for
this device, and that randomer number and the devices size will be sent.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=15706896025977722875&ru=7662607122201617242&rs=20958013440
Enter 'no' to opt out, or just press to continue:
#
#
#
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
#
# service drbd status
drbd not loaded
# service drbd start
Starting DRBD resources: [ d(cluster_metadata) d(vg0drbd) s(cluster_metadata) s(vg0drbd) n(cluster_metadata) n(vg0drbd) ].
--== This is an update of DRBD ==--
Please take part in the global DRBD usage count at http://usage.drbd.org.
The conter works completely anonymous. A random number gets created on
you machine, and that randomer number (as identifier for this machine) and
DRBD's version number are sent to usage.drbd.org.
The benifits for you are:
* As a respose to your data, the server (usage.drbd.org) will tell you
how many users before you have installed this version (8.0.11).
* With a high counter the DRBD developers have a high motivation to
continue development of the software.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5422698619167293786&git=5c9f89594553e32adb87d9638dce591782f947e3
In case you want to participate but know that this machines is firewalled
simply issue the query string with your favourite web browser or wget.
You can control all this by setting 'usage-count' in your drbd.conf.
* You may enter a free form comment about your machine, that gets
used on usage.drbd.org instead of the big random number.
* Enter 'no' to opt out.
* To count this node without comment, just press
--==Thank you for participating in the global usage survey==--
The server's response is:
In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.
Just press to continue:
# service drbd start
Starting DRBD resources: [ d(cluster_metadata) d(vg0drbd) s(cluster_metadata) s(vg0drbd) n(cluster_met
--== This is an update of DRBD ==--
Please take part in the global DRBD usage count at http://usage.drbd.org.
The conter works completely anonymous. A random number gets created on
you machine, and that randomer number (as identifier for this machine) and
DRBD's version number are sent to usage.drbd.org.
The benifits for you are:
* As a respose to your data, the server (usage.drbd.org) will tell you
how many users before you have installed this version (8.0.11).
* With a high counter the DRBD developers have a high motivation to
continue development of the software.
http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=15706896025977722875&git=5c9f89594553e32adb87d9638dce591
In case you want to participate but know that this machines is firewalled
simply issue the query string with your favourite web browser or wget.
You can control all this by setting 'usage-count' in your drbd.conf.
* You may enter a free form comment about your machine, that gets
used on usage.drbd.org instead of the big random number.
* Enter 'no' to opt out.
* To count this node without comment, just press
--==Thank you for participating in the global usage survey==--
The server's response is:
In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.
Just press to continue: #
#
# service drbd start
Starting DRBD resources: [ ].
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
#
#
#
#
# ssh openfiler02
# service drbd start
Starting DRBD resources: [ ].
# servcice drbd status
-bash: servcice: command not found
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
Last login: Wed Jun8 08:20:24 2016 from openfiler01
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
# drbdsetup /dev/drbd0 primary –o
State change failed: (-2) Refusing to be Primary without at least one UpToDate disk
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedSecondary/SecondaryInconsistent/InconsistentC
1:vg0drbd ConnectedSecondary/SecondaryInconsistent/InconsistentC
# drbdsetup /dev/drbd0 primary -o
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
primary secondary
disk detach
net disconnect
resize syncer
invalidate invalidate-remote
pause-sync resume-sync
suspend-io resume-io
outdate down
state cstate
dstate show-gi
get-gi show
events wait-connect
wait-sync
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
# drbdsetup /dev/drbd0 primary -o
# drbdsetup /dev/drbd1 primary -o
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnected Primary/SecondaryUpToDate/UpToDate C
1:vg0drbd SyncSourcePrimary/SecondaryUpToDate/InconsistentC
... sync'ed: 1.5% (19706/19986)M
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnected Primary/SecondaryUpToDate/UpToDate C
1:vg0drbd SyncSourcePrimary/SecondaryUpToDate/InconsistentC
... sync'ed: 4.3% (19141/19986)M
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnected Primary/SecondaryUpToDate/UpToDate C
1:vg0drbd SyncSourcePrimary/SecondaryUpToDate/InconsistentC
... sync'ed: 4.9% (19022/19986)M
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnected Primary/SecondaryUpToDate/UpToDate C
1:vg0drbd SyncSourcePrimary/SecondaryUpToDate/InconsistentC
... sync'ed: 40.6% (11882/19986)M
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnected Primary/SecondaryUpToDate/UpToDate C
1:vg0drbd SyncSourcePrimary/SecondaryUpToDate/InconsistentC
... sync'ed: 58.4% (8330/19986)M
# service drbd status
drbd driver loaded OK; device status:
version: 8.0.12 (api:86/proto:86)
GIT-hash: 5c9f89594553e32adb87d9638dce591782f947e3 build by phil@mescal, 2008-04-24 13:29:44
m:res cs st ds pmountedfstype
0:cluster_metadataConnectedPrimary/SecondaryUpToDate/UpToDateC
1:vg0drbd ConnectedPrimary/SecondaryUpToDate/UpToDateC
#
#
#
#
# chkconfig --level 2345 drbd on
# ssh openfiler02
Last login: Wed Jun8 08:34:58 2016 from openfiler01
# chkconfig --level 2345 drbd on
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
# mkfs.ext3 /dev/drbd0
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
124928 inodes, 497928 blocks
24896 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
61 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.Use tune2fs -c or -i to override.
#
#
#
#
#
# vi /etc/lvm/lvm.conf
# grep sdb /etc/lvm/lvm.conf
filter = [ "r|/dev/sdb2|" ]
#
#
#
# scp /etc/lvm/lvm.conf openfiler02:/etc/lvm/
lvm.conf 100% 16KB15.6KB/s 00:00
#
#
#
#
#
# vi /etc/ha.d/authkeys
# scp /etc/ha.d/authkeys openfiler02:/etc/ha.d/
authkeys 100% 13 0.0KB/s 00:00
# cd /etc/ha.d/
# chmod 600 /etc/ha.d/authkeys
#
#
# ssh openfiler02
Last login: Wed Jun8 08:41:04 2016 from openfiler01
#
#
# chmod 600 /etc/ha.d/authkeys
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
# pwd
/etc/ha.d
# vi ha.cf
# scp ha.cf openfiler02:/etc/ha.d/
ha.cf 100%196 0.2KB/s 00:00
# chkconfig --level 2345 heartbeat on
# ssh openfiler02
Last login: Wed Jun8 08:44:19 2016 from openfiler01
# chkconfig --level 2345 heartbeat on
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
#
#
#
# cd
# mkdir /cluster_metadata
# mount /dev/drbd0 /cluster_metadata
# mount
/dev/sda2 on / type ext3 (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/drbd0 on /cluster_metadata type ext3 (rw)
# mv /opt/openfiler/ /opt/openfiler.local
# mkdir /cluster_metadata/opt
# cp -a /opt/openfiler.local /cluster_metadata/opt/openfiler
# ln -s /cluster_metadata/opt/openfiler /opt/openfiler
# rm /cluster_metadata/opt/openfiler/sbin/openfiler
rm: remove symbolic link `/cluster_metadata/opt/openfiler/sbin/openfiler'? y
# ln -s /usr/sbin/httpd /cluster_metadata/opt/openfiler/sbin/openfiler
# rm /cluster_metadata/opt/openfiler/etc/rsync.xml
rm: remove regular file `/cluster_metadata/opt/openfiler/etc/rsync.xml'? y
# ln -s /opt/openfiler.local/etc/rsync.xml /cluster_metadata/opt/openfiler/etc/
#
#
#
# vi /opt/openfiler.local/etc/rsync.xml
# cat /opt/openfiler.local/etc/rsync.xml
<?xml version="1.0" ?>
<rsync>
<remote hostname="192.168.1.156"/> ## IP address of peer node.
<item path="/etc/ha.d/haresources"/>
<item path="/etc/ha.d/ha.cf"/>
<item path="/etc/ldap.conf"/>
<item path="/etc/openldap/ldap.conf"/>
<item path="/etc/ldap.secret"/>
<item path="/etc/nsswitch.conf"/>
<item path="/etc/krb5.conf"/>
</rsync>
#
#
#
#
#
# mkdir -p /cluster_metadata/etc/httpd/conf.d
#
#
# ssh openfiler02
Last login: Wed Jun8 08:46:02 2016 from openfiler01
#
#
#
# mkdir /cluster_metadata
# mv /opt/openfiler/ /opt/openfiler.local
# ln -s /cluster_metadata/opt/openfiler /opt/openfiler
#
#
#
# vi /opt/openfiler.local/etc/rsync.xml
# cat /opt/openfiler.local/etc/rsync.xml
<?xml version="1.0" ?>
<rsync>
<remote hostname="192.168.1.155"/> ## IP address of peer node.
<item path="/etc/ha.d/haresources"/>
<item path="/etc/ha.d/ha.cf"/>
<item path="/etc/ldap.conf"/>
<item path="/etc/openldap/ldap.conf"/>
<item path="/etc/ldap.secret"/>
<item path="/etc/nsswitch.conf"/>
<item path="/etc/krb5.conf"/>
</rsync>
#
#
#
#
# vi /cluster_metadata/opt/openfiler/etc/cluster.xml
# ls -la
total 396
drwxr-x--- 3 root root 4096 Jun8 08:55 .
drwxr-xr-x24 root root 4096 Jun8 08:50 ..
-rw------- 1 root root 1296 Jun7 18:54 anaconda-ks.cfg
-rw------- 1 root root 531 Jun8 08:46 .bash_history
-rw-r--r-- 1 root root 24 Jun 102000 .bash_logout
-rw-r--r-- 1 root root 234 Jul52001 .bash_profile
-rw-r--r-- 1 root root 176 Aug 231995 .bashrc
-rw-r--r-- 1 root root 186833 Jun7 18:54 conary-tag-script
-rwxr-xr-x 1 root root68828 Jun7 18:54 conary-tag-script.output
-rw-r--r-- 1 root root 210 Jun 102000 .cshrc
-rw-r--r-- 1 root root78019 Jun7 18:54 install.log
-rw-r--r-- 1 root root 682 Jun7 18:54 install.log.syslog
drwx------ 2 root root 4096 Jun8 07:58 .ssh
-rw-r--r-- 1 root root 196 Jul 112000 .tcshrc
-rw------- 1 root root 1125 Jun8 08:55 .viminfo
-rw-r--r-- 1 root root 1126 Aug 231995 .Xresources
# cd /cluster_metadata/
# ls
# mount
/dev/sda2 on / type ext3 (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
# exit
logout
Connection to openfiler02 closed.
#
#
#
# vi /cluster_metadata/opt/openfiler/etc/cluster.xml
# vi /cluster_metadata/opt/openfiler/etc/cluster.xml
#
#
#
# cat /cluster_metadata/opt/openfiler/etc/cluster.xml
<?xml version="1.0" ?>
<cluster>
<clustering state="on" />
<nodename value="openfiler01" />
<resource value="MailTo::mundotic.ecampos@gmail.com::ClusterFailover"/>
<resource value="IPaddr::192.168.1.157/24" />
<resource value="drbddisk::">
<resource value="LVM::vg0drbd">
<resource value="Filesystem::/dev/drbd0::/cluster_metadata::ext3::defaults,noatime">
<resource value="MakeMounts"/>
</cluster>
#
#
#
#
#
# mv /etc/ietd.conf /cluster_metadata/etc/
# ln -s /cluster_metadata/etc/ietd.conf /etc/ietd.conf
# mv /etc/initiators.allow /cluster_metadata/etc/
# ln -s /cluster_metadata/etc/initiators.allow /etc/initiators.allow
# mv /etc/initiators.deny /cluster_metadata/etc/
# ln -s /cluster_metadata/etc/initiators.deny /etc/initiators.deny
#
#
#
#
# ssh openfiler02
Last login: Wed Jun8 08:50:26 2016 from openfiler01
#
#
#
#
# rm /etc/ietd.conf
rm: remove regular file `/etc/ietd.conf'? y
# ln -s /cluster_metadata/etc/ietd.conf /etc/ietd.conf
# rm /etc/initiators.allow
rm: remove regular file `/etc/initiators.allow'? y
# ln -s /cluster_metadata/etc/initiators.allow /etc/initiators.allow
# rm /etc/initiators.deny
rm: remove regular file `/etc/initiators.deny'? y
# ln -s /cluster_metadata/etc/initiators.deny /etc/initiators.deny
#
#
#
#
#
#
#
# exit
logout
Connection to openfiler02 closed.
#
#
#
#
#
# pvcreate /dev/drbd1
Physical volume "/dev/drbd1" successfully created
#
#
#
#
#
#
# rm /opt/openfiler/etc/httpd/modules
rm: remove symbolic link `/opt/openfiler/etc/httpd/modules'? y
# ln -s /usr/lib64/httpd/modules /opt/openfiler/etc/httpd/modules
#
#
#
#
# service openfiler restart
Stopping openfiler:
Starting openfiler:
#
#
#
# lvcreate -L 18G -n filer vg0drbd
Volume group "vg0drbd" not found
# vgcreate vg0drbd /dev/drbd1
Volume group "vg0drbd" successfully created
#
#
# lvcreate -L 18G -n filer vg0drbd
Logical volume "filer" created
#
#
#
#
# cd /etc/ha.d
# ls
authkeysha.cfharcrc.dREADME.configresource.dshellfuncs
# ls
authkeysha.cfharcharesourcesrc.dREADME.configresource.dshellfuncs
# scp /etc/ha.d/haresources root@openfiler02:/etc/ha.d/
haresources 100%219 0.2KB/s 00:00
#
#
#
# shutdown -r now
Broadcast message from root (pts/0) (Wed Jun8 09:08:44 2016):
The system is going down for reboot NOW!
#
Connection closed by foreign host.
Disconnected from remote host(192.168.1.155:22) at 09:09:37.
Type `help' to learn how to use Xshell prompt.
$ ssh 192.168.1.155
Connecting to 192.168.1.155:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
WARNING! The remote SSH server rejected X11 forwarding request.
Last login: Wed Jun8 07:58:51 2016 from openfiler02
# shutdown -h now
Broadcast message from root (pts/0) (Wed Jun8 09:14:30 2016):
The system is going down for system halt NOW!
#
Connection closed by foreign host.
Disconnected from remote host(192.168.1.155:22) at 09:15:34.
Type `help' to learn how to use Xshell prompt.
页:
[1]