- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to remove disk from volume group without loosi...
Operating System - HP-UX
1823084
Members
3500
Online
109646
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 03:44 AM
тАО02-17-2011 03:44 AM
I need to replace our current 72GB hard disk with a new 320GB disk and would like to know what steps to take to ensure data is not lost. I am unable to shut the server down. We are running online JFS on OS HP-UX 11.11.
The only data is Ignite images on its own volume group (VG01) and on its own physical disk.
The only data is Ignite images on its own volume group (VG01) and on its own physical disk.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 04:33 AM
тАО02-17-2011 04:33 AM
Re: How to remove disk from volume group without loosing data
Please check that the disk is hot swappable or not
#Use pvchange ├в a N /dev/dsk/cxtxdx before removing the disk is if doesn`t work use pvchange ├в a n /dev/dsk/cxtxdx , this will disable the pv paths /path.
#ioscan ├в fnC disk
To make sure new disk is visible & CLAIMED
#Add the new disk and use command - pvcreate /dev/rdsk/cxtxdx on the new disk
#vgcfgrestore ├в n vg00 /dev/rdsk/cxtxdx
# Now restore the lvols /data using mirrors
lv is they exists or any backup utility
you have. ?
Thanks
Manix
#Use pvchange ├в a N /dev/dsk/cxtxdx before removing the disk is if doesn`t work use pvchange ├в a n /dev/dsk/cxtxdx , this will disable the pv paths /path.
#ioscan ├в fnC disk
To make sure new disk is visible & CLAIMED
#Add the new disk and use command - pvcreate /dev/rdsk/cxtxdx on the new disk
#vgcfgrestore ├в n vg00 /dev/rdsk/cxtxdx
# Now restore the lvols /data using mirrors
lv is they exists or any backup utility
you have. ?
Thanks
Manix
HP-UX been always lovable - Mani Kalra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 05:20 AM
тАО02-17-2011 05:20 AM
Solution
In other words, you must copy or move the data out of the current disk before removing the current disk.
The important question is, what are the current parameters for your vg01? Run "vgdisplay vg01" to check.
- Does the "Max PV" parameter allow adding a second PV to this VG?
If not, you cannot add new disks to this VG and you must instead create a new VG and copy the data to it. This time, choose the parameters for the new VG so that you have some room for growth, e.g. "vgcreate -s 128 -e 16384 ..." allows adding PVs of up to 2 TB size, which is the maximum allowed by LVM in HP-UX 11.11 and 11.23. (Note: verify you have PHKL_30622 or superseding patch installed, otherwise max PV size will be limited to 256 GB)
- Multiply the value of "Max PE per PV" parameter by the PE size. Is the value equal or greater than the size of your new disk?
If the value is smaller than your new disk, you can go ahead but only part of the capacity of your new disk can be used. It might be better to create a new VG and copy the data in this case.
If you need to create a new VG, you'll have to unmount the old filesystem temporarily, but you don't have to shutdown the server.
If you can add the disk to your existing VG, you can move the data to the new disk without even unmounting the filesystem.
If you have MirrorDisk, you can do this by adding the new disk to the VG, mirroring the data to the new disk, and then removing the old half of the mirror.
Procedure:
ioscan -fnCdisk
insf
pvcreate /dev/rdsk/
vgextend vg01 /dev/dsk/
lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/
lvreduce -m 0 /dev/vg01/lvol1 /dev/dsk/
vgreduce vg01 /dev/dsk/
rmsf -a /dev/dsk/
rmsf -a /dev/rdsk/
If you don't have MirrorDisk, you can use pvmove instead of the lvextend/lvreduce steps. Otherwise the procedure is the same as above.
If you need to create a new VG, the procedure is as follows:
Part 1: creating the new VG:
ioscan -fnCdisk
insf
pvcreate /dev/rdsk/
mkdir /dev/vgignite
ll /dev/vg*/group
mknod /dev/vgignite/group c 64 0xNN0000
(choose a value for NN that is not yet used by other VGs)
vgcreate -s 128 -e 16384 -p 40 vgignite /dev/dsk/
vgchange -a y vgignite
lvcreate -L vgignite
mkfs -F vxfs -o largefiles /dev/vgignite/rlvol1
Part 2: migrating the data:
mkdir /temporary_mountpoint
mount /dev/vgignite/lvol1 /temporary_mountpoint
cd
tar cf - . | ( cd /temporary_mountpoint; tar xf -)
umount /dev/vgignite/lvol1
rmdir /temporary_mountpoint
umount
mount
Part 3: removing the old VG
vgchange -a n vg01
vgexport -v -s -m vg01.map vg01
rmsf -a /dev/dsk/
rmsf -a /dev/rdsk/
MK
The important question is, what are the current parameters for your vg01? Run "vgdisplay vg01" to check.
- Does the "Max PV" parameter allow adding a second PV to this VG?
If not, you cannot add new disks to this VG and you must instead create a new VG and copy the data to it. This time, choose the parameters for the new VG so that you have some room for growth, e.g. "vgcreate -s 128 -e 16384 ..." allows adding PVs of up to 2 TB size, which is the maximum allowed by LVM in HP-UX 11.11 and 11.23. (Note: verify you have PHKL_30622 or superseding patch installed, otherwise max PV size will be limited to 256 GB)
- Multiply the value of "Max PE per PV" parameter by the PE size. Is the value equal or greater than the size of your new disk?
If the value is smaller than your new disk, you can go ahead but only part of the capacity of your new disk can be used. It might be better to create a new VG and copy the data in this case.
If you need to create a new VG, you'll have to unmount the old filesystem temporarily, but you don't have to shutdown the server.
If you can add the disk to your existing VG, you can move the data to the new disk without even unmounting the filesystem.
If you have MirrorDisk, you can do this by adding the new disk to the VG, mirroring the data to the new disk, and then removing the old half of the mirror.
Procedure:
ioscan -fnCdisk
insf
pvcreate /dev/rdsk/
vgextend vg01 /dev/dsk/
lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/
lvreduce -m 0 /dev/vg01/lvol1 /dev/dsk/
vgreduce vg01 /dev/dsk/
rmsf -a /dev/dsk/
rmsf -a /dev/rdsk/
If you don't have MirrorDisk, you can use pvmove instead of the lvextend/lvreduce steps. Otherwise the procedure is the same as above.
If you need to create a new VG, the procedure is as follows:
Part 1: creating the new VG:
ioscan -fnCdisk
insf
pvcreate /dev/rdsk/
mkdir /dev/vgignite
ll /dev/vg*/group
mknod /dev/vgignite/group c 64 0xNN0000
(choose a value for NN that is not yet used by other VGs)
vgcreate -s 128 -e 16384 -p 40 vgignite /dev/dsk/
vgchange -a y vgignite
lvcreate -L
mkfs -F vxfs -o largefiles /dev/vgignite/rlvol1
Part 2: migrating the data:
mkdir /temporary_mountpoint
mount /dev/vgignite/lvol1 /temporary_mountpoint
cd
tar cf - . | ( cd /temporary_mountpoint; tar xf -)
umount /dev/vgignite/lvol1
rmdir /temporary_mountpoint
umount
mount
Part 3: removing the old VG
vgchange -a n vg01
vgexport -v -s -m vg01.map vg01
rmsf -a /dev/dsk/
rmsf -a /dev/rdsk/
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 06:33 AM
тАО02-17-2011 06:33 AM
Re: How to remove disk from volume group without loosing data
Thanks for the advice. I initially had problems removing the old volume group in SAM but following the advice given,I issued the command vgexport -v to remove the volume group and created a new one within SAM. I will now restore the data from tape to the new disk.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP