Arquivo para abril, 2009

1 – Creating the Volume Group

# pvs
PV         VG     Fmt  Attr PSize  PFree
/dev/sda3  rootvg lvm2 a-   62.75G 38.97G
/dev/dm-10        lvm2 --   70.00G 70.00G
/dev/dm-13        lvm2 --   70.00G 70.00G
/dev/dm-14        lvm2 --   70.00G 70.00G
/dev/dm-9         lvm2 --   70.00G 70.00G

# vgcreate vg_cluster00 /dev/dm-10 /dev/dm-13  /dev/dm-14 /dev/dm-9
Volume group "vg_cluster00" successfully created

# pvs
PV         VG          Fmt  Attr PSize  PFree
/dev/dm-10 vg_cluster00 lvm2 a-   70.00G 70.00G
/dev/dm-13 vg_cluster00 lvm2 a-   70.00G 70.00G
/dev/dm-14 vg_cluster00 lvm2 a-   70.00G 70.00G
/dev/dm-9  vg_cluster00 lvm2 a-   70.00G 70.00G
/dev/sda3  rootvg      lvm2 a-   62.75G 38.97G

# vgs
VG          #PV #LV #SN Attr   VSize   VFree
rootvg        1   9   0 wz--n-  62.75G  38.97G
vg_cluster00   4   0   0 wz--n- 279.98G 279.98G

2 – Creating the Logical Volumes

# vcreate -L180G vg_cluster00 -n lvuserapp

3 – Making the Cluster

Particulary I like system-config-cluster

This is my simple /etc/cluster/cluster.conf

<?xml version="1.0"?>
<cluster alias="CLUSTER00" config_version="23" name="CLUSTER00">
<fence_daemon post_fail_delay="0" post_join_delay="3"/>
<clusternodes>
<clusternode name="node001" nodeid="1" votes="1">
<fence>
<method name="1"/>
</fence>
</clusternode>
<clusternode name="node003" nodeid="3" votes="1">
<fence>
<method name="1"/>
</fence>
</clusternode>
<clusternode name="node004" nodeid="4" votes="1">
<fence>
<method name="1"/>
</fence>
</clusternode>
<clusternode name="node002" nodeid="2" votes="1">
<fence>
<method name="1"/>
</fence>
</clusternode>
</clusternodes>
<fencedevices/>
</cluster>

4 – making gfs2 filesystems

# mkfs -t gfs2 -p lock_dlm -t CLUSTER00:lvuserapp -j 8 /dev/vg_cluster00/lvuserapp

5 – mounting GFS2 filesystems

Put on the /etc/fstab file

/dev/vg_cluster00/lvuserapp      /home/userapp           gfs2    defaults       0 0

6 – Start the cluster services

Note: For complete startup start the service on all nodes.

service cman start
service rgmanager start

7 – Check the nodes

# cman_tool nodes
Node  Sts   Inc   Joined               Name
1   M    196   2009-04-09 11:57:16  node001
2   M    216   2009-04-09 11:57:32  node002
3   M    212   2009-04-09 11:58:02  node003
4   M    214   2009-04-09 11:58:32  node004

8 – mounting the filesystems

Mount filesystems on all nodes

# mount /home/userapp

9 – testing the read/write files on nodes

# touch /home/userapp/teste.txt

Check on all servers if this file exist.

Sources:

Anúncios

Looking my adapters I found fcs0 in diagnose state

# lsdev -Cc adapter
ent0    Available 21-08    IBM 10/100 Mbps Ethernet PCI Adapter (23100020)
ent1    Available 1A-08    10/100 Mbps Ethernet PCI Adapter II (1410ff01)
ent2    Available 14-08    Gigabit Ethernet-SX PCI Adapter (14100401)
ent3    Available 37-08    10/100 Mbps Ethernet PCI Adapter II (1410ff01)
ent4    Available 27-08    Gigabit Ethernet-SX PCI Adapter (14100401)
ent5    Available 3A-08    Gigabit Ethernet-SX PCI Adapter (14100401)
fcs0    Diagnose  2A-08    FC Adapter
fda0    Available 01-D1    Standard I/O Diskette Adapter
mg20    Available 2D-08    GXT130P Graphics Adapter
ppa0    Available 01-R1    CHRP IEEE1284 (ECP) Parallel Port Adapter
sa0     Available 01-S1    Standard I/O Serial Port
sa1     Available 01-S2    Standard I/O Serial Port
sa2     Available 01-S3    Standard I/O Serial Port
sa3     Available 01-S4    Standard I/O Serial Port
scsi0   Available 11-08    Wide/Ultra-2 SCSI I/O Controller
scsi1   Available 11-09    Wide/Ultra-2 SCSI I/O Controller
scsi2   Available 17-08    Wide/Fast-20 SCSI I/O Controller
sioka0  Available 01-K1-00 Keyboard Adapter
siokma0 Available 01-K1    Keyboard/Mouse Adapter
sioma0  Available 01-K1-01 Mouse Adapter

# lsdev -C | grep fsc0
fcs0    Diagnose  2A-08    FC Adapter

Run the ucfgdiag to change this state

# /etc/methods/ucfgdiag -l fcs0

Looking devices

# lsdev -Cc adapter
ent0    Available 21-08    IBM 10/100 Mbps Ethernet PCI Adapter (23100020)
ent1    Available 1A-08    10/100 Mbps Ethernet PCI Adapter II (1410ff01)
ent2    Available 14-08    Gigabit Ethernet-SX PCI Adapter (14100401)
ent3    Available 37-08    10/100 Mbps Ethernet PCI Adapter II (1410ff01)
ent4    Available 27-08    Gigabit Ethernet-SX PCI Adapter (14100401)
ent5    Available 3A-08    Gigabit Ethernet-SX PCI Adapter (14100401)
fcs0    Defined   2A-08    FC Adapter
fda0    Available 01-D1    Standard I/O Diskette Adapter
mg20    Available 2D-08    GXT130P Graphics Adapter
ppa0    Available 01-R1    CHRP IEEE1284 (ECP) Parallel Port Adapter
sa0     Available 01-S1    Standard I/O Serial Port
sa1     Available 01-S2    Standard I/O Serial Port
sa2     Available 01-S3    Standard I/O Serial Port
sa3     Available 01-S4    Standard I/O Serial Port
scsi0   Available 11-08    Wide/Ultra-2 SCSI I/O Controller
scsi1   Available 11-09    Wide/Ultra-2 SCSI I/O Controller
scsi2   Available 17-08    Wide/Fast-20 SCSI I/O Controller
sioka0  Available 01-K1-00 Keyboard Adapter
siokma0 Available 01-K1    Keyboard/Mouse Adapter
sioma0  Available 01-K1-01 Mouse Adapter

# lsdev -C | grep fsc0
fcs0    Defined   2A-08    FC Adapter

Now, I can remove device and your childs for new discover.

ATENTION: This command remove all child and device

# rmdev -dl fcs0 -R
fcnet0 deleted
fscsi0 deleted
fcs0 deleted

For new discover run cfgmgr

# cfgmgr -v