1819818 Members
3167 Online
109607 Solutions
New Discussion юеВ

Disk Failure

 
SOLVED
Go to solution

Disk Failure

I have a volume vg01 with 3 disk, like:
vg01
c1t1d0
c2t1d0
c3t1d0

The disk c1t1d0 failure, I want to know the correct procedure to change it.

Thanks
11 REPLIES 11
Bharat Katkar
Honored Contributor

Re: Disk Failure

Hi,
Do you have lv's c1t1d0 mirrored/stripped across other two disks??
If it's plain disk without any mirroring / stripping then ...
1. vgreduce c1t1d0
2. remove the failed disk and insert new
3. pvcreate c1t1d0
4. vgextend with c1t1d0
5. lvcreate/newfs on c1t1d0

That's all.
regards,

You need to know a lot to actually know how little you know

Re: Disk Failure

Do you have lv's c1t1d0 mirrored/stripped across other two disks??
No, I dont have mirror

But, I need to create lvol and file system again? I lost the file system?

5. lvcreate/newfs on c1t1d0
But
Steven E. Protter
Exalted Contributor

Re: Disk Failure

if part of the filesystem exists on another disk, you may be able to extendfs.

otherwise its rebuild newfs and restore the data from other sources.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Disk Failure

Steven,
Yes I have lvol1 in that vg01, with 3 disk and mounted in /carlos file system, my question is, if I can change the disk without losing the /carlos file system.

thanks
Patrick Wallek
Honored Contributor

Re: Disk Failure

If the disk wasn't mirrored and the LVOL1 existed only on disk c1t1d0 and disk c1t1d0 went bad, then yes you lost the filesystem AND the data.

I hope you had the data backed up somewhere.
Torsten.
Acclaimed Contributor

Re: Disk Failure

Hi Carlos,

replace the disk, restore LVM information and activate the VG.

vgcfgrestore -n vg01 /dev/rdsk/c1t1d0
vgchange -a y vg01

display the information about lvols on that disk

pvdisplay -v /dev/dsk/c1t1d0

(only the first screen is useful here)
look for "Distribution of physical volume" information.

create a new filesystem on that volume(s), mount and restore your backup.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   

Re: Disk Failure

Steve: I dont have a mirror and lvol1 is in the 3 disk:

--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t1d0 4340 4340
/dev/dsk/c2t1d0 4340 4340
/dev/dsk/c3t1d0 1320 1320

but,I have a backup
Raj D.
Honored Contributor

Re: Disk Failure

Hi Carlos ,

Can you provide the output of

Well , you can do the following:

1. # vgreduce /dev/vg01 /dev/dsk/c1t1d0
2. Connect the new disk , assuming its hot swap disk.
3. # vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t1d0
4. # vgchange -a y /dev/vg01
5. Restore the backup from tape.

Cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Torsten.
Acclaimed Contributor
Solution

Re: Disk Failure

@ Raj D.

If you do a vgreduce, you'll have to do a vgextend instead of vgcfgrestore, because the conf information is gone, right?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Raj D.
Honored Contributor

Re: Disk Failure

Torsten you are right, its my mistake ,

Carlos , You can do vgcfgrestore , without vgreduce , that will work.

hth ,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Devender Khatana
Honored Contributor

Re: Disk Failure

Hi,

As your file system is spread across this disk, replacing it will make file system unavailable. Allthough if your other two disks have enough free space in them then these extents will be moved to the other two disks while doing a vgreduce.

A complete output of "vgdisplay -v /dev/vg01" will tell all that. Can you attach the same?

Not having a free space in other two disks means you first have to attach a new disk in addition to failed disk and will have to do vgextend to new disk and then a vgreduce from the failed disk. In this all extents of the failed disks will be moved to new disk.

HTH,
Devender
Impossible itself mentions "I m possible"