« Previous : 1 : 2 : 3 : 4 : 5 : ... 52 : Next »

[2009]새해 복 많이 받으세요...^^

Happy  New Year... 2009

ㅡ.ㅡ 벌써 2009년이다...

흠... 올해는 뭔가 좀 달라져야 하는데...

여러분 새해 복 많이 받으세요~~~
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2009/01/01 22:41 2009/01/01 22:41
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/588

Trackback URL : http://blog.blog.n-nuri.com/trackback/588

Leave a comment
[로그인][오픈아이디란?]
1. 계정의 expire 설정하기 ( usermod )

전체 적용 : /etc/login.def 파일 편집

참고 사이트 1 : http://tong.nate.com/mahyun/36502095

ex)

usermod -e YYYY-MM-DD ID

cat /etc/shadow 에 보시면 8번째 항목이 expire date 이다.

추가 옵션 :

-n 패스워드 변경까지의 최단 날짜의 설정
-x 현재 패스워드의 유효기간을 지정한다.
-w 패스워드 만료 전 경고 날짜를 지정한다.
-i
패스워드 만료된 뒤에 사용자 계정사용이 불가능하게 하기
까지의 기간을 설정한다.

2. 계정 잠금 설정하기 ( faillog )

참고 사이트 1 : http://blog.naver.com/sulla_now?Redirect=Log&logNo=140027805370

참고 사이트 2 : http://wiki.kldp.org/wiki.php/DocbookSgml/PAM_admin-TRANS


위의 내용을 보면  /etc/pam.d/system-auth 에 아래의 2 라인을 추가 한다.

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.

auth        required      pam_env.so
auth        required      pam_tally2.so onerr=fail deny=3
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        required      pam_deny.so

account     required      pam_unix.so
account     required      pam_tally2.so onerr=fail
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     required      pam_permit.so

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so

추가가 완료되면

  pam_tally2 명령을 이용하여 현재 실패한 횟수를 체크하고

/var/log/secure 에 pam_tally2(sshd:auth): user yjj1 (6005) tally 4, deny 3

위와 같은 secure 로그를 뿌려준다.

lock 걸려있는 사용자의 해제 방법은  pam_tally2 --user id -r 이며,

자세한 내용은 위의 참고 사이트에서 확인 하시기 바랍니다.

추가적으로 pam_cracklib 모듈을 이용하여 패스워드의 정규 표현식도 구현이 가능하다
ex)
password    required      /lib/security/$ISA/pam_cracklib.so retry=3 minlen=8 ocredit=-1 dcredit=-1

retry=N
    Prompt user at most N times before returning with error. The default is 1

minlen=N
    The minimum acceptable size for the new password (plus one if credits are
    not disabled which is the default). In addition to the number of characters
    in the new password, credit (of +1 in length) is given for each different
    kind of character (other, upper, lower and digit). The default for this
    parameter is 9 which is good for a old style UNIX password all of the same
    type of character but may be too low to exploit the added security of a md5
    system. Note that there is a pair of length limits in Cracklib itself, a
    "way too short" limit of 4 which is hard coded in and a defined limit (6)
    that will be checked without reference to minlen. If you want to allow
    passwords as short as 5 characters you should not use this module.


ocredit=N

    (N >= 0) This is the maximum credit for having other characters in the new
    password. If you have less than or N other characters, each character will
    count +1 towards meeting the current minlen value. The default for ocredit
    is 1 which is the recommended value for minlen less than 10.

    (N < 0) This is the minimum number of other characters that must be met for
    a new password.

dcredit=N

    (N >= 0) This is the maximum credit for having digits in the new password.
    If you have less than or N digits, each digit will count +1 towards meeting
    the current minlen value. The default for dcredit is 1 which is the
    recommended value for minlen less than 10.

    (N < 0) This is the minimum number of digits that must be met for a new
    password.


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2008/12/17 17:45 2008/12/17 17:45
, , , , , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/586

Trackback URL : http://blog.blog.n-nuri.com/trackback/586

Leave a comment
[로그인][오픈아이디란?]
출처 (네이버 번역):  http://j2k.naver.com/j2k_frame.php/korean/www-06.ibm.com/jp/domino01/mkt/cnpages7.nsf/page/default-002CC43F

원문 출처 : http://www-01.ibm.com/support/docview.wss?uid=std7f7e24f944e3f7e8149257340002cc43f

추가 문서 : http://www.westnet.com/~gsmith/content/linux-pdflush.htm

해당 문서의 저작권은 IBM 에게 있습니다. 사용자의 요청이 있을경우 자삭 합니다.

Kernel 2.6의VM tunables

Kernel 2.6에 두어 더티 페이지의 플래시 폴리시에 영향을 주는 중요한 파라미터에 대해 해설합니다.


내용/목차


메모리 부하와I/O부하가 동시에 높아지는 서버에 대하고, 한편에서는 파일I/O에 의해 페이지 캐쉬가 다량의 메모리를 소비해, 한편으로 메모리가 요구될 때 마다 매회 캐쉬의 플래시와 페이지의 해방 처리의 오버헤드가 발생하고 퍼포먼스가 저하하는 경우가 있습니다.그러한 예로서는, 클라이언트수가 매우 많이I/O부하도 높은, 대규모HPC클러스터내의NFS서버등을 들 수 있습니다.

이러한 경우에, 페이지 캐쉬의 메모리 사용량을 의도적으로 적게 억제하는 것으로 상기와 같은 메모리 컨텐션 상태를 회피해, 전체적으로도 퍼포먼스를 개선할 수 있는 경우가 있습니다.

종래의Kernel 2.4그럼proc파일 시스템의bdflush그렇다고 하는 파일(/proc/sys/vm/bdflush)(이)가, 버퍼 캐쉬의 플래시 빈도를 컨트롤 하는 인터페이스로서 존재하고 있었습니다만,Kernel 2.6그럼 이 인터페이스는 철폐되었습니다.그 대신에,proc파일 시스템에 아래와 같은 4개의 파일이 준비되어 이전과 제어의 방법은 다릅니다만 같은 목적을 달성할 수 있습니다.아래와 같은 파일은 모두 /proc/sys/vm 디렉토리에 존재합니다.

dirty_background_ratio
----------------------
전메모리에 대한 더티 페이지(*)의 비율이 이 퍼센티지에 이르면,pdflushdemon가 눈을 떠 페이지 해방의 처리를 개시합니다.디폴트는10(%)입니다.

*: 메모리상에서 내용이 갱신되었지만 아직 디스크에 써지지 않은 페이지.플래시(=디스크에 써) 되면 「클린 페이지」가 되어, 인 액티브하고 깨끗한 페이지는 곧바로 다른 용도에 재이용할 수 있습니다.

dirty_ratio
-----------------
전메모리에 대한 더티 페이지의 비율이 이 퍼센티지에 이르면, 눈을 떴다pdflush하지만 실제로 더티 페이지의 서두 처리를 개시합니다.이 값을 통상보다 낮게 설정하는 것으로, 어느 일시점으로 메모리상에 존재하는 더티 페이지의 양을 적게 억제할 수가 있습니다.디폴트는40(%)입니다.

dirty_writeback_centisecs
-------------------------
pdflushdemon는 정기적으로 눈을 떠 낡은 데이터를 디스크에 써냅니다.그 시간 간격을1/100초단위로 지정합니다.디폴트는500, 즉 5초간격입니다.

dirty_expire_centisecs
----------------------
더티 페이지가 「더티」가 되고 나서 이 파라미터로 지정한 시간만 경과하면,pdflushdemon는 그 더티 페이지를 「낡은 데이터」라고 간주라고 디스크에의 서두의 대상으로 합니다.이것도1/100초단위로 지정합니다.디폴트는3000, 즉30초입니다.이것에 작은 값을 설정하면 그 만큼 빨리 더티 페이지가 플래시 되게 되어, 더티 페이지의 감소에 기여합니다.

주의: 상기의 파라미터를 변경하는 것으로 실제로 어느 정도 퍼포먼스가 향상할까는 서버의 구성, 서비스나 어플리케이션의 특성 등에 크게 의존하기 때문에, 통틀어 몇%라고 하는 것은 말할 수 없습니다.실제의 환경에 있어Trial&Error그리고 실험적으로 최적치를 발견하도록 해 주세요.


문서 정보
유효기간: 2009년8월23일




본문서에 대해
본문서에서는,IBM제품에 대해Linux(을)를 사용하는데 있어서 유용이라고 생각되는 기술 정보나Hints&Tips(을)를 제공하겠습니다. 본문서의 정보는, 한정된 검증 환경에 있어서의 결과에 근거하는 것이어, 모든 환경에서 동일한 결과를 보증하는 것이 아닙니다. 본문서의 정보에 근거해 도입·설정이 실시되는 경우에는, 충분한 검증 테스트를 실시해 주세요.또, 미리 각사보다 제공되는 정보 및 제품의 메뉴얼을 봐 주세요.
본문서의 정보에 근거해 도입·설정·운용한 결과에 대해서,IBM(은)는 어떠한 보증도 책임도 지기 어려우므로 미리 양해 바랍니다.


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2008/12/09 23:17 2008/12/09 23:17
, ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/585

Trackback URL : http://blog.blog.n-nuri.com/trackback/585

Leave a comment
[로그인][오픈아이디란?]

Squid.conf document

Sponsors

Introduction

Two important goals of many small businesses are to:

  • Reduce Internet bandwidth charges
  • Limit access to the Web to only authorized users.

The Squid web caching proxy server can achieve both these goals fairly easily.

Users configure their web browsers to use the Squid proxy server instead of going to the web directly. The Squid server then checks its web cache for the web information requested by the user. It will return any matching information that finds in its cache, and if not, it will go to the web to find it on behalf of the user. Once it finds the information, it will populate its cache with it and also forward it to the user's web browser.

As you can see, this reduces the amount of data accessed from the web. Another advantage is that you can configure your firewall to only accept HTTP web traffic from the Squid server and no one else. Squid can then be configured to request usernames and passwords for each user that users its services. This provides simple access control to the Internet.

Download and Install The Squid Package

Most RedHat Linux software products are available in the RPM format. Downloading and installing RPMs isn't hard. If you need a refresher, Chapter 6, "Installing Linux Software", provides details. It is best to use the latest version of Squid.

Starting Squid

Use the chkconfig configure Squid to start at boot::

[root@bigboy tmp]# chkconfig squid on

Use the service command to start, stop, and restart Squid after booting:

[root@bigboy tmp]# service squid start
[root@bigboy tmp]# service squid stop
[root@bigboy tmp]# service squid restart

You can test whether the Squid process is running with the pgrep command:

[root@bigboy tmp]# pgrep squid

You should get a response of plain old process ID numbers.

The /etc/squid/squid.conf File

The main Squid configuration file is squid.conf, and, like most Linux applications, Squid needs to be restarted for changes to the configuration file can take effect.

The Visible Host Name

Squid will fail to start if you don't give your server a hostname. You can set this with the visible_hostname parameter. Here, the hostname is set to the real name of the server bigboy.

visible_hostname bigboy

Access Control Lists

You can limit users' ability to browse the Internet with access control lists (ACLs). Each ACL line defines a particular type of activity, such as an access time or source network, they are then linked to an http_access statement that tells Squid whether or not to deny or allow traffic that matches the ACL.

Squid matches each Web access request it receives by checking the http_access list from top to bottom. If it finds a match, it enforces the allow or deny statement and stops reading further. You have to be careful not to place a deny statement in the list that blocks a similar allow statement below it. The final http_access statement denies everything, so it is best to place new http_access statements above it

Note: The very last http_access statement in the squid.conf file denies all access. You therefore have to add your specific permit statements above this line. In the chapter's examples, I've suggested that you place your statements at the top of the http_access list for the sake of manageability, but you can put them anywhere in the section above that last line.

Squid has a minimum required set of ACL statements in the ACCESS_CONTROL section of the squid.conf file. It is best to put new customized entries right after this list to make the file easier to read.

Restricting Web Access By Time

You can create access control lists with time parameters. For example, you can allow only business hour access from the home network, while always restricting access to host 192.168.1.23.

#
# Add this to the bottom of the ACL section of squid.conf
#
acl home_network src 192.168.1.0/24
acl business_hours time M T W H F 9:00-17:00
acl RestrictedHost src 192.168.1.23

#
# Add this at the top of the http_access section of squid.conf
#
http_access deny RestrictedHost
http_access allow home_network business_hours

Or, you can allow morning access only:

#
# Add this to the bottom of the ACL section of squid.conf
#
acl mornings time 08:00-12:00

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow mornings

Restricting Access to specific Web sites

Squid is also capable of reading files containing lists of web sites and/or domains for use in ACLs. In this example we create to lists in files named /usr/local/etc/allowed-sites.squid and /usr/local/etc/restricted-sites.squid.

# File: /usr/local/etc/allowed-sites.squid
www.openfree.org
linuxhomenetworking.com

# File: /usr/local/etc/restricted-sites.squid
www.porn.com
illegal.com

These can then be used to always block the restricted sites and permit the allowed sites during working hours. This can be illustrated by expanding our previous example slightly.

#
# Add this to the bottom of the ACL section of squid.conf
#
acl home_network src 192.168.1.0/24
acl business_hours time M T W H F 9:00-17:00
acl GoodSites dstdomain "/usr/local/etc/allowed-sites.squid"
acl BadSites dstdomain "/usr/local/etc/restricted-sites.squid"

#
# Add this at the top of the http_access section of squid.conf
#
http_access deny BadSites
http_access allow home_network business_hours GoodSites

Restricting Web Access By IP Address

You can create an access control list that restricts Web access to users on certain networks. In this case, it's an ACL that defines a home network of 192.168.1.0.

#
# Add this to the bottom of the ACL section of squid.conf
#
acl home_network src 192.168.1.0/255.255.255.0

You also have to add a corresponding http_access statement that allows traffic that matches the ACL:

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow home_network

Password Authentication Using NCSA

You can configure Squid to prompt users for a username and password. Squid comes with a program called ncsa_auth that reads any NCSA-compliant encrypted password file. You can use the htpasswd program that comes installed with Apache to create your passwords. Here is how it's done:

1) Create the password file. The name of the password file should be /etc/squid/squid_passwd, and you need to make sure that it's universally readable.

[root@bigboy tmp]# touch /etc/squid/squid_passwd
[root@bigboy tmp]# chmod o+r /etc/squid/squid_passwd

2) Use the htpasswd program to add users to the password file. You can add users at anytime without having to restart Squid. In this case, you add a username called www:

[root@bigboy tmp]# htpasswd /etc/squid/squid_passwd www
New password:
Re-type new password:
Adding password for user www
[root@bigboy tmp]#

3) Find your ncsa_auth file using the locate command.

[root@bigboy tmp]# locate ncsa_auth
/usr/lib/squid/ncsa_auth
[root@bigboy tmp]#

4) Edit squid.conf; specifically, you need to define the authentication program in squid.conf, which is in this case ncsa_auth. Next, create an ACL named ncsa_users with the REQUIRED keyword that forces Squid to use the NCSA auth_param method you defined previously. Finally, create an http_access entry that allows traffic that matches the ncsa_users ACL entry. Here's a simple user authentication example; the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users

5) This requires password authentication and allows access only during business hours. Once again, the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED
acl business_hours time M T W H F 9:00-17:00

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users business_hours

Remember to restart Squid for the changes to take effect.

Forcing Users To Use Your Squid Server

If you are using access controls on Squid, you may also want to configure your firewall to allow only HTTP Internet access to only the Squid server. This forces your users to browse the Web through the Squid proxy.

Making Your Squid Server Transparent To Users

It is possible to limit HTTP Internet access to only the Squid server without having to modify the browser settings on your client PCs. This called a transparent proxy configuration. It is usually achieved by configuring a firewall between the client PCs and the Internet to redirect all HTTP (TCP port 80) traffic to the Squid server on TCP port 3128, which is the Squid server's default TCP port.

Squid Transparent Proxy Configuration

Your first step will be to modify your squid.conf to create a transparent proxy. The procedure is different depending on your version of Squid.

Prior to version 2.6: In older versions of Squid, transparent proxy was achieved through the use of the httpd_accel options which were originally developed for http acceleration. In these cases, the configuration syntax would be as follows:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

Version 2.6 and Beyond: Newer versions of Squid simply require you to add the word "transparent" to the default "http_port 3128" statement. In this example, Squid not only listens on TCP port 3128 for proxy connections, but will also do so in transparent mode.

http_port 3128 transparent

Configuring iptables to Support the Squid Transparent Proxy

The examples below are based on the discussion of Linux iptables in Chapter 14, "Linux Firewalls Using iptables". Additional commands may be necessary for you particular network topology.

In both cases below, the firewall is connected to the Internet on interface eth0 and to the home network on interface eth1. The firewall is also the default gateway for the home network and handles network address translation on all the network's traffic to the Internet.

Only the Squid server has access to the Internet on port 80 (HTTP), because all HTTP traffic, except that coming from the Squid server, is redirected.

If the Squid server and firewall are the same server, all HTTP traffic from the home network is redirected to the firewall itself on the Squid port of 3128 and then only the firewall itself is allowed to access the Internet on port 80.

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 \
-j REDIRECT --to-port 3128
iptables -A INPUT -j ACCEPT -m state \
--state NEW,ESTABLISHED,RELATED -i eth1 -p tcp \
--dport 3128
iptables -A OUTPUT -j ACCEPT -m state \
--state NEW,ESTABLISHED,RELATED -o eth0 -p tcp \
--dport 80
iptables -A INPUT -j ACCEPT -m state \
--state ESTABLISHED,RELATED -i eth0 -p tcp \
--sport 80
iptables -A OUTPUT -j ACCEPT -m state \
--state ESTABLISHED,RELATED -o eth1 -p tcp \
--sport 80

Note: This example is specific to HTTP traffic. You won't be able to adapt this example to support HTTPS web browsing on TCP port 443, as that protocol specifically doesn't allow the insertion of a "man in the middle" server for security purposes. One solution is to add IP masquerading statements for port 443, or any other important traffic, immediately after the code snippet. This will allow non HTTP traffic to access the Internet without being cached by Squid.

If the Squid server and firewall are different servers, the statements are different. You need to set up iptables so that all connections to the Web, not originating from the Squid server, are actually converted into three connections; one from the Web browser client to the firewall and another from the firewall to the Squid server, which triggers the Squid server to make its own connection to the Web to service the request. The Squid server then gets the data and replies to the firewall which then relays this information to the Web browser client. The iptables program does all this using these NAT statements:

iptables -t nat -A PREROUTING -i eth1 -s ! 192.168.1.100 \
-p tcp --dport 80 -j DNAT --to 192.168.1.100:3128
iptables -t nat -A POSTROUTING -o eth1 -s 192.168.1.0/24 \
-d 192.168.1.100 -j SNAT --to 192.168.1.1
iptables -A FORWARD -s 192.168.1.0/24 -d 192.168.1.100 \
-i eth1 -o eth1 -m state
--state NEW,ESTABLISHED,RELATED \
-p tcp --dport 3128 -j ACCEPT
iptables -A FORWARD -d 192.168.1.0/24 -s 192.168.1.100 \
-i eth1 -o eth1 -m state --state ESTABLISHED,RELATED \
-p tcp --sport 3128 -j ACCEPT

In the first statement all HTTP traffic from the home network except from the Squid server at IP address 192.168.1.100 is redirected to the Squid server on port 3128 using destination NAT. The second statement makes this redirected traffic also undergo source NAT to make it appear as if it is coming from the firewall itself. The FORWARD statements are used to ensure the traffic is allowed to flow to the Squid server after the NAT process is complete. The unusual feature is that the NAT all takes place on one interface; that of the home network (eth1).

You will additionally have to make sure your firewall has rules to allow your Squid server to access the Internet on HTTP TCP port 80 as covered in Chapter 14, "Linux Firewalls Using iptables".

Manually Configuring Web Browsers To Use Your Squid Server

If you don't have a firewall that supports redirection, then you need to configure your firewall to only accept HTTP Internet access from the Squid server, as well as configure your PC browser's proxy server settings manually to use the Squid server. The method you use depends on your browser.

For example, to make these changes using Internet Explorer

  1. Click on the "Tools" item on the menu bar of the browser.
  2. Click on "Internet Options"
  3. Click on "Connections"
  4. Click on "LAN Settings"
  5. Configure with the address and TCP port (3128 default) used by your Squid server.

Here's how to make the same changes using Mozilla or Firefox.

  1. Click on the "Edit" item on the browser's menu bar.
  2. Click on "Preferences"
  3. Click on "Advanced"
  4. Click on "Proxies"
  5. Configure with the address and TCP port (3128 default) used by your Squid server under "Manual Proxy Configuration"

Squid Disk Usage

Squid uses the /var/spool/squid directory to store its cache files. High usage squid servers need a large amount of disk space in the /var partition to get optimum performance.

Every webpage and image accessed via the Squid server is logged in the /var/log/squid/access.log file. This can get quite large on high usage servers. Fortunately, the logrotate program automatically purges this file.

Troubleshooting Squid

Squid logs both informational and error messages to files in the /var/log/squid/ directory. It is best to review these files first whenever you have difficulties.The squid.out file can be especially useful as it contains Squids' system errors.

Another source of errors could be unintended statements in the squid.conf file that cause no errors; mistakes in the configuration of hours of access and permitted networks that were forgotten to be added are just two possibilities.

By default, Squid operates on port 3128, so if you are having connectivity problems, you'll need to follow the troubleshooting steps in Chapter 4, "Simple Network Troubleshooting", to help rectify them.

Note: Some of Squid's capabilities go beyond the scope of this book, but you should be aware of them. For example, for performance reasons, you can configure child Squid servers on which certain types of content are exclusively cached. Also, you can restrict the amount of disk space and bandwidth Squid uses.

Conclusion

Tools such as Squid are popular with many company mangers. By caching images and files on a server shared by all, Internet bandwidth charges can be reduced.

Squid's password authentication feature is well liked because it allows only authorized users to access the Internet as a means of reducing usage fees and distractions in the office. Unfortunately, an Internet access password is usually not viewed as a major security concern by most users who are often willing to share it with their colleagues. Although it is beyond the scope of this book, you should consider automatically tying the Squid password to the user's regular login password. This will make them think twice about giving their passwords away. Internet access is one thing, letting your friends have full access to your e-mail and computer files is quite another.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 삐꾸강아쥐

2008/12/04 13:31 2008/12/04 13:31
,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/583

Trackback URL : http://blog.blog.n-nuri.com/trackback/583

Leave a comment
[로그인][오픈아이디란?]

Oracle OVM 간단 사용기

뭐... 일단 뜻하든... 뜻하지 않든...

OVM을 테스트 하게 되었는데...

Xen-Server 제품에 비해서... 상당히 까다로운???

셋팅이 필요하다... ㅡ.ㅡ;;

Xen-center 는 되게 간단 간단해서... 편했는데... OVM  Shared Storage 잡는데 2일 걸렸다...ㅡ.ㅡ;;

일단... 좀 더 테스트 해 보구... 추가적인 사용기 올리도록 한다.



ps. 그나 저나... 블로그 사진은 어떻게 보이개 해야되나...ㅠㅠㅠ
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2008/12/03 18:47 2008/12/03 18:47
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/582

Trackback URL : http://blog.blog.n-nuri.com/trackback/582

Leave a comment
[로그인][오픈아이디란?]

ㅡ.ㅡ 한숨만 나온다...

저번 시험에도... 3번만에 붙어주는 센스를 보여주시더니...

ㅡㅡ;;

이번 시험도 ... 2번째 떨어졌다...


흠....

젠장... 저절로 한숨이 나온다...

휴~~~

노력을 게을리 한 탓이겠지....

ㅠ.ㅠ
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 삐꾸강아쥐

2008/11/21 21:11 2008/11/21 21:11
,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/581

Trackback URL : http://blog.blog.n-nuri.com/trackback/581

Leave a comment
[로그인][오픈아이디란?]

Open Source Symposium... 2008

신청 : http://myseminar.co.kr/oss/

사용자 삽입 이미지
사용자 삽입 이미지

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 삐꾸강아쥐

2008/11/20 10:46 2008/11/20 10:46
, , , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/580

Trackback URL : http://blog.blog.n-nuri.com/trackback/580

Leave a comment
[로그인][오픈아이디란?]

Taking a Backup Using Snapshots

출처 : http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html#snapbackcreate

사용자(작성자) 요청이 있을경우 자삭 합니다.


Taking a Backup Using Snapshots

Following on from the previous example we now want to use the extra space in the "ops" volume group to make a database backup every evening. To ensure that the data that goes onto the tape is consistent we use an LVM snapshot logical volume.

A snapshot volume is a special type of volume that presents all the data that was in the volume at the time the snapshot was created. For a more detailed description, see Section 3.8, Snapshots. This means we can back up that volume without having to worry about data being changed while the backup is going on, and we don't have to take the database volume offline while the backup is taking place.

Note

In LVM1, this type of volume was read-only, but LVM2 creates read/write snapshots by default.

13.4.1. Create the snapshot volume

There is a little over 500 Megabytes of free space in the "ops" volume group, so we will use all of it to allocate space for the snapshot logical volume. A snapshot volume can be as large or a small as you like but it must be large enough to hold all the changes that are likely to happen to the original volume during the lifetime of the snapshot. So here, allowing 500 megabytes of changes to the database volume which should be plenty.

# lvcreate -L592M -s -n dbbackup /dev/ops/databases 
lvcreate -- WARNING: the snapshot must be disabled if it gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for "/dev/ops/dbbackup"
lvcreate -- doing automatic backup of "ops"
lvcreate -- logical volume "/dev/ops/dbbackup" successfully created


WarningFull snapshot are automatically disabled
 

If the snapshot logical volume becomes full it will be dropped (become unusable) so it is vitally important to allocate enough space. The amount of space necessary is dependent on the usage of the snapshot, so there is no set recipe to follow for this. If the snapshot size equals the origin size, it will never overflow.

13.4.2. Mount the snapshot volume

We can now create a mount-point and mount the volume

# mkdir /mnt/ops/dbbackup
# mount /dev/ops/dbbackup /mnt/ops/dbbackup

mount: block device /dev/ops/dbbackup is write-protected, mounting read-only

If you are using XFS as the filesystem you will need to add the nouuid option to the mount command:

# mount /dev/ops/dbbackup /mnt/ops/dbbackup -onouuid,ro

13.4.3. Do the backup

I assume you will have a more sophisticated backup strategy than this!

# tar -cf /dev/rmt0 /mnt/ops/dbbackup
tar: Removing leading `/' from member names

13.4.4. Remove the snapshot

When the backup has finished you can now unmount the volume and remove it from the system. You should remove snapshot volume when you have finished with them because they take a copy of all data written to the original volume and this can hurt performance.

# umount /mnt/ops/dbbackup
# lvremove /dev/ops/dbbackup

lvremove -- do you really want to remove "/dev/ops/dbbackup"? [y/n]: y
lvremove -- doing automatic backup of volume group "ops"
lvremove -- logical volume "/dev/ops/dbbackup" successfully removed

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2008/11/20 09:43 2008/11/20 09:43
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/579

Trackback URL : http://blog.blog.n-nuri.com/trackback/579

Leave a comment
[로그인][오픈아이디란?]

SK 브로드밴드 CF 송의 실제 주인공



추가 자료는 : http://blog.naver.com/ckw0?Redirect=Log&logNo=70035641601
에 잘 정리되어 있습니다. ^^
크리에이티브 커먼즈 라이센스
Creative Commons License