'시스템/리눅스'에 해당되는 글 6건

  1. 2015.01.15 리눅스 LVM 볼륨 확장
  2. 2014.09.01 CentOS(RHEL) 네트워크 본딩(Bonding)
  3. 2008.12.03 ipvsadm 리눅스 로드밸런스

[root@v3w210 ~]# fdisk -u /dev/xvdb;
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 5221.
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)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-83886079, default 63):
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-83886079, default 83886079):
Using default value 83886079

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


mkfs.ext3 /dev/xvdb1;
pvcreate /dev/xvdb1;
vgs;
vgextend VolGroup00 /dev/xvdb1;
lvextend -l +100%FREE /dev/mapper/VolGroup00-LogVol00;
df -h;
resize2fs /dev/mapper/VolGroup00-LogVol00;
df -h;


reboot

Posted by 호랭이~

CentOS 5 / Centos 6 기준


[root@linux]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE="bond0"
BOOTPROTO="static"
BROADCAST="XXX.XXX.XXX.XXX"
GATEWAY="XXX.XXX.XXX.XXX"
IPADDR="XXX.XXX.XXX.XXX"
NETMASK="XXX.XXX.XXX.XXX"
ONBOOT="yes"
TYPE="BOND"


[root@linux]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="none"
HWADDR="XX:XX:XX:XX:XX:XX"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="no"
MASTER="bond0"
SLAVE="yes"


[root@linux]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="XX:XX:XX:XX:XX:XX"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="no"
MASTER="bond0"
SLAVE="yes"


[root@linux]# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 mode=1 miimon=100

본딩옵션


[root@linux]# cat /etc/sysconfig/network
~~~~기존설정~~~~
GATEWAYDEV=bond0


#modprobe bonding

#service network restart








Posted by 호랭이~
선배 졸업연구 프로젝트를 도와주다가 이래저래 했던 내용들 정리...

*Master 노드
/etc/sysctl.conf 수정
------------------------------------------------------------
net.ipv4.ip_forward = 1
------------------------------------------------------------

/etc/sysconfig/network-scripts/ifcfg-eth0:0 생성
------------------------------------------------------------
DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=가상ip
NETMASK=255.255.255.0
------------------------------------------------------------
#ifconfig eth0:0 가상ip up (후 ifconfig 로 확인)
#yum install ipvsadm
#ipvsadm -A -t 가상ip:포트 -s 알고리즘
(ex)#ipvsadm -A -t 1.1.1.1:80 -s rr
#ipvsadm -a -t 가상ip:포트 -r 실서버ip:포트 -g
(ex)#ipvsadm -a -t 1.1.1.1:80 -r 1.1.1.2:80 -g
#service ipvsadm save
#ipvsadm -L (체크)

*Slave 노드
/etc/sysctl.conf 추가
------------------------------------------------------------
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
------------------------------------------------------------
#yum install arptables_jf
#arptables -A IN -j DROP -d 가상ip
#service arptables save
#ifconfig dummy0 가상ip netmask 255.255.255.255 broadcast 가상ip up

Posted by 호랭이~
TAG 리눅스