- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Wants to replace a hard drive which is a part ...
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
Discussions
Discussions
Forums
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
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
тАО10-26-2004 10:41 AM
тАО10-26-2004 10:41 AM
Wants to replace a hard drive which is a part of a vg vg01
I have 2 disks on vg vg01. Wants to replace one of the drives. The second disk has around 12 lvols..not mirrored.
As far as i know.
I need to first do vgcfgbackup the vg01
Then vgreduce the failed harddrive.
Replace the harddrive.
Do vgcfgrestore to the new drive and create the new logical volumes.
Am i correct ?
Thanks,
AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 10:46 AM
тАО10-26-2004 10:46 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
The steps I would do:
1) Replace bad drive with good drive
2) vgcfgrestore -n vg01 /dev/dsk/c?t?d?
(I think that syntax is correct, double check with the man page to verify)
3) vgchange -a y vg01
4) Check the drive to see if the vgcfgrestore re-created any LV's that were there already. If there weren't any, then create them and mount them.
5) Restore data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 10:53 AM
тАО10-26-2004 10:53 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
You might want to use -p instead of -s because that will not actually inactivate the volume group.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 10:56 AM
тАО10-26-2004 10:56 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
if you do a vgcfgbackup and then vgreduce, it effectively overrides the conf file in /etc/lvmconf, though it keeps a copy of the old configuration.
1) Shutdown and replace the drive
2) Boot the system
3) VG may not get activated if the quorum is not present
4) vgcfgrestore -n /dev/vg01 /dev/rdsk/cXtYdZ
5) vgchange -a y /dev/vg01
6) Create the filesystems on the new disk
newfs -F vxfs -o largefiles /dev/vg01/lvolXX
7) mount the lv
8) restore from the backup
- Sundar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 10:57 AM
тАО10-26-2004 10:57 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
1) umount all the logical volumes of the old PV (if you still can)
2) Pull off the bad disk
3) Insert the new disk
4) do ioscan and insf -e
5) vgcfgrestore
6) Create filesystems
7) mount and restore from the backup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 03:05 PM
тАО10-26-2004 03:05 PM
Re: Wants to replace a hard drive which is a part of a vg vg01
You say there are 2 disks in vg01 - not mirrored - and 1 has failed?
Does the one that failed have data still on it?
If so, then you will be restoring your data....
You have 2 choices - vgcfgrestore should work....
Else just re-create the volume group from scratch...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2004 01:25 AM
тАО10-28-2004 01:25 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
However, assuming you simply want to replace the disk, here's a easy method.
1) Physically add the new disk to the system
2) Check that it's there: ioscan -fnC disk
3) Create the devices files (if required): insf -e
4) Initialize the disk for VG ops: pvcreate /dev/dsk/cXtYdZ
5) Add the disk to vg01: vgextend vg01 /dev/dsk/cXtYdZ
6) Move the data from the disk you want to remove to the new disk: pvmove /dev/dsk/cAtBdC /dev/dsk/cXtYdZ
7) Remove the disk you no longer want from vg01: vgreduce vg01 /dev/dsk/cAtBdC
8) Physically remove the disk you no longer want from the system
Of course, the above assumes that you can hot connect/disconnect your disks, and that you have OnlineJFS (I think pvmove is part of the optional OnlineJFS package -- if you don't have it, you don't know what you're missing!).
Good Luck!
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2004 01:49 AM
тАО10-28-2004 01:49 AM
Re: Wants to replace a hard drive which is a part of a vg vg01
do a vgreduce using -A n option
Hope you have already though of backing up VG.
for lv in lv1 lv2 lv3 .......
do lvremove -A n $lv
vgreduce -A n vg_name pv_path
vgchange -a n vg_name
Take the system down here. Replace the disk.
Take the system up. VG wont activate it doesnt have quorum
vgcfgrestore -n /dev/vg01 raw_dev_path
and carry on the steps ahead.
Thanks
Prashant