컴퓨터상식탐구2013. 8. 19. 08:00

11. Root Disk를 Mirroring하는 방법

 root disk /dev/vg00의 phygical volume이  /dev/dsk/c0t6d0이고

또다른 disk /dev/dsk/c1t6dd0를 추가하여 root disk mirroring를 하려면...

** 작업전에 먼저 HP MirrorDisk/UX Application를 Install한다.

 

# ioscan -fnkcdisk 로 /dev/dsk/c1t6d0 의 HW path확인

# vi root_mirror.sh

   Pvcreate -B -f /dev/rdsk/c1t6d0

   vgextend /dev/vg00  /dev/dsk/c1t6d0

   mkboot /dev/dsk/c1t6d0

   mkboot -a "hpux -lq(10/1.6.0.;0)  /stand/vmunix" /dev/dsk/c1t6d0

   mkboot -a "hpux -lq(10/0.6.0.;0)  /stand/vmunix" /dev/dsk/c0t6d0

   setboot -a 10/1.6.0

   lvextend -m 1 /dev/vg00/lvol1  /dev/dsk/c1td60

   lvextend -m 1 /dev/vg00/lvol2  /dev/dsk/c1td60

   lvextend -m 1 /dev/vg00/lv0l3  /dev/dsk/c1td60

   lvinboot -R

:wq!

#sh root_mirror.sh

# lvinboot -v 로 확인

# strings  /etc/lvmtab 으로 확인

# lvdisplay -v  /dev/vg00/lvol3 로 확인

# setboot 로 alternate boot path 확인

 

12. Non Root Disk(Data Disk)를 Mirrroring 하는 방법

** 작업전데 먼저HP MirrorDisk/UX Application를 Install한다.

# vi non_root_nirror.sh

   pvcreate -f /dev/rdsk/c1t3d0

   pvcreate -f /dev/rdsk/c1t4d0

   pvcreate -f /dev/rdsk/c1t4d0

   vgextend  /dev/vg01  /dev/dsk/c1t3d0

   vgextend  /dev/vg02  /dev/dsk/c1t4d0

   vgextend  /dev/vg03  /dev/dsk/c1t5d0

   lvextend -m 1  /dev/vg01/lvol1  /dev/dsk/c1t3d0

   lvextend -m 1  /dev/vg01/lvol2  /dev/dsk/c1t3d0

   lvextend -m 1  /dev/vg01/lvol3  /dev/dsk/c1t3d0

   lvextend -m 1  /dev/vg01/lvol1  /dev/dsk/c1t4d0

   lvextend -m 1  /dev/vg01/lvol2  /dev/dsk/c1t4d0

   lvextend -m 1  /dev/vg01/lvol1  /dev/dsk/c1t5d0

   lvextend -m 1  /dev/vg01/lvol2  /dev/dsk/c1t5d0

:wq!

# sh non_root_mirror.sh

# vgdisplay  /dev/vg01 로 확인

# stings /etc/lvmtab 으로 확인

 

13. Mirror된 Lvol 을 Split하는 방법

   # lvdiskplay  -v  /dev/vg01/lvol1

   # lvsplit -s backup /dev/vg01/lvol1   : -s option을 안주면 lvol1b로 생성됨.

   # fsck -F vxfs /dev/vg01/lvol1backup

   # mkdir /backup

   # mount /dev/vg01/lvol1backup  /backup  : 명령으로 Mirrror된 lvol을 backup할수 있습니다.

14. Split 된 Lvol을 하나로 merge하는 방법

   # umount /backup

   # lvmerge  /dev/vg01/lvol1backup /dev/vg01/lvol1  ( # 순서에 주의 할것)

또는

   # lvmerge  /dev/vg01/lv0l1b /dev/vg01/lvol1  : -s option이 빠졌을 경우.

 

15. A 시스템 DISK를 Export하여 B 시스템에 Import하는 방법

  ** A 시스템에 /dev/vg01에 있는 /dev/dsk/c0t1d0 를 떼어낸다면....

   # umount  /dev/vg01/lvol1

   #vgchange -a n  /dev/vg01

   # vgexport -v -m  /tmp/vg.map  /dev/vg01

   # B 시스템으로 /tmp/vg.map를 ftp한다.

  ** B 시스템에서 이 디스크를 붙여서 #iocan -fnkcdisk한 결과 /dev/dsk/c1t1d1으로 나타나고 ,

  이 디스크를  /dev/vg02로 만든다면 B 시스템에서 다음과 같이 작업한다.

 

   # iocan -fnkcdisk

   # mkdir  /dev/vg02

   # vgimport -m  /tmp/vg.map  /dev/vg02  /dev/dsk/c1t1d1

   # vgdisplay -v  /dev/vg02

   # vgcfgbackup  /dev/vg02

   # vi  /etc/fstab

   # muntall

다음에 계속 됩니다.....................  ^!^
Posted by 알 수 없는 사용자
컴퓨터상식탐구2013. 7. 29. 18:59

** HP-UX 의 LVM 그 두번째 시간. 정보수집 방법 입니다.

2. LVM 구성을 위한 사전 정보수집 방법

               #ioscan –fnkCdisk

         

Class     I  H/W Path  Driver      S/W State H/W Type  Description

===================================================================

disk      0  4.5.0     sdisk       CLAIMED   DEVICE    SEAGATE ST32550W

                         /dev/dsk/c0t5d0   /dev/rdsk/c0t5d0

disk      1  4.8.0     sdisk       CLAIMED   DEVICE    SEAGATE ST32550W

                         /dev/dsk/c0t8d0   /dev/rdsk/c0t8d0

disk      2  16/5.2.0  sdisk       CLAIMED   DEVICE    TOSHIBA CD-ROM XM-5301TA

                         /dev/cdrom        /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk      3  16/5.4.0  sdisk       CLAIMED   DEVICE    SEAGATE ST32550N

                         /dev/dsk/c1t4d0   /dev/rdsk/c1t4d0

               

# diskinfo /dev/rdsk/c0t5d0

 

SCSI describe of /dev/rdsk/c0t5d0:

             vendor: SEAGATE

         product id: ST32550W

               type: direct access

               size: 2082636 Kbytes

                   bytes per sector: 512

                # lssf /dev/dsk/c0t5d0

                  sdisk card instance 0 SCSI target 5 SCSI LUN 0 section 0 at address 4.5.0 /dev/dsk/c0t5d0

 

                # strings /etc/lvmtab

 

          /dev/vg00

          /dev/dsk/c0t5d0

          /dev/vg01

          /dev/dsk/c0t8d0

          /dev/vg02

                          /dev/dsk/c1t4d0

               

                # lvlnboot –v

 

          Boot Definitions for Volume Group /dev/vg00:

          Physical Volumes belonging in Root Volume Group:

          /dev/dsk/c0t5d0 (4.5.0) -- Boot Disk

          Boot: lvol1     on:     /dev/dsk/c0t5d0

          Root: lvol3     on:     /dev/dsk/c0t5d0

          Swap: lvol2     on:     /dev/dsk/c0t5d0

                          Dump: lvol2     on:     /dev/dsk/c0t5d0, 0

               

# vgdisplay –v /dev/vg00

 

--- Volume groups ---

VG Name                     /dev/vg00

VG Write Access             read/write

VG Status                   available

Max LV                      255

Cur LV                      3

Open LV                     3

Max PV                      16

Cur PV                      1

Act PV                      1

Max PE per PV             2000

VGDA                        2

PE Size (Mbytes)          4

Total PE                   507

Alloc PE                   507

Free PE                    0

Total PVG                  0

 

   --- Logical volumes ---

   LV Name                     /dev/vg00/lvol3

   LV Status                   available/syncd

   LV Size (Mbytes)           1880

   Current LE                  470

                   Allocated PE                470

   Used PV                     1

 

   LV Name                     /dev/vg00/lvol2

   LV Status                   available/syncd

   LV Size (Mbytes)           100

   Current LE                  25

   Allocated PE                25

   Used PV                     1

 

   LV Name                     /dev/vg00/lvol1

   LV Status                   available/syncd

   LV Size (Mbytes)           48

   Current LE                  12

   Allocated PE                12

   Used PV                     1

 

 

   --- Physical volumes ---

   PV Name                     /dev/dsk/c0t5d0

   PV Status                   available

   Total PE                    507

                   Free PE                     0

            

# lvdisplay –v /dev/vg00/lvol1

 

--- Logical volumes ---

LV Name                     /dev/vg00/lvol1

VG Name                     /dev/vg00

LV Permission               read/write

LV Status                   available/syncd

Mirror copies               0

Consistency Recovery       MWC

Schedule                     parallel

LV Size (Mbytes)           48

Current LE                  12

Allocated PE                12

Stripes                      0

Stripe Size (Kbytes)      0

Bad block                   off

Allocation                  strict/contiguous

 

   --- Distribution of logical volume ---

   PV Name            LE on PV  PE on PV

   /dev/dsk/c0t5d0    12        12

 

   --- Logical extents ---

   LE   PV1                PE1  Status 1

   0000 /dev/dsk/c0t5d0    0000 current

   0001 /dev/dsk/c0t5d0    0001 current

   0002 /dev/dsk/c0t5d0    0002 current

   0003 /dev/dsk/c0t5d0    0003 current

   0004 /dev/dsk/c0t5d0    0004 current

   0005 /dev/dsk/c0t5d0    0005 current

   0006 /dev/dsk/c0t5d0    0006 current

 

             

# pvdisplay –v /dev/dsk/c0t5d0

 

--- Physical volumes ---

PV Name                     /dev/dsk/c0t5d0

VG Name                     /dev/vg00

PV Status                   available

Allocatable                 yes

VGDA                        2

Cur LV                      3

PE Size (Mbytes)            4

Total PE                    507

Free PE                     0

Allocated PE                507

Stale PE                    0

IO Timeout (Seconds)        default

 

   --- Distribution of physical volume ---

   LV Name            LE of LV  PE for LV

   /dev/vg00/lvol3    470       470

   /dev/vg00/lvol2    25        25

   /dev/vg00/lvol1    12        12

 

   --- Physical extents ---

   PE   Status   LV                 LE

   0000 current  /dev/vg00/lvol1    0000

   0001 current  /dev/vg00/lvol1    0001

   0002 current  /dev/vg00/lvol1    0002

   0003 current  /dev/vg00/lvol1    0003

   0004 current  /dev/vg00/lvol1    0004

   0005 current  /dev/vg00/lvol1    0005

   0006 current  /dev/vg00/lvol1    0006

 

 

** 2차 마무리 하고 3차를 기대.....

많이 늦어서 죄송합니다.  3차는 빠른 시일에 올리겠습니다. ^!^

Posted by 알 수 없는 사용자