2009. 3. 31. 16:51

Raid server 구성정보 출력

Fedora 10을 설치한 HP xw4400 서버 정보

[root@raid-server home]# df -k
        Filesystem           1K-blocks      Used Available Use% Mounted on
        /dev/md0              25197100   5042740  18874392  22% /
        tmpfs                  4155928        76   4155852   1% /dev/shm/dev/mapper/VG0--raid-lv0
                             453456384   2093972 428328148   1% /home

        Filesystem            Size  Used Avail Use% Mounted on
        /dev/md0               25G  4.9G   19G  22% /
        tmpfs                 4.0G   76K  4.0G   1% /dev/shm/dev/mapper/VG0--raid-lv0
                              433G  2.0G  409G   1% /home


[root@raid-server home]# fdisk -l
        Disk /dev/sda: 500.1 GB, 500107862016 bytes
        255 heads, 63 sectors/track, 60801 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        Disk identifier: 0x000d49c3

           Device Boot      Start         End      Blocks   Id  System
        /dev/sda1   *           1        3187    25599546   fd  Linux raid autodetect
        /dev/sda2            3188        3448     2096482+  fd  Linux raid autodetect
        /dev/sda3            3449       60801   460687972+  fd  Linux raid autodetect

        Disk /dev/sdb: 500.1 GB, 500107862016 bytes
        255 heads, 63 sectors/track, 60801 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        Disk identifier: 0x000691f2

           Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1   *           1        3187    25599546   fd  Linux raid autodetect
        /dev/sdb2            3188        3448     2096482+  fd  Linux raid autodetect
        /dev/sdb3            3449       60801   460687972+  fd  Linux raid autodetect

[root@raid-server home]# pvdisplay
          --- Physical volume ---
          PV Name               /dev/md2
          VG Name               VG0-raid
          PV Size               439.35 GB / not usable 2.50 MB
          Allocatable           yes (but full)
          PE Size (KByte)       16384
          Total PE              28118
          Free PE               0
          Allocated PE          28118
          PV UUID               Rk2rBa-LBE7-0mkC-6hz1-P79o-hZ2o-EkNptz

[root@raid-server home]# vgdisplay
          --- Volume group ---
          VG Name               VG0-raid
          System ID
          Format                lvm2
          Metadata Areas        1
          Metadata Sequence No  2
          VG Access             read/write
          VG Status             resizable
          MAX LV                0
          Cur LV                1
          Open LV               1
          Max PV                0
          Cur PV                1
          Act PV                1
          VG Size               439.34 GB
          PE Size               16.00 MB
          Total PE              28118
          Alloc PE / Size       28118 / 439.34 GB
          Free  PE / Size       0 / 0
          VG UUID               L2lNJW-H96E-yr2y-kQYB-dVgu-cNtc-Nkjint

[root@raid-server home]# lvdisplay
          --- Logical volume ---
          LV Name                /dev/VG0-raid/lv0
          VG Name                VG0-raid
          LV UUID                T0zlfw-90Ev-yimU-FMXF-iJW3-q27Z-SzKWI6
          LV Write Access        read/write
          LV Status              available
          # open                 1
          LV Size                439.34 GB
          Current LE             28118
          Segments               1
          Allocation             inherit
          Read ahead sectors     auto
          - currently set to     256
          Block device           253:0

[root@raid-server home]# mdadm --detail --scan
        ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=4986355b:6ff50e18:4f8021ce:19673fca
        ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID=ff1e49cb:daaea683:1ed31a98:32961f73
        ARRAY /dev/md2 level=raid1 num-devices=2 metadata=0.90 UUID=c26b0201:2ada3aa0:ad476803:4025a76b

[root@raid-server home]# ll /dev/md*
        brw-rw---- 1 root disk 9, 0 2009-03-04 13:16 /dev/md0
        brw-rw---- 1 root disk 9, 1 2009-03-04 22:16 /dev/md1
        brw-rw---- 1 root disk 9, 2 2009-03-04 13:16 /dev/md2

[root@raid-server home]# cat /proc/mdstat
        Personalities : [raid1] [raid6] [raid5] [raid4]
        md2 : active raid1 sda3[0] sdb3[1]
              460687872 blocks [2/2] [UU]
        md1 : active raid1 sda2[0] sdb2[1]
              2096384 blocks [2/2] [UU]
        md0 : active raid1 sda1[0] sdb1[1]
              25599424 blocks [2/2] [UU]

[root@raid-server fwiki]# cat /boot/grub/grub.conf
        # grub.conf generated by anaconda
        # #
        # # Note that you do not have to rerun grub after making changes to this file
        # # NOTICE:  You do not have a /boot partition.  This means that
        # #          all kernel and initrd paths are relative to /, eg.
        # #          root (hd0,0)
        # #          kernel /boot/vmlinuz-version ro root=/dev/md0
        # #          initrd /boot/initrd-version.img
        # #boot=/dev/md0
         default=0
         timeout=1
         splashimage=(hd0,0)/boot/grub/splash.xpm.gz
         hiddenmenu
         password --md5 $1$FoYUHc5D$I/KG.HEBwtG3kSVjkUsgY0
         title Fedora (2.6.27.5-117.fc10.i686.PAE)
                 root (hd0,0)
                 kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686.PAE ro root=UUID=49d8a50b-bcab-49ed-a365-dffa6fdf8dd6 rhgb quiet
                 initrd /boot/initrd-2.6.27.5-117.fc10.i686.PAE.img

2009. 3. 31. 16:47

Raid and LVM 개요

Raid and LVM
 : KLDP문서로 개념 잡고 Managing RAID and LVM with Linux 내용으로 설치.(설명이 잘 되어 있다.)

1. Logical Volume Manager HOWTO - KLDP
        http://wiki.kldp.org/wiki.php/DocbookSgml/LVM-HOWTO?action=edit
2. Managing RAID and LVM with Linux
        http://www.gagme.com/greg/linux/raid-lvm.php       
3. mdadm 으로 소프트 레이드 구성
        http://blog.naver.com/parkjy76/30034935057
4. LVM (logical volume manager),/etc/fstab
        http://blog.naver.com/lovexit/70030137960

Raid level 관련 자료
1. Raid level
        http://www.raid.co.kr/sub/study/level.asp
        http://blog.naver.com/morningz/150037655081
        http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-raid-levels.html

RAID1에 페도라 설치하기 (부트영역 포함)
        http://www.hanb.co.kr/board/view.php?ma_id=2087&mcf_id=28&pg=1&sfl=&sw=
      

2009. 3. 31. 16:41

Raid server 설치 개요 - Fedora 10

서버(Linux Software Raid)  설치 개요 - Fedora 10

[ 함께 볼 글들...]

 1. 500G hd 2개 설치(SATA2)되어 있어서 Software RAID(level1)로 구성했다.
        - 하드가 4개였다면 leve5로...

 2. Partition을 3개로 나눴다.
   1)  /, /home, swap 이렇게 3개로 나눴다.
        Filesystem            Size  Used Avail Use% Mounted on
        /dev/md0               25G  4.9G   19G  22% /
        tmpfs                 4.0G   76K  4.0G   1% /dev/shm/dev/mapper/VG0--raid-lv0
                              433G  2.0G  409G   1% /home

   2) sda, sdb를 Raid로 묶었다.
    [root@raid-server home]# cat /proc/mdstat
        Personalities : [raid1] [raid6] [raid5] [raid4]
        md2 : active raid1 sda3[0] sdb3[1]
              460687872 blocks [2/2] [UU]
        md1 : active raid1 sda2[0] sdb2[1]
              2096384 blocks [2/2] [UU]
        md0 : active raid1 sda1[0] sdb1[1]
              25599424 blocks [2/2] [UU]

 3. 구성
  1) / 디렉토리에 Fedora를 깔았다.
        - /boot를 별도로 파티션을 나눌까 하다가 그럴필요가 있을까 싶어서 통으로 묶었다.
  2) /home 디렉토리에 데이터를 깔았다.
        - /, swap을 빼고 나머지는 전부 /home으로 잡았다.
  3) swap 디렉토리는 4G를 잡았다.
        - RAM의 2배로 잡으면 된다고 했는데... 현재 RAM은 8G...
  4) 각각을 Raid로 묶었다.
      [root@raid-server home]# fdisk -l
        Disk /dev/sda: 500.1 GB, 500107862016 bytes
        255 heads, 63 sectors/track, 60801 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        Disk identifier: 0x000d49c3

           Device Boot      Start         End      Blocks   Id  System
        /dev/sda1   *           1        3187    25599546   fd  Linux raid autodetect
        /dev/sda2            3188        3448     2096482+  fd  Linux raid autodetect
        /dev/sda3            3449       60801   460687972+  fd  Linux raid autodetect

        Disk /dev/sdb: 500.1 GB, 500107862016 bytes
        255 heads, 63 sectors/track, 60801 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        Disk identifier: 0x000691f2

           Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1   *           1        3187    25599546   fd  Linux raid autodetect
        /dev/sdb2            3188        3448     2096482+  fd  Linux raid autodetect
        /dev/sdb3            3449       60801   460687972+  fd  Linux raid autodetect

  5) /home을 LVM으로 설정했다.
        - 나중에 500G짜리를 더 붙일수 있어 추가되면 여기 LVM에 더 붙이면 될듯 싶다
        - 하드가 크기 때문에 Volumn Group 으로 묶을때 physical extent size를 크게 잡아주어야 한다.
                # vgcreate -s 16M <volume group name>
                The default value for the physical extent size can be too low for a large RAID array. In those cases you'll need to specify the -s option with a larger than default physical extent size. The default is only 4MB as of the version in Fedora Core 5. The maximum number of physical extents is approximately 65k so take your maximum volume size and divide it by 65k then round it to the next nice round number. For example, to successfully create a 550G RAID let's figure that's approximately 550,000 megabytes and divide by 65,000 which gives you roughly 8.46. Round it up to the next nice round number and use 16M (for 16 megabytes) as the physical extent size and you'll be fine:

6) 서버 HW 정보
  - HP xw4400


2009. 3. 31. 14:40

tftp server and client - Fedora 5

UPD 트래픽 시험을 하려고 보니 linux서버에 tftp 서버를 설치하면 되겠더군요.

그래서 Fedora core 5에 tftp-server와 client를 아래처럼 설치....
1. tftp server, client 설치(Fedora 5에)
 a. rpm -ivh tftp-server-0.41-1.2.1.i386.rpm
 b. rpm -ivh tftp-0.41-1.2.1.i386.rpm

2. server configuration
 a./etc/xinetd.d/tftp 파일을 아래처럼 설정
  - server_args부분의 -c 옵션 안줬더니 put이 잘 안되더군요.

service tftp
{
  socket_type = dgram
  protocol = udp
  wait = yes
  user = root
  server = /usr/sbin/in.tftpd
  server_args = -c -s /tftpboot
  disable = no
  per_source = 11
  cps = 100 2
  flags = IPv4
}

3. tftp서버, 클라이언트 사용하기
 a. 서버 실행시키기
  : service xinet.d restart
  : ps -ef |grep tftp 로 잘 실행되었는지 확인

 b. linux 클라이언트에서 파일 주고 받기
  - tftp -v 192.168.x.x(tftp서버) 실행
  - put 또는 get 명령으로 파일 주고 받기

 c. 윈도우용 tftp 서버, 클라이언트 프로그램



2009. 3. 26. 09:55

Fedora 10 installation

1. Installation
  ㄱ. DVD를 가지고 installation을 했다.
  ㄴ. CD1을 이용해서 Network installation을 했더니 에러가 난다.

   a. https://bugzilla.redhat.com/show_bug.cgi?id=517171

   b. Possibleworkarounds include:

   * Boot and install from CD
   * Boot and install from DVD
   * Boot from PXE, install from network  


2. install 후 설치한 것들 

  ㄱ. yum -y updata
  ㄴ. yum으로 설치한 것들
    a. vsftpd, wireshark, wireshark-gnome, bind, bind-utils, dhcp, vlc
        : vlc를 이용해 VOD 서버 설정은 여기를 참조
  ㄷ. telnet server
     a. 아래 2개 package를 설치한다.
      - rpm -ivh xinetd-2.3.14-21.fc10.i386.rpm
      - rpm -ivh telnet-server-0.17-42.fc9.i386.rpm
     b. xinetd를 재시동 하면 telnet server가 실행된다.
      - service xinetd restart   # xinetd를 재시동해서 telnet-server를 살린다.
     c. 아래처럼 명령을 수행하면 재부팅 해도 telnet server가 구동된다.
      - chkconfig telnet on     #재부팅 해도 telnet server가  살도록 설정     d. 설치 파일들(yum으로는 설치가 안되더라)

2009. 2. 25. 10:55

fc5에서 yum 설정 - /etc/yum.repo.d

Fedora core 5를 설치하고 yum이 안된다.
아마 주소가 바뀌었나 보다.

아래 URL 참고하여 바꿔준다.
 http://freekang.tistory.com/47?srchid=BR1http%3A%2F%2Ffreekang.tistory.com%2F47

파일 설정은 /etc/yum.conf에 URL 주소를 적어주거나
/etc/yum.repo.conf 디렉토리 안에 있는 각각 파일에 설정해 주어도 된다.

ex) fedora-core.repo : baseurl=http://fedora.hostway.co.kr/3/i386/os/
fedora-updates.repo : baseurl=http://fedora.hostway.co.kr/updates/3/i386/
사용하지 않는 repo들은 enabled=0으로 설정해 둔다.

--------------------------------------------------------

#######################
# yum korea mirro site #
#######################
 
vi /etc/yum.conf

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800


# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d


[base]
name = Fedora Core 5 base
baseurl=http://ftp.sayclub.co.kr/pub/fedora/linux/core/5/i386/os/

[updates]
name = Fedora Core 5 base
baseurl=http://ftp.sayclub.co.kr/pub/fedora/linux/core/updates/5/i386

[updates-released]
name = Fedora Core 5 base
baseurl=http://ftp.sayclub.co.kr/pub/fedora/linux/core/updates/5/i386


[extra]
name = Fedora Core 5 base
baseurl=http://ftp.sayclub.co.kr/pub/fedora/linux/extras/5/i386/



# fedora 버젼에 맞게 바꿔준후 yum restart.


/etc/rc.d/init.d/yum restart


##### 다른 mirror list


[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800


# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

[base]
name = Fedora Core 5 base
baseurl=http://ftp.kaist.ac.kr/pub/fedora/linux/core/5/i386/os/

[updates]
name = Fedora Core 5 base
baseurl=http://ftp.kaist.ac.kr/pub/fedora/linux/core/updates/5/i386

[updates-released]name = Fedora Core 5 base
baseurl=http://ftp.kaist.ac.kr/pub/fedora/linux/core/updates/5/i386


[extra]name = Fedora Core 5 base
baseurl=http://ftp.kaist.ac.kr/pub/fedora/linux/extras/5/i386/

2009. 1. 12. 17:54

볼륨 키가 안 먹는다(아직 안된다) - Fedora 8, Sound

System > Preference > Personel > Keyboard shortcuts 에서 Sound 부분에서 소리관련 키를 다시 설정했더니 된다.
 - 음소거 키는 동작하지 않는다.

-------- 아래는 안되었지만 참고 사항 ------

1. ~/.Xmodmap 에 아래를 넣고
볼륨키를 누르면 화면에 컨트롤GUI가 display는 되지만 동작하지는 않는다
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute

2. System > Preference > Hardware > Sound 에서
Default Mixer Tracks 를 Alsa 에서 OSS로 해주면 좀 다르다....

위 두가지를 가지고 조합해서 좀더 해봐야 겠다...

2009. 1. 12. 16:56

Opera 9.63에서 글 쓸때 빈줄 한줄이 생기는 문제

Opera로 tistory 블로그에서 글을 쓸때 아래처럼 해 봅시다.
 1. 줄을 바꿀때는 시프트 + 엔터
 2. 빈줄을 만들때는 시프트 + 엔터를 2번 쳐줍니다.


참고

 http://youngjr.tistory.com/35
2009. 1. 12. 16:46

노트북 스피커로 소리 안나올 때 설정(Sound) - Fedora 8

소리가 이어폰으로는 들리는데
노트북 스피커(Xnote LS70 Express)로는 들리지 않았다.
 (SND-HDA-INTEL, CMI9880)

/etc/modprobe.conf 파일에서 model부분을 바꿔주니 잘 들린다.
options snd-hda-intel model=minimal

참고 : 정확한 모델은 아래서 찾는다.
 http://kldp.org/node/99792
 http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt

2009. 1. 5. 17:01

Opera 설치 & 설정 - FC8, Opera 9.6x

[ index ]
 - install
 - upgrade
 - configuration
 - 문제점
 - opera 환경 파일

 o install
  - 설치는 해당 tar.gz 파일을 풀고 실행시키기만 하면 된다.
  - opera를 Upgrade 또는 새로 설치할 때는 gz파일 받아서 풀기만 하면 되는데...
  그전 설치 디렉토리에서 usersettting, plugin 디렉토리만 copy해서 넣어준다.
  실행을 시킬때는 /home/goguma/bin에 스크립트를 아래처럼 만들어 실행시킨다.
  - cd /home/goguma/opera
  - ./opera $1&

 o Upgrade

 - tar.gz 파일 압축을 풀고
 - 그전 버전의 환경 파일을 copy 해준다.
  * tar cvfz opera-bkup-$DATE.tgz ./profile/opera6.adr ./profile/speeddial.ini ./usr/lib/opera/plugins ./profile/search.ini
  * ./profile/opera6.ini 파일까지 copy 해 주면 좋은데 디렉토리 등이 바뀌니 확인할 것

o font 관련 설정해주기

  * Tool > Preference 메뉴에서
  - General 탭에서 Language를 바꾸면 메뉴가 한글로 나온다.
  - Web Pages 탭에서 Normal Fonts를 Malgul Gothic으로 바꿨다(뭐지?)
  - Advanced 탭에서
  * Tabs 에서 Reuse current tab를 선택해제 해준다(새로운 북마크 주소등을 누르면 새 탭이 열린다)
  * Fonts 에서 Browser Menus 폰트를 Malgul Gothic으로 바꿨다
  * Fonts 에서 Minimum font size 를 16으로 바꿨다
  * Download에서 디렉토리를 지정해준다.

 o 문제점
 < histroy >
  : shared버전을 현재 사용중이다. 나름 쓸만하다
  - 가끔씩 죽는다
  - static 버전은 empas나 ynet의 이름검색에서 글씨가 하나씩 밀린다.
  - shared 버전은 가끔씩 글씨가 안 써진다(이때는 opera 재시동). 즉 f2하고 주소 입력시 자주 발생. 그러나 위의 현상은 안 나>온다.
 o opera 환경파일
  -------------------------------
  - usersettings
  opera6.ini, opera6.adr, speeddial.ini
  - plugins
  - user css
  ./usersettings/styles/user/
  -------------------------------
  *Preferences
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/opera6.ini
  *Bookmarks
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/opera6.adr
  *Plug-in path
  /usr/lib/mozilla/plugins
  /home/user/program/opera-9.20-20070409.6-shared-qt.i386-en-638/plugins
  *User CSS directory
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/styles/user/
  *Opera directory
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/
  *Saved session
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/opera.win
  *Cache
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/cache4/
  *Mail directory
  /home/goguma/program/opera-9.21-20070510.6-shared-qt.i386-en-641/usersettings/mail/