[root@cl1
~]# drbdadm primary all ← 노드1측을 Primary화 ※DRBD디스크초기동기로 Primary화 한 경우는 실시불요
[root@cl1 ~]#
/etc/rc.d/init.d/drbd status ← 노드1측 DRBD상태확인
drbd driver loaded OK; device
status:
version: 8.2.5
(api:88/proto:86-88)
GIT-hash:
9faf052fdae5ef0c61b4d03890e2d2eab550610c build by buildsvn@c5-i386-build,
2008-03-09 10:27:36
m:res cs
st ds p mounted
fstype
0:r0 Connected Primary/Secondary UpToDate/UpToDate C ←노드 1측이
Primary
[root@cl2 ~]#
/etc/rc.d/init.d/drbd status ← 노드2측DRBD상태확인
drbd driver loaded OK; device
status:
version: 8.2.5
(api:88/proto:86-88)
GIT-hash:
9faf052fdae5ef0c61b4d03890e2d2eab550610c build by buildsvn@c5-i386-build, 2008-03-09
10:27:36
m:res cs
st ds p mounted
fstype
0:r0 Connected Secondary/Primary UpToDate/UpToDate C ← 노드 2측이 secondary
[root@cl1 ~]# mkfs -t ext3
/dev/drbd0 ← 노드1측 DRBD디스크에 파일시스템 작성
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
126976 inodes, 253935 blocks
12696 blocks (5.00%) reserved
for the super user
First data block=0
Maximum filesystem
blocks=260046848
8 block groups
32768 blocks per group, 32768
fragments per group
15872 inodes per group
Superblock backups stored on
blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (4096 blocks):
done
Writing superblocks and
filesystem accounting information: done
This filesystem will be
automatically checked every 23 mounts or
180 days, whichever comes
first. Use tune2fs -c or -i to
override.
[root@cl1 ~]# mount /dev/drbd0
/mnt ← 노드1측에DRBD디스크를 /mnt에
마운트
[root@cl1 ~]# df ←노드 1측에 DRBD디스크 마운트 확인
Filesystem 1K-blocks Used
UsedAvailable Used% Mounted on
/dev/mapper/VolGroup00-LogVol00
3428080 1600832
1650304 50% /
/dev/sda1 101086 23800 72067
25% /boot
tmpfs 127796 0 127796
0% /dev/shm
/dev/drbd0 999764 17652 931328
2% /mnt ← 마운트한 DRBD디스크
[root@cl1 ~]# touch
/mnt/test.txt ← 노드 1측에 /mnt(DRBD디스크)에 테스트 파일 작성
[root@cl1 ~]# ll /mnt/ ← 노드1측에 /mnt(DRBD디스크)조회
合計 16
drwx------ 2 root root
16384 2月 11 00:01 lost+found
-rw-r--r-- 1 root root 0
2月 11 00:02 test.txt ← 작성한 파일
[root@cl1 ~]# umount /mnt ← 노드1측에 DRBD디스크 마운트해제
[root@cl1 ~]# df ← 노드1측에 DRBD 디스크마운트 해제확인
Filesystem 1K-blocks Used
Available Use% Mount on
/dev/mapper/VolGroup00-LogVol00
3428080 1600832
1650304 50% /
/dev/sda1 101086 23800 72067
25% /boot
tmpfs 127796 0 127796
0% /dev/shm
DRBD 디스크가 없다.
[root@cl1 ~]# drbdadm secondary
all ← 노드1측을 Secondary화
[root@cl2 ~]# drbdadm primary
all ← 노드 2측을 Primary화
[root@cl1 ~]#
/etc/rc.d/init.d/drbd status ← 노드1측 DRBD 상태확인
drbd driver loaded OK; device
status:
version: 8.2.6
(api:88/proto:86-88)
GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4
build by buildsvn@c5-i386-build, 2008-10-03 11:42:32
m:res cs
st ds p mounted
fstype
0:r0 Connected Secondary/Primary UpToDate/UpToDate C ← 노드1측이 Secondary
[root@cl2 ~]#
/etc/rc.d/init.d/drbd status ← 노드2측 DRBD 상태확인
drbd driver loaded OK; device
status:
version: 8.2.6
(api:88/proto:86-88)
GIT-hash:
3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-i386-build,
2008-10-03 11:42:32
m:res cs
st ds p mounted
fstype
0:r0 Connected Primary/Secondary UpToDate/UpToDate C ← 노드 2측이
Primary
[root@cl2
~]# mount /dev/drbd0 /mnt ← 노드2측에 DRBD디스크를 /mnt에 마운트
[root@cl2 ~]# ll /mnt/ ← 노드2측에 /mnt(DRBD디스크)조회
合計 16
drwx------ 2 root root
16384 2月 11 00:01 lost+found
-rw-r--r-- 1 root root 0
2月 11 00:02 test.txt ← 노드 1측에 작성한 파일
[root@cl2 ~]# umount /mnt ← 노드2측에 DRBD디스크 마운트 해제
[root@cl2 ~]# drbdadm secondary
all ← 노드 2측을 Secondary화
[root@cl1 ~]# drbdadm primary all ← 노드 1측을 Primary화
[root@cl1 ~]#
/etc/rc.d/init.d/drbd status ← 노드 1측 DRBD상태확인
drbd driver loaded OK; device
status:
version: 8.2.5
(api:88/proto:86-88)
GIT-hash:
9faf052fdae5ef0c61b4d03890e2d2eab550610c build by buildsvn@c5-i386-build,
2008-03-09 10:27:36
m:res cs
st ds p mounted
fstype
0:r0 Connected Primary/Secondary UpToDate/UpToDate C ← 노드1측이 Primary
[root@cl2 ~]#
/etc/rc.d/init.d/drbd status ← 노드2측 DRBD상태확인
drbd driver loaded OK; device
status:
version: 8.2.5
(api:88/proto:86-88)
GIT-hash:
9faf052fdae5ef0c61b4d03890e2d2eab550610c build by buildsvn@c5-i386-build,
2008-03-09 10:27:36
m:res cs
st ds p mounted
fstype
0:r0 Connected Secondary/Primary UpToDate/UpToDate C ←노드 2측이 Secondary
|