HP迁移VG和文件系统

从存储划分磁盘,分别表达给A机和B机

A机

# ioscan -fnCdisk
Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
disk      0  1/0/0/3/0.6.0  sdisk    CLAIMED     DEVICE       HP 73.4GST373453LC
                           /dev/dsk/c0t6d0   /dev/rdsk/c0t6d0
......
disk     11  255/255/0/0.6  sdisk    CLAIMED     DEVICE       HSV100 HP
                           /dev/dsk/c13t0d6   /dev/rdsk/c13t0d6
disk     12  255/255/0/0.7  sdisk    CLAIMED     DEVICE       HSV100 HP

# insf -H 255/255/0/0.7
insf: Installing special files for sdisk instance 12 address 255/255/0/0.7

# ioscan -fnH255/255/0/0.7
Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
disk     12  255/255/0/0.7  sdisk    CLAIMED     DEVICE       HSV100 HP
                           /dev/dsk/c13t0d7   /dev/rdsk/c13t0d7

# diskinfo /dev/rdsk/c13t0d7
SCSI describe of /dev/rdsk/c13t0d7:
             vendor: HP
         product id: HSV100
               type: direct access
               size: 629145600 Kbytes
   bytes per sector: 512

# pvcreate /dev/rdsk/c13t0d7
Physical volume "/dev/rdsk/c13t0d7" has been successfully created.

# mkdir /dev/BWPTMPVG
# mknod /dev/BWPTMPVG/group c 64 0x050000
# vgcreate -s 16 /dev/BWPTMPVG /dev/dsk/c13t0d7
Increased the number of physical extents per physical volume to 38399.
Volume group "/dev/BWPTMPVG" has been successfully created.
Volume Group configuration for /dev/BWPTMPVG has been saved in /etc/lvmconf/BWPTMPVG.conf

# vgdisplay -v BWPTMPVG
--- Volume groups ---
VG Name                     /dev/BWPTMPVG
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      0
Open LV                     0
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               38399
VGDA                        2
PE Size (Mbytes)            16
Total PE                    38394
Alloc PE                    0
Free PE                     38394
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

   --- Physical volumes ---
   PV Name                     /dev/dsk/c13t0d7
   PV Status                   available
   Total PE                    38394
   Free PE                     38394
   Autoswitch                  On

# lvcreate -L 600000 -n lv_saptmp BWPTMPVG
Logical volume "/dev/BWPTMPVG/lv_saptmp" has been successfully created with
character device "/dev/BWPTMPVG/rlv_saptmp".
Logical volume "/dev/BWPTMPVG/lv_saptmp" has been successfully extended.
Volume Group configuration for /dev/BWPTMPVG has been saved in /etc/lvmconf/BWPTMPVG.conf

# newfs -F vxfs -o largefiles /dev/BWPTMPVG/rlv_saptmp

# vgexport -s -p -m /tmp/vgtmpvg.map BWPTMPVG
vgexport: Volume group "BWPTMPVG" is still active.

# vgchange -a n BWPTMPVG

Then, copy the exported map file to the B host.

B机

# mkdir /dev/BWPTMPVG
# mknod /dev/BWPTMPVG/group c 64 0x060000

# ioscan -fnCdisk
Class     I  H/W Path        Driver   S/W State   H/W Type     Description
===========================================================================
disk      0  0/0/1/1.2.0     sdisk    CLAIMED     DEVICE       HP 73.4GMAS3735NC
                            /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0
......
disk      9  255/255/0/0.4   sdisk    CLAIMED     DEVICE       HSV100 HP

bfbwdev#[/dev/BWPTMPVG]insf -H 255/255/0/0.4
insf: Installing special files for sdisk instance 9 address 255/255/0/0.4

bfbwdev#[/dev/BWPTMPVG]ioscan -kfnCdisk
Class     I  H/W Path        Driver   S/W State   H/W Type     Description
===========================================================================
disk      0  0/0/1/1.2.0     sdisk    CLAIMED     DEVICE       HP 73.4GMAS3735NC
                            /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0
......
disk      9  255/255/0/0.4   sdisk    CLAIMED     DEVICE       HSV100 HP
                            /dev/dsk/c12t0d4   /dev/rdsk/c12t0d4

bfbwdev#[/]vgimport -v -m /tmp/*.map /dev/BWPTMPVG /dev/dsk/c12t0d4
Beginning the import process on Volume Group "/dev/BWPTMPVG".
vgimport: Warning:  Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
Logical volume "/dev/BWPTMPVG/lv_saptmp" has been successfully created
with lv number 1.
Volume group "/dev/BWPTMPVG" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.

bfbwdev#[/]vgchange -a y /dev/BWPTMPVG
Activated volume group
Volume group "/dev/BWPTMPVG" has been successfully changed.

bfbwdev#[/]vgdisplay -v BWPTMPVG
--- Volume groups ---
VG Name                     /dev/BWPTMPVG
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      1
Open LV                     1
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               38399
VGDA                        2
PE Size (Mbytes)            16
Total PE                    38394
Alloc PE                    37500
Free PE                     894
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

   --- Logical volumes ---
   LV Name                     /dev/BWPTMPVG/lv_saptmp
   LV Status                   available/syncd
   LV Size (Mbytes)            600000
   Current LE                  37500
   Allocated PE                37500
   Used PV                     1

   --- Physical volumes ---
   PV Name                     /dev/dsk/c12t0d4
   PV Status                   available
   Total PE                    38394
   Free PE                     894
   Autoswitch                  On

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值