2011년 4월 27일 수요일

[CentOS] OS BMT for Dell R610

Dell R610 서버에 CentOS 5.5 vs CentOS 5.6 64bit 를 BMT 해보았습니다.

<Spec>
- CPU : 2P Q.C Intel(R) Xeon(R) CPU E5530 @2.40GHz
- RAM : 32GB
- HDD : 250GB SATA 7.2k (RAID 5)
- OS : CentOS 5.5 vs 5.6 (64bit)

<BMT Conf>
- BMT Tool : iozone v3.392 (http://www.iozone.org/)
- File Size : 1GB
- Thread : 4




















CentOS 5.6 ext4 파일시스템의 sequential write 부분의 값이 대략 3배 정도 높네요.
하지만 지켜봐야 할 값은 random 부분이겠죠?^^
이상 R610의 CentOS 64bit의 BMT 였습니다.

2011년 4월 13일 수요일

[CentOS] 파일시스템 ext3를 ext4로 변경하기

CentOS 5.6
파일시스템 ext3 -> ext4 변경하기


[root@test ~]# uname -a
Linux test 2.6.18-238.el5PAE #1 SMP Thu Jan 13 17:10:20 EST 2011 i686 i686 i386 GNU/Linux


1. e4fsprogs 설치
[root@test ~]# yum install e4fsprogs

Loaded plugins: dellsysid, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.tt.co.kr
 * extras: centos.tt.co.kr
 * updates: centos.tt.co.kr
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package e4fsprogs.x86_64 0:1.41.12-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
 Package                          Arch                          Version                              Repository                   Size
=======================================================================================================================================
Installing:
 e4fsprogs                        x86_64                        1.41.12-2.el5                        base                        1.1 M

Transaction Summary
=======================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
e4fsprogs-1.41.12-2.el5.x86_64.rpm                                                                              | 1.1 MB     00:00  
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : e4fsprogs                                                                                                       1/1

Installed:
  e4fsprogs.x86_64 0:1.41.12-2.el5                                                                                                  

Complete!



2.파일시스템 및 UUID 확인

[root@test ~]# blkid
/dev/sda3: LABEL="/home" UUID="6db96611-dc04-4ec4-a077-1a49eea31ae6" TYPE="ext3"
/dev/sda2: LABEL="SWAP-sda2" TYPE="swap"
/dev/sda1: LABEL="/1" UUID="2fd889d4-0967-4716-95ba-5672ee65e1fb" TYPE="ext3"
/dev/sdb2: UUID="171a0f2f-011f-4b39-9285-27e728fe1f5d" TYPE="ext3"






[root@test ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext3    9.7G  1.6G  7.7G  17% /
/dev/sda3     ext3    201G  188M  190G   1% /home
tmpfs        tmpfs     16G     0   16G   0% /dev/shm
/dev/sdb2     ext3    229G   25G  193G  12% /data



[root@test ~]# cat /etc/fstab
LABEL=/1                /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/data             /data                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0


3. 변경할 파티션 해제 

[root@test /]# umount /dev/sdb2
[root@test /]#
[root@test /]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext3    9.7G  1.6G  7.7G  17% /
/dev/sda3     ext3    201G  188M  190G   1% /home
tmpfs        tmpfs     16G     0   16G   0% /dev/shm
[root@test /]#


4. tune4fs를 이용하여 ext4 파일시스템으로 변경 

[root@test /]# tune4fs -O extents,uninit_bg,dir_index /dev/sdb2
tune4fs 1.41.12 (17-May-2010)

Please run e4fsck on the filesystem.



[root@test /]# e4fsck -pfDC0 /dev/sdb2
/dev/sdb2: 70/30457856 files (0.0% non-contiguous), 7382227/60914455 blocks

>> 위와같이 e4fsck가 정상적으로 안나오고 fsck 돌리라고 나오면 #e4fsck /dev/sdb2 를 실행한 후 위의 명령줄을 실행한다.


5. ext4로 변경되었는지 확인하기 위해 /dev/sdb2 를 /data로 마운트

[root@test /]# mount /dev/sdb2 /data
[root@test /]#
[root@test /]#
[root@test /]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext3    9.7G  1.6G  7.7G  17% /
/dev/sda3     ext3    201G  188M  190G   1% /home
tmpfs        tmpfs     16G     0   16G   0% /dev/shm
/dev/sdb2     ext4    229G   25G  193G  12% /data
[root@test /]#



[root@test /]# blkid
/dev/sda3: LABEL="/home" UUID="6db96611-dc04-4ec4-a077-1a49eea31ae6" TYPE="ext3"
/dev/sda2: LABEL="SWAP-sda2" TYPE="swap"
/dev/sda1: LABEL="/1" UUID="2fd889d4-0967-4716-95ba-5672ee65e1fb" TYPE="ext3"
/dev/sdb2: UUID="171a0f2f-011f-4b39-9285-27e728fe1f5d" TYPE="ext4"


6. /etc/fstab 파일 수정
[root@test ~]# vi /etc/fstab


LABEL=/1                /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/data             /data                   ext4    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0

2011년 4월 12일 화요일

[CentOS] HDD 추가 및 ext4 파일시스템 구축

CentOS 5.6 이 나왔는데 파일시스템 ext4가 빌트인 안되었네요.
그래서 HDD 추가 후 ext4로 파일시스템 구축해보도록 하겠습니다.



1. 시스템 기본정보 확인
[root@test /]# uname -a
Linux test 2.6.18-238.el5PAE #1 SMP Thu Jan 13 17:10:20 EST 2011 i686 i686 i386 GNU/Linux
[root@test /]#
[root@test /]#

2. 디스크의 파티션 확인
[root@test /]#
[root@test /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.7G  1.2G  8.1G  13% /
/dev/sda3             201G  188M  190G   1% /home
tmpfs                  16G     0   16G   0% /dev/shm
[root@test /]#

3. 물리적인 디스크 확인
    ; 추가 장착된 /dev/sdb 를 ext4 파일시스템을 만들겠습니다.
[root@test /]#
[root@test /]# fdisk -l

Disk /dev/sda: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1305    10482381   83  Linux
/dev/sda2            1306        3366    16554982+  82  Linux swap / Solaris
/dev/sda3            3367       30334   216620460   83  Linux

Disk /dev/sdb: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
[root@test /]#
[root@test /]#

4. 새로운 파티션 생성
[root@test /]#
[root@test /]# fdisk /dev/sdb

The number of cylinders for this disk is set to 30334.
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): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): p

Disk /dev/sdb: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

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

Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): p

Disk /dev/sdb: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1        1       30334   243657823+  83  Linux

Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): w        <- 저장은 꼭! 합시다^^
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@test /]#

5. 생성된 파티션 확인
[root@test /]#
[root@test /]# fdisk -l

Disk /dev/sda: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1305    10482381   83  Linux
/dev/sda2            1306        3366    16554982+  82  Linux swap / Solaris
/dev/sda3            3367       30334   216620460   83  Linux

Disk /dev/sdb: 249.5 GB, 249510756352 bytes
255 heads, 63 sectors/track, 30334 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30334   243657823+  83  Linux
[root@test /]#
[root@test /]#
[root@test /]#

6. ext4 파일시스템을 사용할 수 있게 e4fsprogs 를 설치
[root@test /]#
[root@test /]# yum install e4fsprogs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.daum.net
 * extras: centos.mirror.cdnetworks.com
 * updates: ftp.riken.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package e4fsprogs.i386 0:1.41.12-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                        Arch                      Version                            Repository                 Size
=============================================================================================================================
Installing:
 e4fsprogs                      i386                      1.41.12-2.el5                      base                      1.1 M

Transaction Summary
=============================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
http://ftp.daum.net/centos/5.6/os/i386/CentOS/e4fsprogs-1.41.12-2.el5.i386.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
e4fsprogs-1.41.12-2.el5.i386.rpm                                                                      | 1.1 MB     00:01  
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : e4fsprogs                                                                                             1/1

Installed:
  e4fsprogs.i386 0:1.41.12-2.el5                                                                                          

Complete!
[root@test /]#

<e4fsprogs 관련 파일 참고>

[root@test ~]# rpm -ql e4fsprogs
/etc/mke4fs.conf
/sbin/debuge4fs
/sbin/dumpe4fs
/sbin/e4fsck
/sbin/e4image
/sbin/e4label
/sbin/e4undo
/sbin/finde4fs
/sbin/fsck.ext4
/sbin/fsck.ext4dev
/sbin/mke4fs
/sbin/mkfs.ext4
/sbin/mkfs.ext4dev
/sbin/resize4fs
/sbin/tune4fs
/usr/share/doc/e4fsprogs-1.41.12
/usr/share/doc/e4fsprogs-1.41.12/README
/usr/share/doc/e4fsprogs-1.41.12/RELEASE-NOTES
/usr/share/locale/ca/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/cs/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/de/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/es/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/fr/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/id/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/it/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/nl/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/pl/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/sv/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/tr/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/vi/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/zh_CN/LC_MESSAGES/e4fsprogs.mo
/usr/share/man/man5/e4fsck.conf.5.gz
/usr/share/man/man5/mke4fs.conf.5.gz
/usr/share/man/man8/debuge4fs.8.gz
/usr/share/man/man8/dumpe4fs.8.gz
/usr/share/man/man8/e4fsck.8.gz
/usr/share/man/man8/e4image.8.gz
/usr/share/man/man8/e4label.8.gz
/usr/share/man/man8/e4undo.8.gz
/usr/share/man/man8/fsck.ext4.8.gz
/usr/share/man/man8/fsck.ext4dev.8.gz
/usr/share/man/man8/mke4fs.8.gz
/usr/share/man/man8/mkfs.ext4.8.gz
/usr/share/man/man8/mkfs.ext4dev.8.gz
/usr/share/man/man8/resize4fs.8.gz
/usr/share/man/man8/tune4fs.8.gz

[root@test /]#
[root@test /]#

7. 새로 만든 파티션을 ext4 파일시스템으로 생성
[root@test /]#
[root@test /]# mkfs.ext4 /dev/sdb1
mke4fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
15228928 inodes, 60914455 blocks
3045722 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1859 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done                          
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune4fs -c or -i to override.
[root@test /]#

8. 새로운 디렉토리(/data)에 마운트
[root@test /]#
[root@test /]# mkdir /data
[root@test /]#
[root@test /]# mount /dev/sdb1 /data
[root@test /]#
[root@test /]#
[root@test /]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext3    9.7G  1.2G  8.1G  13% /
/dev/sda3     ext3    201G  188M  190G   1% /home
tmpfs        tmpfs     16G     0   16G   0% /dev/shm
/dev/sdb1     ext4    229G  188M  217G   1% /data
[root@test /]#

9. ext4는 e2label이 적용되지 않는다.
[root@test /]#
[root@test /]# e4label
Usage: e4label device [newlabel]
[root@test /]#
[root@test /]# e4label /dev/sdb1 /data
[root@test /]#
[root@test /]#
[root@test /]# e4label /dev/sdb1
/data
[root@test /]#
[root@test /]#


10. 자동으로 /data 파티션을 마운트하도록 설정
[root@test /]# vi /etc/fstab

LABEL=/1                /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/data             /data                   ext4    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
~
~
:wq!
[root@test /]# reboot

2011년 4월 11일 월요일

CentOS 5.6 Releases

http://www.centos.org/

CentOS 5.6 Releases 되었습니다.

- ext4 is now a fully supported file system
- libvirt was updated to 0.8.2
- bind was updated to 9.7 and supports NSEC3 now.
- ebtables was added
- php53 is available as a php replacement.
- System Security Services Daemon (SSSD) has been added.

Other upgrades include newer version of several wireless drivers, Samba3x, ghostscript, LVM, mod_nss, subversion and gcc, plus others.


자세한 사항은 릴리즈 노트 확인바랍니다.
http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.6




  • If upgrading from a CentOS 5 release earlier than 5.5 the following procedure is advised:
    yum clean all
    yum update glibc\*
    yum update yum\* rpm\* pyth\*
    yum clean all
    yum update mkinitrd nash
    yum update selinux\*
    yum update
    shutdown -r now
    
  • Exchange 2007 Server에 antispam 기능 추가하기

    Exchange Server 2007을 설치하면 spam 방지 기능 탭을 발견할 수 없다.
    하지만 Exchange 관리 쉘을 실행해서 script를 실행해 주면 spam 방지 기능 탭을 활성화 시킬 수 있다.

    1. Exchange Management Shell 실행
        C:\Program Files\Microsoft\Exchange Server\Scripts\ 디렉토리에 install-antispamagents.ps1 파일을 실행시켜준다.



    2. 시작->실행 -> Services.msc 를 실행하고 Exchange Server Transport 를 재시작한다.



    3. Exchange Management Console  실행하면 조직구성과 서버구성의 허브전송에 Anti-spam 탭 메뉴가 추가된 것을 확인할 수 있다.




    조직구성이나 서버구성의 허브전송 메뉴에서 Anti-spam 설정 부분에 적당한 spam 필터링 해서 Exchange 서버를 잘 운영하시기 바랍니다.