HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
Upcoming SlideShare
Loading in...5
×
 

HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic

on

  • 94 views

HP-UX-11iv3-how-to-change-root-volume-group-name-vg00

HP-UX-11iv3-how-to-change-root-volume-group-name-vg00

Statistics

Views

Total Views
94
Views on SlideShare
94
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic Document Transcript

  • HP-UX 11.31 How to change root volume group name vg00 By Dusan Baljevic (dusan.baljevic@ieee.org) a) Boot the server into LVM maintenance mode: > boot vmunix -lm b) Export root volume group: # vgexport -s -m /vg00.map /dev/vg00 vgexport: Volume group "/dev/vg00" has been successfully removed. c) Create new directory and group file for the root volume group. Let's name it vgroot... # mknod /dev/vgroot # mknod /dev/vgroot/group c 64 0x010000 d) Import the map file from original vg00: # vgimport -N -s -m /vg00.map vgroot vgimport: Volume group "/dev/vgroot" 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. Also, upon first activation of an imported bootable volume group, make sure to run lvlnboot(1M) command in recovery mode (-R option) to rsync the information on the disk. e) Activate the new root volume group: # vgchange -a y vgroot Activated volume group. Volume group "vgroot" has been successfully changed. f) Check the status and make changes in LVM accordingly: # lvlnboot -v Boot Definitions for Volume Group /dev/vgroot: Physical Volumes belonging in Root Volume Group: /dev/disk/disk11_p2 -- Boot Disk Boot: lvol1 on: /dev/disk/disk11_p2 Root: ??? on: /dev/disk/disk11_p2 Swap: ??? on: /dev/disk/disk11_p2 Dump: ??? on: /dev/disk/disk11_p2, 0
  • # lvrmboot -r vgroot Volume Group configuration for /dev/vgroot has been saved in /etc/lvmconf/vgroot.conf # lvlnboot -b /dev/vgroot/lvol1 Volume Group configuration for /dev/vgroot has been saved in /etc/lvmconf/vgroot.conf # lvlnboot -r /dev/vgroot/lvol3 Volume Group configuration for /dev/vgroot has been saved in /etc/lvmconf/vgroot.conf # lvlnboot -s /dev/vgroot/lvol2 Volume Group configuration for /dev/vgroot has been saved in /etc/lvmconf/vgroot.conf If dump was part of primary swap (not in my case), one would need to run this as well: # lvlnboot -d /dev/vgroot/lvol2 # lvlnboot -R /dev/vgroot Volume Group configuration for /dev/vgroot has been saved in /etc/lvmconf/vgroot.conf # lvlnboot -v Boot Definitions for Volume Group /dev/vgroot: Physical Volumes belonging in Root Volume Group: /dev/disk/disk11_p2 -- Boot Disk Boot: lvol1 on: /dev/disk/disk11_p2 Root: lvol3 on: /dev/disk/disk11_p2 Swap: lvol2 on: /dev/disk/disk11_p2 No Dump Logical Volume configured # lvmadm -l --- Version 1.0 volume groups --VG Name /dev/vgroot PV Name /dev/disk/disk11_p2 g) We need to ensure that file system file uses new volume group name. To get access to commands like vi(1M) or sed(1M): # mount /dev/vgroot/lvol7 /usr Just for fun, I did not use vi(1M) but sed(1M): # sed -e 's/vg00/vgroot/g' /etc/fstab >/etc/fstab.new
  • # diff /etc/fstab /etc/fstab.new 3,10c3,10 < /dev/vg00/lvol3 / vxfs delaylog 0 1 < /dev/vg00/lvol1 /stand vxfs tranflush 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 < /dev/vg00/lvol7 /usr vxfs delaylog 0 2 < /dev/vg00/lvol8 /var vxfs delaylog 0 2 < /dev/vg00/lvol9 /var/tmp vxfs delaylog 0 2 --> /dev/vgroot/lvol3 / vxfs delaylog 0 1 > /dev/vgroot/lvol1 /stand vxfs tranflush 0 1 > /dev/vgroot/lvol4 /home vxfs delaylog 0 2 > /dev/vgroot/lvol5 /opt vxfs delaylog 0 2 > /dev/vgroot/lvol6 /tmp vxfs delaylog 0 2 > /dev/vgroot/lvol7 /usr vxfs delaylog 0 2 > /dev/vgroot/lvol8 /var vxfs delaylog 0 2 > /dev/vgroot/lvol9 /var/tmp vxfs delaylog 0 2 # cp -p /etc/fstab.new /etc/fstab # mount -a mount: /dev/vgroot/lvol7 is already mounted on /usr # bdf Filesystem /dev/vg00/lvol3 /dev/vgroot/lvol7 /dev/vgroot/lvol8 /dev/vgroot/lvol9 /dev/vgroot/lvol6 /dev/vgroot/lvol5 /dev/vgroot/lvol4 /dev/vgroot/lvol1 kbytes 2097152 12288000 14336000 2097152 1048576 15368192 524288 2097152 used avail %used Mounted on 432552 1651696 21% / 3446528 8772480 28% /usr 2396872 11845920 17% /var 20501 1949796 1% /var/tmp 20816 1019736 2% /tmp 7992488 7318224 52% /opt 20848 499512 4% /home 291696 1791408 14% /stand # setboot -v Primary bootpath : 1/0/1/1/0/1/1.0x6.0x0 (/dev/rdisk/disk11) HA Alternate bootpath : 1/0/1/1/0/1/1.0x6.0x0 (/dev/rdisk/disk11) Alternate bootpath : 0/0/0/3/0.0x5.0x0 (/dev/rdisk/disk7) Autoboot is ON (enabled) TEST CURRENT DEFAULT ---------------all partial partial SELFTESTS on on early_cpu on on late_cpu on on FASTBOOT on on Platform on on Full_memory on on Memory_init on on IO_HW off off Chipset on on
  • # swapinfo -tm Mb Mb TYPE AVAIL USED dev 8192 0 1 64,0x000002 reserve 2 memory 19349 1679 total 27541 1681 Mb FREE 8192 PCT USED 0% -2 17670 25860 9% 6% START/ Mb LIMIT RESERVE 0 - - 0 PRI NAME - h) Reboot and enjoy using the server with new root volume group name: # /usr/sam/lbin/vginfo -v vgroot:available,read/write@:255:16:9:1:0:16:4329:69104:12224:764:4319 :0:0:/dev/vgroot/lvol1@available/syncd@2048@128@1,/dev/vgroot/lvol2@av ailable/syncd@8192@512@1,/dev/vgroot/lvol3@available/syncd@2048@128@1, /dev/vgroot/lvol4@available/syncd@512@32@1,/dev/vgroot/lvol5@available /syncd@15008@938@1,/dev/vgroot/lvol6@available/syncd@1024@64@1,/dev/vg root/lvol7@available/syncd@12000@750@1,/dev/vgroot/lvol8@available/syn cd@14000@875@1,/dev/vgroot/lvol9@available/syncd@2048@128@1:/dev/disk/ disk11_p2@@available@4319@764::LVM