- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Replace disk
Categories
Company
Local Language
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
Discussions
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
Community
Resources
Forums
Blogs
- 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
07-10-2002 11:24 AM
07-10-2002 11:24 AM
Replace disk
I need to replace a 4 GB disk to a larger capacity disk .
Two lvols are sitting on this disk and these lvols are mirrored and these are NOT vg00.
What would be best method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:34 AM
07-10-2002 11:34 AM
Re: Replace disk
There are couple of ways you can do it safely. But the issue is do you already have another larger capacity disk in this volume group?. Did you create the volume group with non-default MAX PE parameter?. If not, then you cannot add this disk to the volume group hence and answer varies.
Do a vgdisplay on the volume group and note the Max PE and the PE Size.
Max. Usable Disk = Max PE * PE Size
If the capacity of the new disk is less than the above Max. Usable Disk then you can do .
1. pvmove each logical volume after adding the disk into the volume group. or
2. Mirror each logical volume and then reduce the mirror on the original disk.
If not, then you will need to create a new volume group with the new disk and then copy the data. Once all the file systems are copied, destroy the old volume group and add the old disks to the new volume group and re-establish the mirrors.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:35 AM
07-10-2002 11:35 AM
Re: Replace disk
Assume your existing VG has a large-enough "max PE" to take full advantage of the new disk. The following are the steps that you can take:
1. Backup the server (or at least the LVs that sitting on the replaced disk).
2. Replace the disk.
3. Run "vgcfgrestore -n
4. Run "vgsync
Hope it helps.
Enbin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:36 AM
07-10-2002 11:36 AM
Re: Replace disk
I therefore think your most straightforward approach is to backup the existing filesystems using fbackup, cpio, tar, or OB. Create a new VG using the largest disk as the first member. Make new lvols and filesystems and restore from backup. You can then add your existing disks to this VG using vgextend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:36 AM
07-10-2002 11:36 AM
Re: Replace disk
From your description, I assume that the volume group is a single physical volume (or if it is more than one) which was 'vgcreate'd with default settings for 'max_pe'. In this case, you will only have about 1023+ physical extents (of 4MG each). To simply "replace" the 4GB disk with a 9GB (or larger) one; 'vgcfgrestore' the LVM information; and reload the data from backup tape would leave unavailable physical extents on the new disk!
Thus, I suggest backing up your data (to tape or another disk/filesystem); swapping the smaller disk(s) for larger ones; 'vgcreate'ing the volume group freshly (with or without explicit 'max_pe' specifications); recreating your logical volumes; and reloading your data.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:46 AM
07-10-2002 11:46 AM
Re: Replace disk
Well, This vg was created with default option.
vgdisplay shows max PE per PV is 1023 and PE size is 4 MB. This means I'll get only 1023 PE when I add 9gig disk??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 11:53 AM
07-10-2002 11:53 AM
Re: Replace disk
Yes, that's true. In effect you lose about half of the capacity of a 9GB disk if you add it to a volume group that has a maximum PE extent size of 1023. This is the reason for the recommendation to *recreate* the volume group from scratch and migrate your data back to it via any one of several means.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:06 PM
07-10-2002 12:06 PM
Re: Replace disk
-Split the Mirror.
-Remove mirrored disk and Replace the new bigger disk
-Create new VG and LV and mount this with a dummy name
-Copy data from primary disk.
-replace then primary disk with new bigger disk
- mirror it back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:07 PM
07-10-2002 12:07 PM
Re: Replace disk
JRF gave a good suggestion. Actually, you don't have destroy the existing VG first, what you can do is like this:
1. vgcreate a new VG with the new 9GB disk.
2. lvcreate 2 LVs.
3. newfs create file systems
4. mkdir 2 temp mount points, e.g. mpt1, mpt2
5. mount the 2 new file systems.
6. make sure the server is "quiet",e.g. DB is down.
7. use "cpio" to copy the data from existing file systems to the new ones (mpt1, mpt2).
8. swap the two sets of mount points.
9. take the "old" vg offline.
Good Luck.
Enbin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:10 PM
07-10-2002 12:10 PM
Re: Replace disk
-Create a new volume group with 9 GB disk
-Create file systems and mount them on some temporary points.
-Copy the data from the existing file systems to the temporary mount points.
-Unmount the existing mount points.
-mount the new file systems on the original mount points
-test the data
If everything is working, then destroy the old volume group and extend the new volume group with the new 4 GB disks.
Extend the mirrors selectively by specifying the individual 4 GB disks.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:12 PM
07-10-2002 12:12 PM
Re: Replace disk
The 'cpio' method as Enbin suggested is a viable one and is far superior to tape copies if you don't have to worry about special files like device files and sockets.
The problem with a MirrorDisk solution is that you are not 'vgcreate'ing a new volume group and therefore have no way of altering the 'max_pe' set during the original volume group creation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:35 PM
07-10-2002 12:35 PM
Re: Replace disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 12:39 PM
07-10-2002 12:39 PM
Re: Replace disk
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 01:15 PM
07-10-2002 01:15 PM
Re: Replace disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 01:19 PM
07-10-2002 01:19 PM
Re: Replace disk
Yes you do not make the vg01 offline. Create the new vg, make the lvol/filesystems and copy the data by cpio.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 02:14 PM
07-10-2002 02:14 PM
Re: Replace disk
pvcreate on the /dev/rdsk/cxtxd0 where the x reflect your physical disk. If the disk was not totally new (although it might be new to this system), you will need to do
pvcreate -f /dev/rdsk/cxtxd0
then
mkdir /dev/vg0x
mknod /dev/vg0x/group c 0x0Y0000
where Y is the largest group number in all your /dev/vg0? directory.
vgcreate /dev/vg0x /dev/dsk/cxtxd0
then create two logic volumes. You could do all these in "sam" easily by going to disk and file system section and select the drive and go to action to add VG and define LV, then "go".
Once you created the file systems, verify them by "bdf" command. If they are all okay, go to each file system you want to move over, do "pwd" make sure you are there, then
find . -xdev -depth -print | cpio -pxdm > /new_file_system
do the similar to the other file system. Now you have copy of the file systems ready to remount.
umount /new_file_system1
umount /new_file_system2
umount /old_file_system1
umount /old_file_system2
for both. if umount can not mount, make sure you are not
in that directory and no other processes running over those directories. fuser -cu /old_file_system will show you the processes need to be killed, if you still can not umount them.
Make a copy of your /etc/fstab to /etc/fstab.last
vi /etc/fstab
to make the new_file_system mounted on the old mount point. if you want to have the old file system also accessible, make that to the new_file_system mount point.
mountall
will bring all those file systems on line and you are ready to go.