-scanbus로 디바이스 정보 확인

[root@dev156 _home]# cdrecord -scanbus

scsibus4:

4,0,0 400) 'ATAPI   ' 'DVD A DH16ABS   ' 'PS21' Removable CD-ROM

4,1,0 401) *

4,2,0 402) *

4,3,0 403) *

4,4,0 404) *

4,5,0 405) *

4,6,0 406) *

4,7,0 407) *


ISO 파일로 CD굽기

[root@dev156 _home]# cdrecord -v -eject speed=4 dev=4,0,0 CentOS-6.2-x86_64-bin-DVD1.iso

wodim: No write mode specified.

wodim: Asuming -tao mode.

wodim: Future versions of wodim may have different drive dependent defaults.

TOC Type: 1 = CD-ROM

scsidev: '4,0,0'

scsibus: 4 target: 0 lun: 0

WARNING: the deprecated pseudo SCSI syntax found as device specification.

Support for that may cease in the future versions of wodim. For now,

the device will be mapped to a block device file where possible.

Run "wodim --devices" for details.

Linux sg driver version: 3.5.27

Wodim version: 1.1.9

SCSI buffer size: 64512

Device type    : Removable CD-ROM

Version        : 5

Response Format: 2

Capabilities   : 

Vendor_info    : 'ATAPI   '

Identification : 'DVD A DH16ABS   '

Revision       : 'PS21'

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Current: 0x0011 (DVD-R sequential recording)

Profile: 0x002B (DVD+R/DL) 

Profile: 0x001B (DVD+R) 

Profile: 0x001A (DVD+RW) 

Profile: 0x0016 (DVD-R/DL layer jump recording) 

Profile: 0x0015 (DVD-R/DL sequential recording) 

Profile: 0x0014 (DVD-RW sequential recording) 

Profile: 0x0013 (DVD-RW restricted overwrite) 

Profile: 0x0012 (DVD-RAM) 

Profile: 0x0011 (DVD-R sequential recording) (current)

Profile: 0x0010 (DVD-ROM) 

Profile: 0x000A (CD-RW) 

Profile: 0x0009 (CD-R) 

Profile: 0x0008 (CD-ROM) 

Profile: 0x0002 (Removable disk) 

Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).

Driver flags   : SWABAUDIO BURNFREE 

Supported modes: PACKET SAO

Drive buf size : 1177600 = 1150 KB

Beginning DMA speed test. Set CDR_NODMATEST environment variable if device

communication breaks or freezes immediately after that.

FIFO size      : 4194304 = 4096 KB

Track 01: data  4218 MB        

Total size:     4844 MB (479:56.41) = 2159731 sectors

Lout start:     4844 MB (479:58/31) = 2159731 sectors

Current Secsize: 2048

HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.

Blocks total: 2298496 Blocks current: 2298496 Blocks remaining: 138765

Speed set to 8310 KB/s

Starting to write CD/DVD at speed   6.0 in real unknown mode for single session.

Last chance to quit, starting real write in    0 seconds. Operation starts.

Waiting for reader process to fill input buffer ... input buffer ready.

Performing OPC...

Starting new track at sector: 0

Track 01: 4218 of 4218 MB written (fifo 100%) [buf  99%]   6.4x.

Track 01: Total bytes read/written: 4423129088/4423129088 (2159731 sectors).

Writing  time:  560.568s

Average write speed   6.0x.

Min drive buffer fill was 57%

Fixating...

Fixating time:   14.648s

wodim: fifo had 69669 puts and 69669 gets.

wodim: fifo was 0 times empty and 25652 times full, min fill was 82%.


CD 데이타 지우기

[root@dev156 _home]# cdrecord -eject --dev=4,0,0 --blank=all



더욱 자세한 것은 여기로 ^^

http://realmind.tistory.com/entry/Linux-Shell%EC%97%90%EC%84%9C-CD-%EA%B5%BD%EA%B8%B0

출처 :  http://www.spaceprogram.com/knowledge/2004/01/starting-tomcat-as-service-on-linux.html 

# vim /etc/init.d/tomcatd


# This is the init script for starting up the

# Jakarta Tomcat server

#

# chkconfig: 345 91 10

# description: Starts and stops the Tomcat daemon.

#

# Source function library.

 . /etc/rc.d/init.d/functions

# Get config.

 . /etc/sysconfig/network

# Check that networking is up.

 [ "${NETWORKING}" = "no" ] && exit 0

 tomcat=/usr/local/tomcat6

 startup=$tomcat/bin/startup.sh

 shutdown=$tomcat/bin/shutdown.sh

 CATALINA_HOME=/usr/local/tomcat6; export CATALINA_HOME

 JAVA_HOME=/usr/java/jdk1.6.0_29; export JAVA_HOME

 start(){

  echo -n $"Starting Tomcat service: "

  #daemon -c

  $startup

  RETVAL=$?

  echo

 }

 stop(){

  action $"Stopping Tomcat service: " $shutdown

  RETVAL=$?

  echo

 }

 status(){

  numproc=`ps -ef | grep catalina | grep -v "grep catalina" | wc -l`

  if [ $numproc -gt 0 ]; then

  echo "Tomcat is running..."

  else

  echo "Tomcat is stopped..."

  fi

 }

 restart(){

   stop

   start

 }

 # See how we were called.

 case "$1" in

 start)

  start

  ;;

 stop)

  stop

  ;;

 status)

  status
 ;;

 restart)

  restart

  ;;

 *)

  echo $"Usage: $0 {start|stop|status|restart}"

  exit 1

 esac

 exit 0


리눅스 서버 세팅 

1. VNC 서버 설치 (환경은 CentOS 6)
#yum install vnc-server

2. VNC 설정. 아래는 root 계정 사용과 해상도는 1680x1050 사용
#vim /etc/sysconfig/vncservers

VNCSERVERS="1:root"

VNCSERVERARGS[1]="-geometry 1680x1050"


32. VNC에 사용할 패스워드 설정
#vncpasswd
패스워드 입력 

4. VNC에 사용될 tcp 포트 추가해서 열어준다.
#vim /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

# /etc/init.d/iptables restart

5. VNC 서버 시작 
#/etc/init.d/vncserver start


CentOS 5 일 경우 VNC 로 접속했을 때
 

#vim ~/.vnc/xstartup


#twm &     <- 주석처리 하고 GNOME 데스크탑이 실행될 수 있도록 아래 줄을 추가해준다.

gnome-session &   



윈도우 클라이언트 세팅   

1. VNC Viewer 다운로드


2. Server란에 IP주소:포트 입력



3. OK 눌러서 비밀번호 입력 후 접속 !
Xen 4.0 Release
-  성능, 확장성 개선
- blktap2 driver (blktap1 계승한 것. disk backend driver), VHD 이미지 지원, snapshot, cloning 개선
- 가속화된 하드웨어 IO 가상화 기술(Intel VT-d, AMD IOMMU) 사용해서 IOMMU PCI Passthru를 향상시킴
 HVM에서는 IOMMU를 Chipset이 지원해야 PCI Passthru 사용가능.
 IOMMU(Input/Output memory management unit)
- VGA Graphic Passthru. (HVM 에서만 가능. IOMMU 요구, VM에서 3D, 하드웨어 그래픽 가속)
- TMEM(사용하지 않는 PV Guest 메모리 관련 기술). Transcendent Memory (오라클)
- Memory Page Sharing, HVM Guest의 Page-to-disc
- Netchannel2 (Network쪽 성능개선) - Smart NICs, Multi-Queue 지원, SR-IOV 기능
- Reboot, shutdown없이 Guest Disk Resize
- RAS features - 물리 CPU, Memory hotplug
- Libxen light(libxl) : 새로운 C 라이브러리. 고레벨의 Xen 통제기능 제공. 다양한 Xen management tool stack 간의 공유가 가능토록
- PV-USB : PV와 HVM에 USB 2.0 지원
- gdbsx : ELF Guest 디버거
- Remus Fault Tolerance : VM의 backup 용 VM을 copy, 장애발생시 정상적인 것처럼 running

Xen 4.1 Release
CPU Pool for system partitioning
- page sharing 향상
- Enhanced SR-IOV(Single Root IO Virtualization) - Network 성능향상 - CPU 부하를 줄임
 

Xen in Linux 3.x (or PVOPS)
New in 3.1
- Xen-pciback module
- Usability improvement
- memory hotplug

Planned for 3.2
- Hwclock support(date -s)
- Blkback : "feature-barrier" support
- BlkBack/front : "feature-discard" support
- PCIback : Support for multi-segmented("big") boxes
- Kexec/kdump support for PVHVM guests

Roadmap 3.3 and onwards
- PV Spinlock support
- ACPI S3
- 3D graphics
- ACPI cpufreq support
- Blkback multinng
- Netback optimisations
- Continue to round out the feature set, usability, rough edges

paravirt_ops (pv-ops for short)
pv-ops는 리눅스 커널 구조의 한 조각으로서, 하이퍼바이저 상에서 반가상화를 실행하게끔 해준다.
현재는 VMWare의 VI, Rusty의 lguest, 그리고 Xen을 지원한다.
현재 x86_32, x86_64 그리고 ia64 아키텍쳐에서 이용가능하다.

리눅스 커널 공식버전(mainline Linux kernel)에서 pvops는,  paravirtualization(pv), hardware virtualization(hvm) 혹은 paravirtual-hardware virtualization(pv-hvm) 간의 전환을 커널로 하여금 가능하게 해주는 모드이다.

Xen, Linux 커널 3.0 에서  Dom 0, Dom U 커널 완전 지원
자세하게 : http://wiki.xen.org/xenwiki/XenParavirtOps#head-05b0622497e9eea7b48a0a61a44bec39b6c1bfe2 
CentOS6을 설치하면 ssh 클라이언트가 설치되어있지않다.
#yum -y install openssh-clients
GlusterFS 에는 Replication 기능이 있다. (볼륨 구성시 Replica 옵션)
물론 같은 클러스터에 있는 서버들끼리만이다.

하지만 Geo-Replication 기능은 기존 같은클러스터 뿐만 아니라, LAN 이나 WAN 상에 존재하는 다른 서버에도 Replication을 할 수 있도록 한다.
또한 Replicated Volumes 는 동기적인 Replication(모든 , 각각의 파일 동작이 모든 bricks에게 보내짐) 이지만, Geo-Replication는 비동기적인 Replication(파일들에서의 변경을 정기적으로 체크하고 변화된 것을 체크해서 동기화) 이다.
GlusterFS 최신버전에 포함된 기능이다.(현재 3.2)

기본적으로 Master - Slave 라는 개념으로 메뉴얼에는 설명이 되어있다.
Master (Target) - Slave (Destination)


1. 초기 설정
@ 시간 동기화
@ SSH 암호없이 접속하도록 설정 ( Master -> Slave )
# ssh-keygen -f /etc/glusterd/geo-replication/secret.pem
# (엔터계속)
개인키를 생성해서 이 개인키로 접속을 한다.
ssh 명령은 
# gluster volume geo-replication <MASTER> <SLAVE> config
으로 확인가능하다.

@ FUSE 모듈 로드

2. 시작
# gluster volume geo-replication <MASTER> <SLAVE> start
ex) gluster volume geo-replication tar-volume 172.22.22.3:geo-volume start

# gluster volume geo-replication <MASTER> <SLAVE> status
faulty 가 떴다면 에러가 난 것이다.
# gluster volume geo-replication <MASTER> <SLAVE> config log_file
을 해서 해당 로그 파일을 보면 된다.
 
클라우드 컴퓨팅 환경에서는 데이터를 저장하는 스토리지 선정이 무엇보다 중요하다.
데이터를 분산 복제(Distribute - Replication) 저장해서 안정성을 높이고 저장공간을 확장(Scale-Out)할 수 있는 것이 기본이다.
현재 오픈소스로 나와있는 제품들이 여러가지가 있다.
아직은 살펴보는 단계이니 간단하게나마 기록해놓는다.



 - GlusterFS는 Scale-Out(확장가능)한 NAS(Network Attached Storage) 파일 시스템이다. 다양한 스토리지 서버를 Ethernet이나 Infiniteband RDMA 방식으로 하나의 큰 네트워크 파일시스템으로 모은다. GlusterFS는 성능저하없이 축적가능한 사용자 공간 디자인을 기반으로 한다. 클라우딩 컴퓨팅, 생물의학, 자료저장소등을 포함한 다양한 어플리케이션에서 쓰이고 있다. GlusterFS는 GNU AGPL v3 라이센스에 따라 무료 소프트웨어이다. 

- GlusterFS는 클라이언트와 서버로 구성된다. 서버는 일반적으로 Brick 이라는 형태로 제공이 되고, 각 서버들은 glusterfsd 데몬을 실행을 하여 로컬 파일 시스템을 volume으로 export한다. 클라이언트는 TCP/IP, InfiniBand, SDP를 통해 서버로 연결을 하고 원격서버들로부터 virtual volume을 구성한다. 
(Wiki 정의 참고 http://en.wikipedia.org/wiki/GlusterFS)

- 특징
* metadata server를 필요로 하지 않는다.
 분산 파일 시스템에서  파일정보등을 기억하기 위해 metadata server를 이용하는데 (hadoop 의 경우), 이 경우 metadata server가 문제가 생길경우 장애가 발생하게 된다. GlusterFS의 경우 파일정보등을 각 서버마다 가지고 있으므로 별도의 metadata server를 필요로 하지 않는다.

* 클라이언트 방식 
 volume을 마운트하는 방식으로 NFS, CIFS, Gluster Native(FUSE) 방식을 제공한다.
 
NFS로 마운트
#mount -t nfs [볼륨위치] [마운트위치]
#mount -t nfs 123.12.12.12:/test-volume /mnt/nfs



Gluster Native(FUSE)로 마운트
#mount -t glusterfs [볼륨위치] [마운트위치]
#mount -t glusterfs 1223.12.12.12:/test-volume /mnt/nfs




일반적으로 NFS 보다 FUSE로 마운트시 성능이 잘 나온다고 한다.
단, 작은 파일에서는 NFS의 캐시 영향을 받아서 성능이 더 잘나온다고 한다.
무엇보다,
NFS로 마운트시 마운트한 서버가 죽어버리면 해당 볼륨에 접근할수가 없다.
하지만, FUSE로 마운트시 마운트한 서버가 죽어도 해당 볼륨(나머지 Brick)에 접근할수있다.
이때문에 Relication을 설정이 필요하다.


* 파일기반의 replication, striping, load balancing
 replication 옵션을 주어 volume을 구성하게 되면 파일들을 복제 저장할 수 있다. 이 경우 서버 한곳이 고장나도 다른 곳의 서버에서 데이터를 가지고 오면 되므로 안정성이 높아진다. stripe 옵션을 주면 파일이 분산 저장이 된다. A라는 파일이 1번 서버에만 저장되는것이 아니라 1번 서버에 조금, 2번서버에 조금 이런 식으로 저장이 되게 된다. 일반적으로 stripe 옵션을 주면 속도는 빨라지나 안정성이 떨어진다고 얘기를 한다.
 
* volume failover, scheduling, disk caching
한그래프에 여러개 Series가 들어가야하는걸 찾다보니 ... 여기로..
이쁜게 많다 ^^
그리고 무료라는거.. !!

http://www.juiceanalytics.com/chart-chooser/

인스톨 가이드를 참고. (http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.0/Gluster_FS_3.2_Installation_Guide.pdf)

다운로드 : http://download.gluster.com/pub/gluster/glusterfs/LATEST/


1. 편의상 /etc/hosts에 모든 GlusterFS Node들의 host정보 등록
IP주소 GFS1
IP주소 GFS2
...
 이때, 모든 GlusterFS Node 에 위와 같이 해줘야 한다.
 그렇지 않으면 볼륨 생성시 Fail 이 난다. (로그를 보면 호스트를 확인하지 못했다고 뜬다.)

2. Setting
  • iptables off
    • # chkconfig iptables off
    • # service iptables stop
  • portmap on
    • # chkconfig portmap on
    • # service portmap start
  • nfs-server off
    • # chkconfig nfs off
    • # chkconfig nfslock off
    • # service nfs stop
    • # service nfslock stop
  • mount point 생성
    • # mkdir /data /mnt/nfs /mnt/glusterfs
  • fuse 모듈 로딩 처리
    • # modprobe fuse
    • # echo "modprobe fuse" >> /etc/rc.local

  •  @ nfs 로 마운트시 버전을 넣어줘야함. 왜 그런지는 아직..
     mount -t nfs -o vers=3 172.21.19.113:/test-vol /mnt/nfs/

    3. glusterfs로 시작되는 rpm 다운로드
    # wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.3-1.x86_64.rpm http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-debuginfo-3.2.3-1.x86_64.rpm http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.3-1.x86_64.rpm http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-geo-replication-3.2.3-1.x86_64.rpm http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-rdma-3.2.3-1.x86_64.rpm

    4. rpm 설치
    # rpm -Uvh gluster*
    - 의존성 에러 나는 것은 설치해줌 (python-ctypes, rsync, libibverbs-devel)
    - python-ctypes 경우, epel 설치로 가능 : http://fedoraproject.org/wiki/EPEL
    - rsync 경우, 직접 설치 : http://pkgs.repoforge.org/rsync/
    - CentOS 6 인경우 perl 설치, ssh클라이언트가 없을경우 openssh-clients 설치(의존성에러 compat-readline5* 도 설치)
    5. gluster 시작
    -  service glusterd start

    계정 추가
    # useradd [계정이름]

    비밀번호 설정
    # passwd [계정이름]

    계정 삭제
    # userdel [계정이름]

    계정 관련 데이터 삭제
    # userdel -r [계정이름]

    + Recent posts