메뉴 건너뛰기

XEDITION

UNIX

 

HP-UX System and Network

Administration I

 

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

목    차

 

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Module 1   Introduction to HP-UX Administration

 

1-1. Hardware Responsibilities

 

* System의 Create and maintain a hardware diagram of the system.

* Verify that peripherals are installed correctly and tested.

* Monitor performance of hardware components.

* Arrange for repair in event of hardware failure

 

1-2. Software Responsibilities

  * Install and configure the HP-UX operating system.

  * Create file Systems. newfs

  * Manage the integrity of file systems. fsck

  * Monitor system resource usage. bdf

  * Design and implement backup and recovery routines.

  * Configure and maintain printer spooler software. lpadmin

  * Install and maintain network communication software.

  * Update the HP-UX operating system for new release. swinstall, swremove, swlist

  * Install and update application software.

 

1-3. Responsibilities to the Users

* Allow user access to the system as required.

* Evaluate user needs.

* Plan for future system growth/change.

* Provide assistance to the user community.

* Implement the policies and procedures of your company/organization

  regarding the use of the computer system and network.

 

1-4. The System Administrator’s Tool Kit

* SAM

* Support Contract

* HP-ESC

* HP-UX Documentation

 

 

 

 

 

 

 

Module 2   Overview of  SAM

 

2-1. Why Use SAM ?

Advantages

  * Simplifies complex administration tasks

  * Minimizes potential for errors

  * Provides a built-in help utility

Disadvantages

  * Is less flexible than manual configuration

  * Is not helpful in some troubleshooting situations

 

       Shell

Environment

Environment File

POSIX, Korn or Bourne shells

export DISPLAY=hostname:0.0

.profile or .dtprofile

C shell

setenv DISPLAY=hostname:0.0

.login

 

* SAM Operator

 => sam priviledge를 가진 일반 유저가 sam 실행 하고 restricted sam을 통해 생성된다.

# sam  : command mode 에서 sam 실행

# sam –r

: Restricted sam builder

 user 선택.. user에게 sam 관리 권한 주기

# /usr/sbin/sam : sam 경로

# cd /etc/sam/custom

username.cf : operator priviledge 저장

 

 

Module 3   Creating and Managing User Accounts

 

3-1. Users and Groups – Access to System and Data

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

3-2. What Defines a User Account ?

 

/etc/passwd                                   /etc/group

 user1: …                                      accounts: …

 user2: …                                               research: …

 user3: …                                               finances: …

 uesr4: …                                   admin: …

 

 

 

 

 

 

 

 

User 생성 방법 : 1. sam 이용

                 2. manual 사용

                 3. 단순 명령 이용

  1. < >

    개인 환경 완성

    • mkdir /home/~~~ (home dir 생성)

    • cp /etc/skel/.[!.]* /home/~

    • chmod 755 /home/~ /.profile

    • chown –R username :groupname /home/~

      # vipw

3-3. The /etc/passwd file

 

 

 
 

User 추가 방법

  1. /etc/passwd에 user 계정 추가 등록

   echo ybn::1045:20::home_dir:shell >> /etc/passwd

  1. user home directory 생성
  2. 환경 file copy

cp /etc/skel/.* /home_directory

  1. chown –R user_name:group_name /home_dir

owenr와 group을 모두 바꿔줌

  1. chmod 755 /home_dir

 

 

 

Example :

   root:Eq0oBTr1y1I7w:0:3:super user:/:/sbin/sh

   daemon:*:1:5::/:/sbin/sh

   bin:*:2:2::/usr/bin:/sbin/sh

   sys:*:3:3::/:

 

 

Use /usr/sbin/vipw to edit  /etc/passwd file edit

Use /usr/sbin/pwck   /etc/passwd file error check

 

 

 

 

               
    구름 모양 설명선: login shell
  구름 모양 설명선: username
    구름 모양 설명선: user ID   구름 모양 설명선: ID string : comment
 
 
 

 

 

 

 

 

terry:ZMPPAvHrXTDfM:265:20:TerryKellog:/home/terry:/usr/bin/sh

 

 

 

           
    구름 모양 설명선: Home directory
    구름 모양 설명선: group ID
  구름 모양 설명선: password
 

 

 

 

 

 

 

 

ex ) username:password:user_ID:group_ID:ID_string:home_directory:login_shell

 

 

User ID  : 0~99 System UID (reserved)

Group ID : /etc/passwd의 group file은 user의 primary group 이다. (login시 initial group)

※ HP-UX 11.0 version 부터 user의 primary group은 /etc/group file에 정의할 필요가 없다. (default ) 추가적인 group 일 때만 등록

 

 

 

 

 Super shell

UID : 0

shell : /sbin/sh (다른 shell을 사용할 경우 booting시 문제가 발생할 수도 있다.

 

 

 

 

 shell 종류

/usr/bin/sh        POSIX shell

/usr/bin/ksh       Korn shell

/usr/bin/csh      C shell

 

Login Shell :

 

 

 

 

 

 

 

 

 

 

3-4. The /etc/group File

 

 

 

group 변경 :

groupmod  command 사용

 

group_name:password:group_id:group_list

 

 

 

find / -name user1

find / -user | xargs rm

          xargs chown user2

 

Example :

             other::1:root,daemon,uucp,sync

             users::20:

             develop::101:bugs,daffy

             sales::102:bugs,daffy,elmer,marvin

 

Use /usr/sbin/grpck to check  /etc/group file error check

User ADD SAM Õ Account for users and group Õ user Õ Menu이동 Õ action Õ Add

3-5. Creating User Accounts with SAM

 

 

 

 

 

1

 

 

 

Set Password Options …:

 

 

 

Home Phone :

 

 

 

Office Phone :

 

 

 

Office Location :

 

 

 

Real Name :

 

 

 

Start-Up Program …:

 

 

 

Primary Group Name … :

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Home Directory :

 

 

 

User ID (UID) :

 

 

 

Login Name :

 

 

 

 

 

 

     
 

3

 
 
 
 

4

 

 

 

 

 

 

  

 

 

7 (shell)

 

 

 

 

               
   
     

5

 
 
 
 
   

Super User의 password를 잃어 버린 경우

  1. single user mode로 booting
  2. # mount –a
  3. # vi /etc/passwd  passwd file을 수정
  4. reboot or init 3                         // run level 3으로 booting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

useradd –u 1045 –g users –d /home/ybnoh –s /usr/bin/ksh –m ybnoh

 

3-6. Deactivating and Removing Users with SAM

 

 

 

 

 

 

 

 

 

 

3-9. Managing Users and Groups from the Command Line

 

Command for Managing  User Accounts :    Command for Managing Groups :

 

 

       
 

 # useradd –m user1

 # usermod –G fince user1

 # userdel –r user1

 # vipw

 # pwck

 

 

 # groupadd –g 200 accts

 # groupmod –n accounts accts

# groupdel accounts

 # vi /etc/group

 # grpck

 

 

 

 

 

 

 

 

 

 

 

 

Useradd [-u uid] [-o] [-g group 명] [-G group 명 …][-d logindirectory ]

[-m][-k skel directory ][ -s shell] login directory

-g  groupname    : Define the user’s primary group (생략시 users 가 default )

-d  /home/guest  : Define the user’’s home directory (생략시 /home/login 명이  default )

-s  /usr/bin/sh   : Defile the user’s default login shell (생략시 /sbin/sh… root shell 로 지정)

-m  login directory : Login Directory 직접 생성 ( 생략시 login directory 가 생성되지 않는다.)

- k  skeldirectory  : 환경 설정 file을 copy 해오는 directory  (생략시 /etc/skel dl default)

 

* useradd 를 이용해 만든 user 의 초기 상태는 deactivation

  • /etc/passwd file의 password field 가  ‘*’로 채워져 있다.

  • #passwd –d username : null passwd 설정 & Activation

  • vipw 에서 해당 user의 password field‘*’ 삭제시 activation

     

    * user 명 수정시 –ㅣ option

     usermod –l newname oldname

     

 

Module 4   Customizing User Accounts

 

4-1. Why Customize a User Account ?

 

 Set the user’s terminal type.

 Customize the user’s prompt.

 Set the user’s default printer.                     변수

 Customize the user’s PATH variable.

 Define a command line editor.

 

4-2. Some Sample Customizations

 

 

 

 

 * Recalling 기능 만들기

 # vi ~/.profile

export EDITOR=vi

export HISTFILE=~/.sh_history

 # vi ~/.dtprofile

#DTSOURCEPEOFILE=true

  Remove : uncomment 처리

logut & login

 

 

export TERM=’vt100’      

export PS1=’$PWD $’

export LPDEST=’laser’ User default printer 설정

export PATH=$PATH:/usr/local/bin

export EDITOR=vi   recalling

export HISTSIZE=50  recalling이 저장되는 단위

export HISTFILE=~/.sh_history  recalling이 저장되는 File

 

 

4-3. What Happens When a User Logs In?

 

Displays the contents of the /etc/copyright and /etc/motd file.

 

wall : 접속해 있는 User들에게 Message 전송

 

 

 

 

               
   

POSIX login scripts

 
 
   

/usr/bin/sh

/usr/bin/ksh

   

/etc/profile

 
   
 
   

$HOME/.kshrc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

타원형 설명선: CDE환경 logion시
true로 설정
4-4. What Happens at CDE Login ?

 

 

           
   
     

DTSOURCEFILE = ‘true’

 
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

Module 5   Guided Tour of the HP-UX File Hierarchy

  • File System Data

     Meta data : file system 의 구조적 정보 (superblock, inode….)

    User data : 실질적인 (actual) data

    Ex) #ls –I : inode 정보를 함께 보여준다.

        - file, directory 들은 생성시 inode 들을 하나씩 부여 받는다.

     

    5-1. Introducing the File System Paradigm

     

     

     
     

     

     

 

                                       Executables

Static Files                   Libraries

                                    System startup

 : O/S, App Install 경우를 제외하고 Meta Data 등의 구조적 변경이 거의 없다.

 

 

 
 

 

 

 

 

 

OS

Application

 

                                        Configuration

Dynamic Files                  Temporary

                                         User

 : meta data update 빈번

 

5-2. The File System Layout

 

 

 

 

 

 

 

 

 

 

 

 

 

/usr      Sharable operating system commands, libraries, and documentation.

             /usr/bin : general user command

        /usr/sbin : super user command

            /usr/newconfig : Default operating system configuration data files

 /usr/newconfig/etc/passwd file은 /etc/passwd file 에서 user 계정을 제외한 것과 동일해 /etc/passwd file 이 손상되었을 경우 /usr/newconfig/etc/passwd file을 /etc 에 복사해서 사용하면 된다.

/sbin     Minimum commands needed to boot the system and mount other file systems.

/opt      Applications.

/etc       System configuration files. No longer contains executable files.

/dev      Device files.

/var       Dynamic information such as logs and spooler files (previously in /usr).

       mail, unix log file

             /var/adm ; Common administrative files and log files.

       /var/adm/crash ; Kernel crash dumps.

/mnt      Local mounts.

/tmp      Operating System temporary files.

/stand   Kernel and boot loader.

/home   User directories.

 

5-3. Commands to Help You Navigate

 

 

 

find / -name ybnoh

find / -user ybnoh | xargs rm

               | xargs chown user2

 

find      Searches the file hierarchy   모든 파일 Search

       find . –name

             -user

             -perm 755

             -size +10000C (10000 byte 초과)

             -atime +30  : +n : n 일 동안 access 안된 file

                                        -n

- mtime +n : modify time

      - exec shell command

whereis            Locates source, binaries, and man pages  실행 파일의 위치

which   Locates an executable in your PATH  PATH 변수 안에서만

file        Determines file type   ASCII, binary

 

 

 

Module 6   Connecting Peripherals

 

6-1. The HP9000 Product Family

 

 

 

HP3000  MPE

HP9000 HP-UX   800(Server) : Multi-user용

                 700(Workstation) : Single-user용

Multi-user, Multi-tasking

Network OS(NOS) : OS 자체가 protocol 포함

 

  Servers Series 800 – Class V, N, K, D

  Workstation Series 700

 

 

 numbers of CPUs        CPU 수

 processor speed          CPU 속도

 I/O expandability            확장성

 graphics capabilities     graphic 속도

 

 

6-2. Device Adapters

 

SCSI      Small Computer System Interface. There are three SCSI-2 Interfaces available:

             Single-ended, Differential, and Fast and Wide.

             Supports SCSI disks, DDS tape drives, CD-ROM drives,

             MO drives, quarter inch cartridges(QIC), 8mm tapes and IBM 3480-compatible drives.

MUX      Multiplexer. Supports serial terminals, printers, plotters, modems, and Access Port.

LAN/9000            Local Area Network. For IEEE 802.3 and Ethernet networks.

FDDI      Fiber Distributed Data Interface. High-speed local area network

 

6-3. Types of SCSI

 

Other names bus is known by

‘Standard SCSI’

‘SCSI’, ‘SCSI-2’

‘SE-SCSI’

‘Fast’

‘Fast/Narrow’

‘Diff-SCSI’

‘Differential-Wide’

‘F/W-SCSI’

‘Fast and Wide’

Compatible with the

other SCSI bus types ?

NO!

NO!

NO!

Bus Transfer Rate

5 Mbytes/s

10 Mbytes/s

20 Mbytes/s

Data Bus Width

8 bits

8 bits

16 bits

# Connector pins

50 pin

50 pin

68 pin

Max. cable length

6 meters

25 meters

25 meters

Maximum Devices on Interface

7

7

15

 

 

Kernel 의 재구성 : Device file이 Kernel에 없을 경우

                                     Kernel parameter를 변경하고자 할 때

OS = Kernel + Shell + 기타 Utility

 

 

 

 

 

 

6-5. viewing Device Addreesses with ioscan

#ioscan –f // full listing of all devices

* H/W PATH  : Interface card Address . SCSI Target Address  . Logical Number Unit (LUN)

ex) 8/16/5.3.0

  • disk 를 제외한 일반 적인 device 의 LUN number는 0이다.

     

     

     

     

     

     

     

     

     

 

6

 

 

                                                      

  Logical unit Number

  SCSI Target Address

  Interface Card Slot #

 

 

Module 7   Configuring Device Files

 

7-1. What Is A Device File ?

 

 

 

 

 

 

 

 

 

 

 Device file is a kind of interface between kernel and device

/dev/* : 모든 device file 이 존재

7-2. Listing Device Files with  ll /dev/*

 

Listing device files with  ll /dev/*

 

brw-r-----  1  root  sys  31  0x005000  Feb  10  1997  /dev/dsk/c0t5d0

brw-r-----  1  root  sys  31  0x006000  Feb  10  1997  /dev/dsk/c0t6d0

crw-r-----  1  root  sys  31  0x005000  Feb  10  1997  /dev/rdsk/c0t5d0

crw-r-----  1  root  sys  31  0x006000  Feb  10  1997  /dev/rdsk/c0t6d0

crw-r-----  2  root  tty  17  0x000001  Jan    9  09:25  /dev/ttyp1

crw-r-----  2  root  tty  17  0x000002  Mar   9  17:46  /dev/ttyp2

 

 

 

               
       

 

 

 

 

 

 

 device file type  -  c : character  b : block

 * disk 는 block 형과 character 형의 두가지 device file을 가진다.

   Ex)  /dev/dsk/c0t5d0    /dev/rdsk/c0t5d0

 major #  -  kernel에서 인식하고 있는 driver 에 대한  pointer

 

 

c#t#d#

 

 minor #  -  장치 연결 경로

 

 

 

# - card instance #

# - SCSI target #

# - LUN #

internal disk 0

  array에서만 유용

 

7-4. Listing Device Files with lssf   list special file

 

# lssf /dev/rdsk/c0t0d0

sdisk card instance 0 SCSI target 0 SCSI LUN 0

section 0 at address 10/0.0.0 /dev/rdsk/c0t0d0

    section 0 : 전체(disk)

7-5. The Layout of  /dev

 

 

 

       
 
   

tty#p#

# card instance

# port number(MUX)

 

 

 

 

 

 

타원: dev                vg00

 

 

 
 

 

 

 

 

 

                                                                   Terminals    Modems

        Disk Drives      Tape Drives

 

 

7-7. Disk Drive File Names

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7-8. Tape Device File Names

 

/dev/rmt/0m   instance name

 

 

 

 - 0h     high                                 - DDS tape은 0m

 - 0m     middle                              - 0mn    n : no rewind

 - 0l       large

 

 

 

 

      

 

 

 

 

 

 장치 device를 만들 Driver가 Kernel에 없을

경우 Device file이 자동 생성이 안됨.

 

 

 

 

 lsdev   : major#를 알수 있다.

 

 

7-10. How Device Files are Created

 

 Auto configuration

 

 

 

  • Device File 생성
  1. ioscan
  2. insf
  • Kernel에 driver가 없는 경우

  /stand/system file에 추가(ioscan시 나오는 driver)

 

 

 SAM

 insf                   insf -e

 mksf                 major#, minor#, type

 mknod

  => mknod 는 가상 device 에 대한 device file을 만들어 줄 때 사용한다.
Module 8   Configuring Disk Device

8-1. Disk Partitioning

 

 Each HP-UX disk can have one or more partitions

 Each partition can be used for

  • a file system저장 (newfs)

  • swap spacememory swap (swapon)

  • raw data

  • boot area

     

     

    8-2. Whole-Disk Partitioning

     

    There are five ways to partition a disk using the whole disk approach.

     

     

     
     

     

     

     

     

     

     

     

     

 

정점 : 속도가 빠르다. (약간)

단점 : 1. Disk size 이상의 file system을 만들지 못한다.

      2. 임의의 size로 file system을 만들지 못한다.

      3. file system이 full이 났을때 size를 늘릴수 없다.

      4. 하나의 disk에 하나의 file system

최대 Disk Size : 10.20이후 128GB

Boot Disk = boot area + root file system + primary swap (한 disk에 연속적으로 있어야 한다.)

 

 

 
 

 

 

 

8-3. LVM Disk Partitioning

 

 

 

 

 

 

 

 

 

 

장점 : 1. physical disk를 묶어 하나의 volume group으로 만들수 있다.

      2. 4MB 단위로 file system을 자를수 있다.

      3. file sytem이 full이 났을때 logical volume으로 할당되지 않은 공간이 있다면

        extend 할 수 있다.

 

8-4. LVM Device Files

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

block device -> buffer 사용 : 데이터 저장형

character device -> serial : 안정성을 고려한 전송

 

8-5. Creating Physical Volumes

 

 

 

 

 

 

 

         

 

 

 

 

 

 

boot file system (Boot area)

pvcreate –B /dev/rdsk/c#t#d#

 

 

 

 

 

 

LVM Extents   PE : Physical Extents

                   LE : Logical Extents

 : partition 의 할당단위 , Extent default size 는 4MB

 LVM Overhead (PVRA, VGRA, BBRA)

The data structures that are used by LVM consume some overhead feom the disk space. This overhead is set at a fixed boundary for bootable LVM disks (2912KB), and may vary in size for non-bootable LVM disks (typically 400KB)

 

LVM Datastructure

* PVRA ( Physical Volume Reserved Area) : physical volume 의 LVM information

, pvcreate 로 생성 (1M)

* VGRA ( Volume Group Reserved Area) : entire volume group 의 LVM information

, vgcreate 로 생성 (1M)

* BBRA ( Bad Block Relocation Area) : bad block recovery mechanism information

 

 

8-6. Creating Volume Groups

 

 

       
   

1. physical volume 만들기

물리적 disk => physical volume

#pvcreate  device file (character device file)

2. volume group 만들기

# mkdir /dev/vg01

  # mknod /dev/vg01/group c 64 0x010000

# vgcreate vg01 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0

3. Check : vgdisplay –v vg01

               pvdisplay –v /dev/dsk/c0t3d0

               pvdisplay –v /dev/dsk/c0t4d0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8-7. Creating Logical Volumes

 

 

           
   
 
   

-I : stripe size

-i : stripes

lvcreate –l 16 –n myswap vg01

       4*16 =64MB

 

 /etc/mnttab : 현재 file system의  mount 정보

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

Module 9   File System Concepts

 

9-1. File System Types

 

 HP-UX supports several file system types;

    - HFS            High Performance File System

    - JFS            Journaled File System (vxfs 와 동일, veritas file system, 10.01부터 사용)

    - NFS            Network File System : lan 상에서 host 간의 file sharing service 제공

    - CDFS         CD-ROM File System

 HP-UX file commands work on all HP-UX file system types.

 

 JFS 장점 : file system recovery 속도가 빠르다.(fsck 수행시)

 /etc/fstab에서 file system type 확인 가능

 

9-2. What’s in a File System ?

 

User data = actual data contained files

Metadata = file system structural information

* Superblock

 

 

cylinder group 마다 superblock의 복사본을 가지고 있다. (redundant superblock)

 

 

 

     file system의 일반적인 정보를 포함하고 있다.

     (file system type, size, status, contains pointers, other file system metadata structures.)

 

* I node

 

 

Inode table의 pointer를 이용 file’s data area내의 pointer가 가리키는 data를 가져온다.

 

 

 

 

* Directories

 

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

9-3. Accessing a File System

 

 

       
   
 
 

cat /mydir/f1

 

 

 

 

 

 

 

 

 

 

 

 

9-4. HP-UX Hard Links

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 특징     1. 같은 file system 안에서 link가 가능

           2. 오직 file만 link가 가능

              3. 원본, 사본의 구분이 없다. (둘다 원본)

 

9-5. HP-UX Symbolic Links

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 특징     1. 다른 file system도 link 가능

           2. Directory도 link 가능 ( directory link 는 symbolic link만 가능)

              3. 원본, 사본의 구분이 있다.

             4. file type이 l로 표시된다. : symbolic link file

 

 

9-6. HFS Structural Overview

 

 

 

   
  순서도: 문서: Primary Super block
  File System type and size
  Free resource summary
  Pointers to everything else !

Cylinder group 0
  Superblock backup
  Free resource summary and maps
  Inode table
 	101  wxr-xr-x 	user1 pointers
	102  r--r--r-- 	user2 pointers
	103  r-xr-xr-x	user3 pointers
  Data blocks for files in cylinder group 0
 
  순서도: 수동 입력: Additional cylinder groups !

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9-7. HFS Blocks

 

What is an HFS block ?

  - HFS always reads a block of data at a time

  - Allowed lock sizes : 4KB, 8KB, 16KB, 32KB, 64KB

  - Blocks are not necessarily contiguous

  - Block size is set at file system creation.

 

Assuming 8-KB blocks,

  - How many accesses are required for an 8-KB read ?

  - How many accesses are required for a 32-KB read ?

  - How many bytes are read if a 1-KB read is requested ?

 

9-8. HFS Fragments

 

What is an HFS fragment ?

  - Smallest unit of space HFS can allocate to a file

  - Allowed fragment sizes : entire block, 1/2 block, 1/4 block, 1/8 block

  - Fragment size is set at file system creation

 

 

 

 

Example :

  How would HFS allocate space for three files of size 8K, 4K, and 3K if:

    Block size = 8K                                     Block size = 8K

    Fragment size =8K                               Fragment size = 1K

 

 

       
   

 

 

 

 

 

 

 8K fragment  8K fragment  8K fragment  1K fragment  1K fragment  1K fragment

 

9-9. HFS Implications

 

HFS Advantages

  Easy to manage

  Fast and efficient

  The only option for the file system containing the kernel

 

HFS Disadvantages

  Slow and unpredictable crash recovery

 

 

JFS 에서는 장점

 

  Must be unmounted to extend

  Impossible to reduce

 

 

 

;  file system 의 meta 변화를 log로 남김.. change transaction을 intent log로 남김 : error 복구가 빠르다.. (intent log reply)

 

9-10. JFS Structural Overview

 

 

   
 
 
  순서도: 수동 입력: Additional allocation units !

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9-11. JFS Implications

 

JFS Advantages

  - Fast, reliable crash recovery

 

 

file system이 mount 되어 있는 상태, Online이 기본으로 지원되지 않음, Online JFS product를 구입해야 한다.

 

  - Online resizing

  - Online backups

 

JFS Disadvantages

 - Fragmentation issues

 - “Online” functionality not included with HP-UX

 - Kernel can’t be in a JFS file system

 

 

 

10.01

10.1

10.2 or 10.3

11.x

 

 

 

 

                   
   

JFS에서 resizing 지원 안됨

   
 
 
   

JFS에서 resizing 지원 가능

단, Online은 Online JFS product를

install 해야 한다.

 

   
 
 
 

fsadm : mount 상태에서 resizing tool <=lvextend>

 

 

 

 

 

 

 

 

 

 

* JFS Blocks and Extents

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 ...

 

JFS Block

 

 

 
 

 

 

 

 JFS Extent  : 연속 할당 단위 ,

 Access 요청에 대한 응답에 능동적이다.

I/O 속도를 향상 시킬 수 있다.

 

                                 

 

* HFS : Fragment +Fragment….=> Block

JFS : Block + Block …… => Extent

 

Module 10  File System Creation

 

10-1. Overview of File System Creation

 

 

 

 

 

 

 

 

 

 

 

 

 

10-2. Creating a New File System

 

1. Create the new file system

newfs –F vxfs /dev/vg01/rmyfs1

2. Create a mount point directory for the file system

mkdir /myfs1

3. Mount the new file system

mount /dev/vg01/myfs1 /myfs1

4. Add the file system to the /etc/fstab file

 

10-3. The newfs Command

 

 

 

실제 사용 가능한

file system size =

(총사용량 – min-free),

min-free가 약 10% 정도

차지한다.

실제 사용 가능한 용량은

전체의 90% 정도

(min-free default 10%)

 

Examples

1. newfs –F vxfs /dev/vg01/rmyfs1

2. newfs –F vxfs –o largefiles –b 8192 /dev/vg01/rmyfs1

 

 

 
 

 

 

 

3. newfs –F hfs /dev/vg01/rmyfs1

4. newfs –F hfs –o largefiles /dev/vg01/rmyfs1

5. newfs –F hfs –b 4096 –f 2048 –m 5 –I 4096 /dev/vg01/rmyfs2

 

 

 
 

 

 

 

 

 

 

 

10-4. Mounting the New File System

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

mkdir /myfs1

mount /dev/vg01/myfs1 /myfs1

mount –v : display current mounted files  : type

bdf : display mounted files : size

 

10-5. The umount command

 

umount /dev/vg01/myfs1

      or

umount /myfs1

 

fuser –u  : 사용중인 process 검색

fuser –ku /dev/vg01/myfs1  : 사용중인 process 검색해서 kill

 

10-6. Automatically Mounting File Systems

 

 Place an entry in the /etc/fstab file

 File systems will be mounted when the system is booted,

  or you can use mount –a or mountall

 You can mount file systems by absolute directory names.

Sample /etc/fstab:

/dev/vg00/lvol3   /           vxfs       delaylog                           0           1

/dev/vg00/lvol1   /stand   hfs         defaults              0           1

/dev/vg00/lvol4   /home   vxfs       delaylog                           0           2

/dev/vg00/lvol5   /opt       vxfs       delaylog                           0           2

/dev/vg00/lvol6   /tmp      vxfs       delaylog                           0           2

file system     directory  F/S type   rw,suid     무조건 0    fsck시 check 순서

                             (mount option) (예비용 field)  낮은 순서부터 0 제외

mount –a            : /etc/fstab 참조

umount –a           : /etc/mnttab 참조

 

10-7. CD-ROM File Systems (CDFS)

 

 - Allows mass distribution and easy retrieval of large amounts of information

 - You can read data from a CD, but you cannot write to it.

 - To use CDFS volumes;

  1. Configure the appropriate driver into the kernel.

  2. Create the device files (if necessary).

  3.  

     

     

    HP system외 다른 vendor의

    CD-ROM은 mount시에

    option을 적어주어야 한다.

     

     

    Mount the CDFS volume with the mount command.

     - CDFS Examples;

  4. LaserRom Manual

  5. Application CD

     

     

     
     

    g /etc/fstab에 추가해서 booting시에 Automount 시키려면  항상 CD가 들어 있어야 한다.

    /dev/dsk/c1t3d0      /cdrom     cdfs          ro  0       0

    é 현실적으로 사용하기가 불편함 read only

     

     

 

 CD-ROM mount 절차

  1. # ioscan –unfC disk

  2. # mkdir /cdrom

  3. # mount /dev/dsk/c1t3d0 /cdrom

     

  4. Mount option (in /etc/fstab)

    - defaults                    Sets options rw, suid and noquota. When used, this must be the

    only option specified. You may not specify additional options

    along with defaults.

    - rw (default)                read/write

    - ro                              read only

    - suid (default)                          set user-id allowed

    - nosuid                      no set user-id allowed

    - quota                        enables checking of disk quota on this file system

    - noquota (default)       no quota checking on this file system .

     

     

     

     

     

     

     

     

     

     

     

     


 

Module 11  File System Maintenance

 

11-1. Monitoring File System Free space

 

Monitor available file system space with bdf :  -i option ; iused, ifree, iuse

Filesystem            kbytes    used   avail  %used   Mounted on

/dev/vg00/lvol5   294912   261523  31352   89%    /opt

/dev/vg00/lvol4   24576      19333   4978   80%    /home

/dev/vg01/myfs1  16384     1174  14331    8%    /myfs1

/dev/vg01/myfs2  15893    14006    297   98%    /myfs2

 

Determine space used by directory subtrees with du :

 

 

 -k : Report output in kilobytes (없으면 512 bytes Block 수)

 

 

# du –sk /myfs2/*

  1. < >< >< >< >

    into existing free space

  2. onto a new disk in the volume group

     

    성공적인 login    : /var/adm/wtmp #last

    실패한 login       : /var/adm/btmp              #lastb

    sulog     : /var/adm/sulog : su 에 대한 log.. text file  # cat /var/adm/sufile

     

     = > log 는 rm command가 아닌 null 을 overwrite 해서 지워야 한다. 

     

    # find / -name core –exec ll {} \;             # list all core files

    # find / -name core –exec rm {} \;          # remove all core files

    # find /tmp –atime +30 –size +1000c –exec ll –ud {} \;

     

     

 

core file : serious error 나 QUIT signal 에 의해서 process 가 비정상적으로 종료 했을 때 생성되는 file 로 trouble shooting 에 사용되는 종료된 process의 core image를 담고 있다.

12-3. Extending a Volume Group

 

 

 
 

 

 

 

 

 

 

pvcreate /dev/rdsk/c0t5d0

vgextend vg01 /dev/dsk/c0t5d0

vgdisplay -v

 

 

 

 

 

 

12-4. Extending a Logical Volume

 

lvextend –L 32 /dev/vg01/myfs2  /dev/dsk/c0t3d0

        : 최종 size 

  생략하면 원래 partition 이 존재 하는

곳에서 순서대로 할당

lvdisplay –v /dev/vg01/myfs2

 

 : #bdf는 file system size를 나타내므로 extend 된

partition size 가 아닌 이전의 partition size display

  • extend file systems

     

    12-5. Extending a File System

     

     

     
     

     

     

     

     

     

     

     

     

     

 

# umount /myfs2

# extendfs /dev/vg01/rmyfs2

 

 

 # fsadm –F vxfs –b 32M /myfs2

# bdf  /myfs2

 

 

 

OR

 

# mount /myfs2

# bdf

 

11-6. defragmenting a File system

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

       
  폭발 1: Before   폭발 1: After

 

 

 

 

 

 # fsadm –F vxfs –deDE –t 600 /myfs2

 

※ JFS(Veritas) file System On line functin

  • HP On line JFS Product 설치

  • On-line resizing
    fsadm –F vxfs –b 16M /jfs.mount pointe

    .ex) fsadm –F vxfs –b 16M /myfs1

  • On-line defragment
    fsadm –F vxfs –D –d –E –e /jfs.mount pointe

  • On-line Backup

    => shapshot 을 이용한 backup

     1,2,3 모두 umount 하지 않은 상태에서 (on-line)에서 모두 가능

     

    11-7 .Repairing a Damaged file system

    : fsck automatically corrects file system corruption after a system crash

     

 

Example : Running fsck on /dev/vg01/myfs2

  1. mount –v현재 mount되어 있는 File System 정보 표시

  2. umount /dev/vg01/myfs2

  3.  

     

    lvremove

    vgremove          

    pvcreate

     

    fsck –F hfs /dev/vg01/rmyfs2

    : block 형 보다 character 형이 빠르다.

  4.  

     

    pvcreate -f

     

    mount /dev/vg01/myfs2

     

    Some General fsck Options

     -y                      repair, super block의 정보에 맞춰서…

    Some Special HFS fsck Options

     -b block#          newfs시에 표시됨, /var/adm/sbtab의 정보를 이용, /etc/sbtab

     -f                      강제 forces

     * fsck –o full :extent log 만 check하면 안될 경우… hard disk 손상 등… full check ………

    ※ Checking lost+found   filesystem 에 존재

                              & fsck 를 이용하여 check 하고 남은 file 들을 저장하는 공간

                                                                               

     

     

     

     

     

     

     

     

     Exists in every file system

     Orphaned files copied to this directory by fsck     재생성 : /usr/sbin/mklost+found

     Should be checked after every fsck

     

    ※ Flushing the Buffer Cache

     

 

sync(1m)

  Writes buffer contents to disk

  Keeps the file system current

  Is normally invoked on a regular basis by the syncer daemon

 

syncer(1m) daemon

  syncer is started automatically at system boot.

  The syntax of the syncer program is :

            syncer [seconds]

 

 

Summary of LVM Commands

 

extends                         Extend an off-line file system

lvchange                   Changes the characteristics of a logical volume

lvcreate                    Creates a logical volume in a volume group

lvdisplay                   Displays information abort logical volume

lvextend                    Increases the number of physical extents allocated to a logical volume

lvlnboot                     Prepares a logical volume to be a root, swap or dump volume

lvmerge                     Merges previously mirrored volumes into one logical mirrored volume

lvreduce                   Decreases the number of physical extents allocated to a logical volume

lvremove                   Removes one or more logical volumes from a volume group

lvrmboot                    Removes a logical volume link to root, swap or dump volume

lvsplit             Splits a mirrored logical volume into two logical volumes

lvsync                      Synchronizes logical volume mirrors that are stale in one or more logical volume

pvchange       Changes the characteristics of a physical volume in a volume group

pvcreate                   Creates a physical volume that can be used as part of a volume group

pvdisplay         Displays information about one or more physical volumes within a volume group

pvmove                    Moves allocated physical extents from one physical volume to another

vgcfgbackup   Saves LVM configuration for volume group

vgcfgrestore   Restores LVM configuration onto the volume group

vgchange       Sets the status of a volume group to on or off

vgcreate                   Creates a volume group

vgdisplay        Displays information about volume groups

vgextend                   Extends a volume group by adding physical volumes to it

vgexport         Exports a volume group from a system

vgimport                    Import a volume group onto the system

vgscan                     Scans the sysetm’s physical volumes for volume groups

vgreduce        Removes a volume group by removing one or more physical volumes from it

vgremove        Removes the definition of one or more volume groups from the system

vgsync                     Synchronizes logical volume mirrors that are stale in one or more volume group

 

 

 

Module 12  System Backup

 

12-1. Why Back Up?

 

How Much Data Can You Afford To Lose?

Data is sometimes lost by;

 - File system corruption

 - Accidential removal fo files

 - Hardware failures

 - System crash

Regular backups;

 - Minimize data loss

 - Keep users happy

 - Provide stability and order

 

12-2. What Do You Back Up?

 

- Backup the entire file system (full backup)

- Backup part of the file system

  • Files that have changed since the last backup (incremental or delta backups)

  • A subtree of the file system

  • Application data

  • User’s files

    - Backup the database configuration

    - Backup the LVM configuration  : /etc/lvmconf/vg.name.conf

                                                         => volume group configuration file

    tar cvf /dev/rmt/0m 대상     backup

    tar xvf /dev/rmt/0m 대상     restore

    tar tvf /dev/rmt/0m > tarlist    backup list

     

    12-4. How Do You Perform the Backup?

     

    - fbackup/frecover are the most flexible standard HP-UX backup utilities.

    - Other utilities are available as well.

     

    12-5. Data Backup with fbackup

    Backing up a single Directory or File

    Example

    fbackup –f /dev/rmt/0m –i /home –I index.home

    fbackup –f /dev/rmt/0m –i .     -I index.pwd

    Perform Full and Incremental Backups

    Examples

    cd /var/adm/fbackupfiles

    vi graph

       i  /

       e  /cdrom

    fbackup –f /dev/rmt/0m –u0g graph –I index.full

    fbackup –f /dev/rmt/0m –u1g graph –I index.incremental

     

    fbackup options

    -f device            the device to which output will be sent

    [ -0-9 ]              backup level – default is 0

    [ -u ]                 update /var/adm/fbackupfiles/dates file (only if used with –g)

    [ -i path ]          include path (file or directory) in the backup

    [ -e path ]         exclude path (file or directory) from the backup

    [ -g graph ]       file that contains a list of files and directories

    to be included or excluded from the backup

    [ -I path ]           write an index to file path

     

    12-6. Data Recovery with frecover

  • View the contents of an fbackup tape :

     # frecover –f /dev/rmt/0m –xNv : archieve (tape)의 내용을 보여준다. tar의 tvf와 동일

     

  • Restoring Files and Directories

    Examples

    frecover –f /dev/rmt/0m –rv

    frecover –f /dev/rmt/0m –i /home/user1 –xv

    frecover –f /dev/rmt/0m –i /home/user2 –xv

     

    frecover –r : Recover everything on a backup volume.

    frecover –x : 선별적 restore

    frecover –v : 과정 보기

     

  • Extracting an Index

    frecover –f /dev/rmt/0m –I index

     

     

 

=> file 을 수정하고 recover 를 하면 tape 에 있는 정보가 old file 이기 때문에 recover가 되지 않는다.

 

12-7. Network Backup and Recovery

 

 

 
 

 

 

 

 

 

 

 

 

donald # vi ~root/.rhosts

       mickie

       minnie

 

mickie # fbackup –f donald:/dev/rmt/0m –u0g graph –I index

minnie # fbackup –f donald:/dev/rmt/0m –u0g graph –I index

 

mickie # frecover –f donald:/dev/rmt/0m –rv

minnie # frecover –f donald:/dev/rmt/0m –rv

 

12-8. Backing up the Boot Disk with make_recovery

 

 

 

 

 

 

 

 

 

 

 

12-9. Creating a make_recovery Tape

 

 

 

 

 

 

 

 

 

 

 

 

※ Recovery Tape 생성

  1. Install the Ignite-UX product

  2. Edit /var/opt/ignite/recover/makrec.append ; recovery tape에 application data 추가시

  3. Check disk space available in /var

  4. tape device 에 tape insert

  5. Create a recovery tape and log file

    텍스트 상자: check_recovery시에 필요한 log를 남긴다.
Ô /var/opt/ignite/recovery/makerec.last
make _recovery [-AC]

    # make_recovery –C       

    A : vg00

  6. < >하기 위해 필요  

     

     

     

     

     

     

     

     

     

     

 

Compare current OS files to recovery tape;

# check_recovery

 

 

Module 13  Scheduling cron Jobs

 

13-1. The cron Daemon

- Executes commands at specified dates and times

- Automates routine tasks

- Examples;

  • Trimming system log files

  • Performing system backups

  • Generating weekly reports

     

    /var/adm/cron/cron.allow 

    /var/adm/cron/cron.deny      => cron 사용 권한 설정 file

     

    13-2. cronfile

    - cronfile contains one line for each schedule job.

    - Example;

     

     

     

                           
      모서리가 둥근 사각형 설명선: 분   모서리가 둥근 사각형 설명선: 시간   모서리가 둥근 사각형 설명선: 일   모서리가 둥근 사각형 설명선: 월   모서리가 둥근 사각형 설명선: 요일   모서리가 둥근 사각형 설명선: 수행 할 작업

     

     

     

     

 

# min    hour      date       month    day        command

# 0-59   0-23      1-31      1-12      0-6        must redirect output!

0        *            *            *            *            /usr/bin/date > /dev/console

0        6            1,15       *            *            > /var/adm/btmp

0        5            *            *            1-5        /usr/bin/who | /usr/bin/lp

 

 

 

 

  • 수행할 작업은 항상로 적어줘야 한다

     

    13-3. Managing cronfile with crontab

     

    - Edit and submit a cronfile ;

    crontab –e

     

    - View your cronfile ;

    crontab –l

     

    - Remove all your scheduled cron jobs ;

    crontab –r

     

     

     

     

     

     

     /var/adm/cron/cron.allow

       cron.allow에 user name을

       등록하면 일반 user도 cron에

       작업을 올릴수 있다.

     

     

    14-4. What Happens When a Job is Scheduled ?

     

     

     

     

     

     

     

     

     

     

     

     

 

Example )

#tty

/dev/pts/ta

#crontab –e : cron job edit (vi editor)

# min      hour       date       month     day        command

0   *         *           *          *            /usr/bin/date > /dev/pts/ta

#crontab –l : cron job list

#crontab –r : remove
Module 14  Managing Swap Space

 

14-1. HP-UX Memory Concept

 

 

 

 

 

 

 

 

 

 

 

 

                                           /stand/vmunix

* page : process 가 memory 에 할당되는 단위 , swap 의 단위

  • virtual memory = RAM + swap space

    lockable memory 는swap 영역으로 내려오지 않는다.

     

     

     

     

     

     

     

     

 

14-2. HP-UX Swap Concept

 

 

       
 
   

 statedaemon :

 Memoty 상태 감시

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page in

 

 

                                                                                            

 

Swap Logical Volume   

 

 

 * Virtual memory subsystem daemon (vhand, swapper )

 

 

 

 

 

 

 

 

 

 

                    ----> 모든 page 가 swap 영역에 deactivation 상태

 lotsfree 상태 : no paging occurs

 

14-3. HP-UX Swap Types

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

* device swap : partition dl swap space 로 사용됐을 때
(whole disk device swap, lvm Device swap)

* file system swap : file system 내에서 maximum 값 지정해서 사용

                  일반적으로 작 사용되지 않는다.

* pseudo swap : Logical 하게만 존재.. physical 아님..

                  HP-UX default로 사용되고 kernel 이 인식한다.

 

14-4. HP-UX Pseudo swap

pseudo swap kernel parameter

=> swapmem_on : 1 (enable), 0 (disable)

#kmtune –q swapmem_on

                                                                  

14-5. Enabling Swap from the Command Line

 

텍스트 상자: ⓐ swap on a logical volume
ⓑ Swap on the end of the whole disk device
ⓒ swap on a whole disk
ⓓ swap on a file system
ⓔ Enable all swap entries in /etc/fstab
텍스트 상자: ⓐ swapon  /dev/vg01/myswap
ⓑ swapon  -e /dev/dsk/c0t1d0
ⓒ swapon  /dev/dsk/c0t2d0
ⓓ swapon  –p 4 –l 4M /myfs2
ⓔ swapon  -a
Examples ;                                        Explanations ;

 

 

 

 

 

 

Device swap 과 file system swap 모두 swapon command 를 사용해서 enable

ⓑ #newfs –R 200 /dev/rdsk/c0t1d0 :  file system 의 reserved area 를 swap space 로 사용

-e option on swapon should ony be used on disks configured using the whole disk approach

 

14-6. Enabling Swap via /etc/fstab

 

Swap areas listed in /etc/fstab are automatically enabled at system boot.

Examples

             /dev/vg01/myfs1              /myfs1   vxfs       delaylog                         0  2

             /dev/vg01/myfs2              /myfs2   hfs         defaults             0  2

 

 

 

swap은 file system

check 하지 않는다.

 

 

① /dev/vg01/myswap          .        swap     defaults             0  0

② /dev/dsk/c0t1d0                            .         swap     end                   0  0

      ③ /dev/dsk/c0t2d0                            .         swap     defaults              0  0

④ /dev/vg01/myfs1                          /myfs1   swapfs  pri=4, lim=4M       0  0

 

 

Explanations ;

             ① Swap on a logical volume

             ② swap on the end of a whole disk device

                TYPE 은 swap 과 swap fs 두가지

            swap 일 경우에는 directory, backup-frequency, pass_number 생략

            swapfs일 경우에는 block device, backup-frequency, pass_number 생략

OPTION에 end가 쓰이면 swapon –e 와 동일 option

             ③ Swap on a whole disk

             ④ Swap on a file system

            OPTION에서 pri = priority 는 swapon –p option 과 동일

                         Lim = limit 는 swapon –l  option 과 동일

 

* /etc/fstab file에 swap 정보를 작성한 다음 swapon –a 혹은 rebooting 을 하면 자동으로 swap space 가 할당이 된다. /sbin/init.d/swap_script 를 실행 시켜서 할당됨.

 

 ※ swap space 를 disable  시키기 위해서는 rebooting을 해야 한다. (HP-UX)

14-7. Monitoring Swap Space

 

Examples ;

# swapinfo

# swapinfo –f

# swapinfo –d

# swapinfo –tm

 

Explanations ;

 Report usage of all swap areas

 Only list file system swap areas

 Only list device swap areas

 Report values in megabytes, with a total line

 

14-8. Guidelines for Selecting Device Swap Areas

 

 Two swap areas on different physical disks are better than one single swap area

 Only one swap partition (logical volume or reserved space) per disk

 Device swap areas should be of similar size

 Consider the speed of the disks

 

 

 

 

 

 

 

 

14-9. Guidelines for Selecting File System Swap Areas

 

 Avoid using busy file systems such as the root file system

 Use bdf to check file system space availability

 Set priorities appropriately

  • Faster devices over slower devices

  • Infrequently-used file systems over busier file systems

     It is preferable to enable swap on file systems that are located on separate disks or,

      in the case of LVM, separate physical volumes.

     

 

Module 15  Managing Printers

 

15-1. LP Spooler Concepts

                                          laser1

 

 

 

 

 

                                         laser2

 

 

 

 

15-2. LP Printer Types

 

 Local

 Remote

 Network

 

 

 

 

 

15-3. Adding Local Printers Using SAM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15-4. Adding a Remote Printer Using SAM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15-5. Adding a Network-based Printer

 

 

 

 

 

 

 

 

 

 

 

 

 

JetAdmin Utility : printer setting시 반드시 필요

 

 

 

 

 

 

 

 

15-6. Managing Print Queues

 

Accept / Reject

# reject –r “Sparky is down. Use the destination lj” sparky

# accept sparky

 

Enable / Disable

# disable sparky

# enable sparky

 

Moving Request

# lpshut                           Must stop the schedules before lpmoveing requests

# lpmove sparky lj            Move all requests from sparky to lj

 

# lpmove sparky-123 lj     Move only one request to lj

 

# lpsched                        Restart the scheduler

# lpalt sparky-123 –d lj     Move only one request. This can be used bye an ordinary user

 

Cancel

# cancel sparky-123        Cancel request sparky-123

# cancel sparky               Cancel current request printing on sparky(현재 출력중인 것을 중단)

 

Display Status

# lpstat –t

scheduler is running       lpsched daemon 동작중

system default destination : lj

device for lj : /dev/null

remote to : lj_ld on hpsfecid

device for sparky : /dev/c1t0d0_lp

sparky accepting requests since Dec 19 08:18

lj accepting requests since Dec 19 08:18

printer sparky disabled since Dec 19 10:47 –

             reason unknow

             fence priority : 0

printer lj is idle. enabled since Dec 19 08:54

             fence priority : 0

sparky-18           root       priority 0 Dec 19 10:47

             hosts                               37410 bytes

printer queue for lj

no entries

 

 

 

 

15-7. Priorities and Fences

 

Fence Priority

# lpfence sparky 5                        Set the fence priority to 5

 

 

# lp –p5 –d sparky myfile               Jump the fence with this request

 

 

# lpalt sparky-123 –p5                   Allow one request to print

 

 

# lpfence sparky 0                        Lower the fence and allow other requests to print

 

15-8. Troubleshooting the Spooler

 

Potential Spooler Problems ;

 Spooler won’t start

 Scheduler won’t stop

 Paper jam/printer out of paper

 Runaway printout

 Printer won’t print

 

 

 

Module 16  Booting an HP-UX System

 

 

 

 

 Run-Level

S,s , 0 , 1 , 2 , 3 , 4 , 5 , 6

 

0        halt 상태

1,s.s  single usermode

2        cron, inetd, NFSclient 실행

  1. CDE, NFS Server .. ; 서비서 시작 완료

Default run level /etc/inittab

4

5      사용안함

6

 

 

16-1. HP-UX Operation States

 

아래쪽 화살표: Multi –user mode,
booting
Multi-user mode

  Normal machine state

  Users can log in

  File systems mounted

  Most services plus daemons available

 

Single-user mode

  Required for some admin tasks

  Only root login allowed         console에서만 가능

  Non-critical file systems unmounted

  Non-critical daemons shut down

 

Halt state

Nothing running  => system power off 를 위한 상태

 

16-2. Changing State with Shutdown and Reboot

텍스트 상자: shutdown -r텍스트 상자: reboot텍스트 상자: shutdown텍스트 상자: reboot -h텍스트 상자: power-off텍스트 상자: shutdown -h 

 

 

 

 

 

 

 

텍스트 상자: telnetd Õ sh Õ ps –f

 

 

 

Multi Single

1 .shutdown

2. init

3. manual boot

 

 

 

 

 

 

 

 

텍스트 상자: shutdown = single user mode로
reboot = reboot –r

 안정성은 shutdown이 reboot 보다 좋다.

 

 Multi-user mode에서는 반드시 shutdown으로 종료

/etc/shutdown.allow에 등록이 되어 있으면 일반 user도 shutdown 할수 있다.

SAM –r  :  user에게 SAM의 사용 권한을 할당. /usr/sbin

 

Shutdown [-r : -h ][ -y : -n ][seconds]

. reboot  halt  yes  no  : 시간 지정 (10초 ~ 900초) , default 60 초

ex) shutdown –hy 0 : 가장 빠르게 shutdown  (시간을 0을 지정하면 바로 shutdown )

    shutdown –ry 0 : 가장 빠르게 reboot

 

텍스트 상자: kill –9  reboot   	Daemon을 한번에 종료시킴 : KILL signal
kill –15 shutdown	Daemon을 차례로 종료시킴. : TERM (terminate) signal
ð shutdown 과 reboot 은 signal이 다르기 때문에 Multi-user mode 에서 
reboot 을 하면 안된다.

 

 

 

 

 

Load Kernel in memory.

  Bring system up to a fully functional state.

 

 

 

 

 

 

 

 

 

 

 

16-4. System Boot Players

 

 

 

 

 

 

 

 

 

 

 

 

 

#lvlnboot –v : boot disk 의 구조

#lifls /dev/dsk/c0t0d0 : primary boot device file

 

 

  • Boot ROM 시작 단계

                                                                      System

     

     

     

     

     

     

     

     

     

     

     

     

     

 

 - boot rom 단계는 kernel 을 memory 로 성공적으로 load 하기

단계로 kernel이 memory 로 load 되면 HPUX start up 단계로 이동해 file system 을 mount 하고 service 를 start 한다.

 

BootROM chip : PDC (processor dependent code )포함,

 hardware self test , system boot disk search.  메모리에서 실행

Stable Storage : primary boot disk, alternate boot source, system console  hardware path 정보

Boot Area     :  kernel load 에 필요한 정보 함유 ,

LIF (Logical Interchange Format) area are ISL(initial System Loader), the AUTO

file, HPUX utility

/stand        : kernel stored area , /stand/vmunix , must be HFS

/                 : root file system

Primary Swap  : swap space

 

 

 

 

 

BootROM Õ PDC Õ ISL Õ hpux Õ kernel load

 

 

 

ISL : Auto file road  hpux (;0) /stand/vmunix

 

 

16-4. System Boot Process

 

 

       
 
   

hpux (;0) /stand/vmunix

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Manual boot : console 상에서만 가능, boot disk와 kernel을 선택할 수 있다.

Boot_Admin > search       H/W path 검색

 

 

 

Auto Boot

 

 

Boot_Admin > boot p1

Interact with IPL(y/n)  y

ISL> hpux (;0) /stand/vmunix  default이기 때문에 생략 가능

 

  1. The PDC Chooses a Boot Disk
    PDC는 stable storage 에 지정된 hard ware path

    #setboot  ; primary alternative boot path 확인 및 수정 가능

  2. ISL Chooses a kernel to Boot
    AUTO file 참조해 default kernel path 결정, loads and runs the HPUX utility from the boot disk

    * autofile
     #lifls /dev/dsk/c0t0d0       ; boot 영역의 내용을 확인

     #lifcp /dev/dsk/c0t0d0:AUTO -  ; autofile 의 내용을 standard output 으로

    => hpux [/stand/vmunix] ; kernel 은 생략가능

    #lvlnboot –v : boot area 확인
           # mkboot –a “hpux –is” /dev/dsk/c0t0d0 ; single user mode 로 autofile 수정

    # lifcp /dev/dsk/c0t0d0:AUTO –

     => hpux –is [/stand/vmunix]

  3. HPUX Loads the Kernel
    kernel 을 찾기 위해ISL에서 제공한 option 과 kernel pathname 사용, loads the default kernel (/stand/vmunix) & boots the system to multi-user mode

  4. vmunix Brings the system to a Fully Functional State
    kernel scans the hardware, mounts the root file system, and starts the init daemon. The init daemon starts the daemons and services necessary to bring the system up to multi-user mode

    16-5. Autoboot versus Manual boot

     

    Autoboot

      System boots without admin intervention

      Uses default boot disk kernel

      Normal mode of operation

    What if …

  5. My root disk crashed. I need to boot from my recovery tape…

  6. my kernel is corrupt. I need to boot from my backup kernel….

  7. single user mode booting

  8. OS Install

     

    A manual boot may be required !

     

    16-6. Interacting with the PDC/BootROM

    Getting to the ISL

     

     

     

 

menu choice : a                            # PDC prompt

> help                                           # view help menu

>search                                        # list all possible boot devices

>search ipl                                   # list all devices containing an IPL

>path                                            # display contents of stable storage

>path pri 8/12.6.0                                       # set 8/12.6.0 as the primary boot path

>path alt 8/12.5.0                           # set 8/12.5.0 as the alternate boot path

> boot alt                                       # boot from the alternate boot path

>boot pri                                       # boot from the primary boot path

> boot pri isl                                  # boot from the primary to isl prompt

                                                     , 1차 loader isl 을 직접 실행할 경우

16-7. Interacting with the ISL/IPL

 

 

Getting to the ISL

 

 

 

 

menu choice : a                                         # some models go straight to BOOT_ADMIN

BOOT_ADMIN> boot pri isl                                        # use “isl”

Interact with IPL ? Yes                                # some models go straight to ISL

 

Useful ISL commands

ISL> hpux show autofile                              # display the LIF AUTO file

ISL> hpux ls                                                # list contents of /stand

ISL> hpux                                                    # boot from default kernel

ISL> hpux –is                                              # boot to single-user mode

ISL> hpux –lq                                             # boot without LVM quorum
 : 정적성 check 안하고 booting , disk currupt case

                                                                        Mirrored disk 가 존재 할 때 사용

 

ISL> hpux –lm                                             # boot to LVM maintenance mode

                                                                        ; vg00 deactivation 하기 위해서, vg00은 boot disk 를 포함하기 때문에 maintenance mode 가 아니면  deactivation 이 불가능 하다.

                                                                        ; vg00의 configuration 변경, root file system extend, primary swap 변경 시 사용

 

ISL> hpux –is /stand/vmunix.prev               # boot using an alternate kernel

 

16-8. What Happens after the Kernel Is Loaded ?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

vmunix initializes system hardware and devices             

* scan hardware

* Assigns kernel drivers

vmunix initializes kernel data structures                    

* initializes the process table and other kernel data structures

* Starts the virtual memory subsystem

/sbin/pre_init_rc checks and mounts the root file system     

* Repairs the root file system if necessary via fsck
* Mounts the root file system

/sbin/init starts all other system services                   

* Creates device file via ioinit and insf
* Repairs file systems if necessary via fsck
* Starts cron, lpsched, and other necessary services and daemons

 

 

 

16-9. Run Levels

 

Init starts services in stages (run levels)

Possible run levels      = 0, s, 1, 2, 3, 4, 5, 6

Lower run levels          = few services available

Higher run levels         = more services available

Simplified example :

Run level :

Services available :

 

 

 

CDE : Graphic Windows 환경

 

 

3

syncer, apooler, CDE, NFS

2

syncer, spooler, multi-user, network

1

syncer

0

 

 

16-10. Changing Run Levels

 

Viewing the current run level

# who –r

.  Run-level  3  Dec  1  12:13  3  0  S

 

 

 

 

 

 

 

Changing run levels

# init 4                 # moves up to run level 4

# init 2                 # moves down to run level 2

# init 3                 # moves backup up to run level 3

 

16-11. Starting Services via /etc/inittab

 

Sample inittab file

### change the default run level here

init:3:initdefault:

 

### pre-configured lines required for boot – don’t change !

ioin::sysinit:/sbin/ioinitrc                            # scan h/w and create dev files

muxi::sysinit:/sbin/dasetup                        # initialize console mux

stty::sysinit:/sbin/stty 9600                         # set console baud rate, etc.

brcl::bootwait:/sbin/bcheckrc                    # run fsck on file system

cprt::bootwait:/sbin/cat /etc/copyright       # display copyright

sqnc::wait:/sbin/rc

              모든 run level 실행

### these lines display login prompts

cons:123456:respawn:/usr/sbin/getty console       # login prompt on console

t0p1:234:respawn:/usr/sbin/getty –h tty0p1 H          # login prompt for tty0p1

t0p2:234:respawn:/usr/sbin/getty –h tty0p2 H          # login prompt for tty0p2

                                                     terminal에 login prompt를 계속 띄워준다.

(Note : some arguments are truncated from commands to fit on slide.)

 

Run-level            실행 run-level을 결정

Action                 initdefault:           Defines the default system run level.

                           boot,                   Execute only during the boot process.

                           bootwait,             booting 할때만 수행

                           sysinit:

                           wait:                    이 process가 끝나야 다음 수행.

                           respawn:            process가 죽으면 다시 process를 띄운다.

 

/sbin/rc#.d

             rc2.d     S로 시작하는 것 실행

             rc3.d     dtlogin.rc Õ CDE 환경

             rc0.d     S                        rc2.d     K

             rc1.d     S                        rc1.d     K

             rc2.d     S

             rc3.d     S

 

run-level을 내릴때에는 rc#.d의 K로 시작하는 script 수행

                                                     현재 level – 1부터 rc0.d 까지 모두 수행

run-level을 올릴때에는 rc#.d의 S로 시작하는 script 수행

                                                     현재 level +1 부터 올릴려는 level 까지 모두 수행

 

/etc/rc.config.d  Daemon 실행 script

                          환경 file의 변수를 1에서 다른것으로 바꾸면 수행 안됨.

 

   startup시          nfs_server  start_msg

                              nfs_server  start

   stop시              nfs_server  stop_msg

                              nfs_server  stop

 

 

 

 

Module 17  Configuring the HP-UX Kernel

 

17-1. Why Reconfigure the Kernel ?

 

Reasons for reconfiguring :

  To add or remove device drivers

  To add or remove subsystems

  To modify system parameters

Methods for reconfiguring

  SAM

  HP-UX commands

 

17-2. Static Kernel Modules

 

 

 

 

 

 

 

 

 

 

 

 

 

 

17-3. Dynamic Kernel Modules

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

17-4. Moving the New Kernel into Place

 

 

 

 

 

 

 

 

 

 

 


 

Module 18  Installing Software with SD-UX

 

18-1. Introducing SD-UX

 

Managing Software On Your Local Host

 

 

 

swinstall

swlist

swremove

 

 

  Installing Software

  Copying Software

  Removing Unwanted Software

  Listing Software

  Verifying Installations

  Packaging Software

  Configuring Software

 

18-2. SD-UX Software Structure

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

18-3. SD-UX Software Depots

 

 

 

 

 

 

 

 

 

 

 

 

18-4. The SD-UX IPD

 

 

 

 

 

 

 

 

 

 

 

 

 

 Maintained by SD-UX utilities

 Records installed software

 

18-5. SD-UX Daemon / Agents

 

Process

Description

swagentd

 

 

 

 

 swagent

Listens for requests, then schedules a “swagent” to do the work

Initiates communication between the target and the source

There must be one swagentd running on the system

to use “SD-UX” commands

 

Performs software management tasks

Started as needed bye “swagentd”

 

# /sbin/init.d/swagentd start                      # start it

# ps –ef | grep swagentd                           # check it

 

18-6. swinstall

 

/usr/sbin/swinstall

 

# swinstall  -s /dev/rmt/0m                       # from a local tape depot

# swinstall  -s /var/spool/sw                    # from a local directory depot

# swinstall  -s /cdrom                               # from a CD mounted on /cdrom

# swinstall  -s depothost:/mnt/mydepot    # from a network depot

 

 

 

18-7. Selecting Software to Install

 

  1. Select a product/bundle/fileset with the space bar (TUI) or mouse (GUI).

  2. Select Actions Show Description of  Software to view a software description

  3. Select Actions Mark for Install

  4. To meet dependencies, swinstall may automatically select additional filesets.

  5. Repeat steps 1-4 to select additional software.

  6. Select Actions Õ Install (Analysis) to install the selected software.

    /var/adm/sw/swinstall.log  Õ Install / Update Log

    18-8. Listing Software

     

     

     

     

     

     

     

 

 List Installed software

 List software in a depot

 

Examples

swlist                                                      Lists the software installed on your local system

swlist –d  @  /my  depot                     Lists the software in the depot /mydepot

swlist –l  depot  @  r08a6153   Lists the depots on the host r08a613

swlist –l  file  LVM                                  Lists all the files that are part of the LVM product

swlist –I                                                   Interactively list software installed on your local system

swlist –i  –d  @  /var/depot                   Interactively list software in the depot at location /var/depot

 

 

 

 

 

 

 

18-9. SD-UX command Summary

SD-UX Command       Purpose

 

swinstall                          Install software

swremove                        Remove software

swpackage                      package software into a depot

swcopy                            Copy software from one depot to another

swlist                               List software in a depot or installed on a system

swreg                              Make a depot visible to other systems

swverify                           Verifies the integrity of installed software and depot software

swconfig                          Configures and unconfigures installed software

swacl                               Change access to SD-UX software objects

swagentd                         Distribution daemon

 

 

Module 19 Installing Patches with SD-UX

 

19-1. Why Install Patches?

 

 New functionality

 New hardware support

 Bug fixes

 

19-2. Patch Naming Conventions

 

Patch Name Format is : PHxx_yyyy

where :

    PH  = Patch HP-UX

    xx   = area patched.

               CO – general HP-UX commands.

               KL – kernel patchs.

         NE – network specific patches.

         SS – all other subsystems : X11, Starbase, etc.

    yyyy = a unique number

 

Example : PHSS_4014 – an HP-UX subsystem patch name.

 

 

 

 

http://us-support.external.hp.com 

         # (Americas and Asia- Pacific)

http:// europe –support .external.hp.com

           # (Europe, Africa, and the Middle East)

 

 

19-3. Obtaining Patches

 

 HP Electronic Support Center (ESC)

  • individual patches

  • custom patch manager

     The Extension Software (XSW) CD-ROM

     HP Enterprise Response Centers

  • custom patch tapes

     

    19-4. Retrieving Patches from the Web Patch Database

     

     

     

     

     

 

1  Back up system

2  Download patch from the ESC web site to /tmp

3  cd /tmp

4  sh PHKL_6681

5  more PHKL_6681.text

  1. swinstall –s PHKL_6681.depot

     

    19-5. Retrieving Patches from Tape or CD

     

     

     

     

     

     

     

     

     

     

 

19-6. Installing Patches with swinstall

텍스트 상자: The next example installs all applicable patches on a 10.x machine.
# swinstall –s depot_name \
         -x auto_reboot=true \
         -x match_target=true
텍스트 상자: The 11.x example below installs all the critical patchs from the named depot :
# swinstall –s depot_name \
         -x auto_reboot=true \
         -x patch_match_target=true \
         -x patch_filter=’*.*, c=critical’

19.7. Listing Patches

11.0

             swlist –l patch ‘*.*, c=patch’

10.x

             swlist –l product PH*

 

To following is sample output :

             # Initializing …

             # Contacting target “servell”…

             #

             # Target : servell : /

             # PHCO_12772.ADMN-ENG-A-MAN            HPAutoRaid Utilities Manual Pages applied

             # PHCO_12772.ARRAY-MGMT                    HPAutoRaid Utilitirt.C-INC applied

             # PHKL_13052.CORE-KRN                          OS-Core.CORE-KRN applied

             # PHKL_13052.CORE2-KRN                         OS-Core.CORE2-KRN applied

 

 

19-8. Removing Patches

 

 

 

 

 

 

 

 

 

 

 


 

Module 20  Connecting to a Network

 

 

 

 

IP address

  Assigned to each network node

  • Must be unique
  • Define via SAM or set_parms

 

 

20-1. Setting an IP Address and Subnet Mask

 

 

       
 
   

/etc/rc.config.d/netconf

 

 

 

 

 

 

 

set_parms <argument>

         hostname

         timezone

         date_time

         root_passwd

         ip_address

         addl_network

 

20-2 Setting a Default Route

 

 

 

 

 

 

 

 

 

 

 

 Hosts can locally deliver data to nodes on own LAN

 Route is required to route data to other LANs

 Defined via SAM or set_parms

 

# set_prams initial

# sam Õ Networking & Communications Õ Hosts Õ Local Hosts File

       Actions Õ Configure Default Gateway

20-3. Setting a System Hostname

 

Hostnames

  Mnemonic name assigned to each node

  Can be based on

  • Purpose of node

  • Primary users of node

  • Any other naming convention

     Defined via set_parms

     

    # set_parms initial

    # sam Õ Networking & Communications Õ Lan Interface Cards

           Actions Õ Modify System Name

    20-4. Resolving Hostnames to IP Address

     

     

     

     

     

 

 Every outgoing packet requires an IP

 Three ways to resolve hostnames to IP addresses

  • /etc/hosts file

  • Domain Name Service (DNS)

  • Network Information Service (NIS)

     

    /sbin/init.d/net stop        read                 

    /sbin/init.d/net start                                     /etc/rc.config.d/netconf

     

    20-5. Configuring /etc/hosts

     

     

     

     

    mickie mailsvr

    •  

    128.1.1.3          donald

     

     

    Sample /etc/hosts :

     

     

     

     Maps : IP addresses Ö hostnames

     Maintained on each individual host

     Usually used to resolve hostnames on small LANs

     Define via SAM or copy from another host

     

    # sam Õ Networking and Communications Õ hosts Õ Local Hosts File

    Actions Õ Add/Modify/Remove

    20-6. Configuring a DNS Client

     

     

     

     

     

     

     

     

 

 Used to resolve hostnames on larger networks

 Clients request lookups from DNS servers

 To prevent duplicate names, each host assigned to a “domain”

 Must define the following via SAM or set_parms

  • Your DNS server address

  • Your DNS “domain” name

     

    # sam Õ DNS (BIND) Õ DNS Resolver

           Actions Õ Specify Name Servers

    20-7. Configuring a DNS Client

     

     

     

           
      폭발 1: DNS  

     

     

     

     

     

     

     

 

Q : Where do I look up hostnames ?

A : Consult /etc/nsswitch.conf

 

20-8. Trobleshooting Tools

 

Check connectivity

 

 

 

 ping : 물리적연결 + Network 구성 Check

 

 

   # ping 128.1.1.3

   # ping 128.1.1.4

Check hostname resolution

 

 

 

 linkloop MAC : 물리적 연결

 

 

   # nslookup minnie

   # nslookup donald

 

 

 

 

 

 

 

 

 

제 1 일차

 

** User Account 등록 절차

 

1. /etc/passwd file에 user 계정 등록

    echo ybn::1045:20::/home/ybn:/usr/bin/sh >> /etc/passwd

2. User home directory 생성 -> mkdir /home/ybn

3. 환경 file copy -> cp /etc/skel/.* /home/ybn

4. chown

    chown -R ybn /home/ybn  -> chown -R ybn:users /home/ybn

                               owner와 group을 모두 바꿔줌

5. chmod

    chmod 755 /home/ybn

 

**

find / -name ybnoh

 

find / -user ybnoh | xargs rm

                     xargs chown user2

 

** Super User의 password를 잃어 버린 경우

 

1. single mode로 booting

2. # mount -a

3. # vi /etc/passwd

4. # reboot or init 3

 

** USER ADD

 useradd [-u uid [-o] ] [-g group] [-G group [, group...]] [-d dir]

           [-s shell] [-c comment] [-m [-k skel_dir]] [-f inactive]

           [-e expire]  login

 

 useradd -u 1045 -g users -d /home/dickybn -s /usr/bin/ksh -m dickybn

 

제 2 일차

 

*** File System Create 절차

 

1. Creating Physical Volumns : 각각의 디스크에 대해서 pv를 create

 

  pvcreate /dev/rdsk/c0t3d0

  pvcreate /dev/rdsk/c0t4d0

 

2. Creating Volumn Groups : device file 생성 & vgcreate

 

  mkdir /dev/vg01

  mknod /dev/vg01/group c 64 0x100000

                               --

                                vg##과 동일한 ##

  vgcreate vg01 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0

 

3. Creating Logical Volumns

 

  lvcreate -L 16 -n myswap vg01

  lvcreate -L 16 -n myfs1  vg01

  lvcreate -L 16 -n myfs2  vg01

---------- partition  생성 완료

4. newfs

5. mount

 

 

[실습]

 

** File System 생성

 

1. pvcreate /dev/rdsk/c0t4d0

2. mkdir /dev/vg011

3. mknod /dev/vg01/group c 64 0x010000

4. vgcreate /dev/vg01 /dev/dsk/c0t4d0

---------/etc/lvmtab에 확인

5. lvcreate -L 16 /dev/vg01

   수행후 device file이 자동 생성됨

    or lvcreate -L 16 -n lvol12 /dev/vg01

6. newfs -F hfs /dev/vg01/rlvol#

            vxfs

7. mkdir /ybn

8. mount /dev/vg01/lvol# /ybn

 

 

lvremove /dev/vg01/lvol#

vgremove /dev/vg01

pvcreate   -> pvcreate -fv : 강제로 pvcreate 할수 있다.(지우는 과정이 생략)

 

 

 

제 3 일차

 

[실습]

 

** File System Hard Link

    : file name은 같고 file의 정보는 같다.

 

1. touch f1

2. ln f1 f2

3. ls -i  -> inode 확인

4. vi f1 -> f1 edit

5. cat f1

6. cat f2

 

[script로 user 생성]

 

1. vi로 adduser script 생성

 

uid = 1000

for name in $(cat /userlist)

do

  echo $name::$uid:20::/home/$name:/usr/bin/sh >> /etc/passwd

  mkdir /home/$name

  cp /etc/skel/.* /home/$name

  chown -R $name:users /home/$name

  chmod 755 /home/$name

  let uid=uid+1

done

 

2. vi로 userlist file 생성

3. adduser를 실행

4. crontab -l 로 작업 확인

5. crontab -r 로 작업 종료할수 있다.

 

제 4 일차

 

fbackup -f . -i /ybnoh -I /ybnoh/f/aaa

frecover -f /ybnoh/f/aaa -i /ybnoh -xv

 

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

cat home.graph

i /albert

i /stand

e /cdrom

 

fbackup -f /dev/rmt/0m -u0g home.graph -I index.full

fbackup -f /dev/rmt/0m -u1g home.graph -I index.incr

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

/var/opt/ignite/bin/make_recovery

/var/opt/ignite/bin/check_recovery

 

**printer 등록

 

# lpshut

# lpadmin -p laser2 -v /dev/           -m /usr/lib/lp/model/dumb

# accept laser2

# enable laser2

# lpadmin -d laser2 (option)

# lpsched

 

 

제 5 일차

 

cat /etc/inittab

init:3:initdefault:

ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1

tape::sysinit:/sbin/mtinit > /dev/console 2>&1

muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init

stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar < /dev/systty

brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.

link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon; \

        /sbin/ln /dev/systty /dev/syscon" >/dev/console 2>&1

cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon         # legal req

sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1         # system init

cons:123456:respawn:/usr/sbin/getty console console          # system console

 

Volumn Group 정보

 

--- Volume groups ---

VG Name                  /dev/vg00

VG Write Access            read/write

VG Status                  available

Max LV                                     255  => 최대 lv 갯수

Cur LV                                9           => 현재   "

Open LV                     9

Max PV                     16       => 최대 pv(disk) 갯수

Cur PV                      2                 => 현재     "

Act PV                      2

Max PE per PV             2000

VGDA                      4

PE Size (Mbytes)             4

Total PE                   500                                                                          => 이 vg size

Alloc PE                   424         =>   "   사용중인 size

Free PE                    76         =>   "   남은 size

Total PVG                   0

Total Spare PVs              0

Total Spare PVs in use         0

 

   LV Name                     /dev/vg00/lvol11

   LV Status                   available/syncd

   LV Size (Mbytes)            40

   Current LE                  10

   Allocated PE                10

   Used PV                     1

 

   --- Physical volumes ---

   PV Name                     /dev/dsk/c0t6d0

   PV Status                   available

   Total PE                    250              => disk size (250*4 =1GB)

   Free PE                     0

 

   PV Name                     /dev/dsk/c0t5d0

   PV Status                   available

   Total PE                    250

   Free PE                     76

번호 제목 글쓴이 날짜 조회 수
43 [UNIX/AIX] Download Java version on AIX file 김병수 2019.11.11 2
42 [UNIX/AIX] rsync install and config on AIX7.1 file 김병수 2019.11.07 3
41 [UNIX/AIX] filesystem의 jfs2log 파일 변경 김병수 2019.11.06 2
40 [UNIX/AIX] 0516-1972 varyonvg : The volume group is varied on in other node in concurrent mode; non-concurrent mode 김병수 2019.11.06 3
39 [UNIX/AIX] 0506-365 Cannot mount guarded filesystem 김병수 2019.11.06 2
38 [UNIX/AIX] UNITY 400 스토리지, AIX 7.1, EMC ODM 설치 김병수 2019.11.05 2
37 [UNIX/AIX] AIX 7.1에 naver 나눔고딕 설치 file 김병수 2019.10.08 7
36 [UNIX/AIX] 스토리지 마이그레이션 방안 김병수 2019.10.07 10
35 [UNIX/AIX] error 내용 중 Detail Data SIGNAL NUMBER 6 의미 김병수 2019.10.03 786
34 [UNIX/HP-UX] 간단한 명령어 김병수 2019.10.03 6
33 [UNIX/Solaris] 간단한 명령어 김병수 2019.10.03 6
32 [UNIX / HP-UX] HP-UX vPar Architecture and compared introduce 김병수 2019.10.03 8
31 [UNIX / HP-UX] vPars v6 CLI 김병수 2019.10.03 7
30 [OS / HP-UX] i2 Blade Memory organization 김병수 2019.10.03 10
29 [OS / HP-UX] sar 명령어 김병수 2019.10.03 6
28 [UNIX/HP-UX] swap 확인하기 김병수 2019.10.03 6
27 [OS / AIX] AIX Performance Tools file 김병수 2019.10.03 11
26 [OS / AIX] 시스템 성능분석, CPU부분 file 김병수 2019.10.03 7
» [OS / HP-UX] hp-ux system and network administration i h3064a 김병수 2019.10.03 6
24 [OS / HP-UX] Core Dump File 생성 file 김병수 2019.10.03 6
위로