1751857 Members
5765 Online
108782 Solutions
New Discussion юеВ

Re: Resync stale blocks

 
yaplej
Advisor

Resync stale blocks

I have a volume group/logical volume a drive that has a lot of stale blocks. I want to remove the drive, wipe it, rejoin it to the logical volume and resync it.

The disk with the stale blocks is c8t6d0.

So would this be the correct method?
pvchange -a n /dev/dsk/c8t6d0
dd if=/dev/null of=/dev/rdsk/c8t6d0
pvcreate /dev/rdsk/c8t6d0
vgcfgrestore -n myvg /dev/rdsk/c8t6d0
vgchange -a y mhvg

Check the sync status.
pvdisplay -v /dev/dsk/c6t6d0 | more

I have never wiped a drive before. Normally the drives are totally bad and we just pull/replace them.

9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: Resync stale blocks

Hi:

This isn't going to accomplish your objective. If the drive is bad, *replace* it:

http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf

And that, said, by the way:

# dd if=/dev/null of=/dev/rdsk/c8t6d0

...isn't going to write anything. You would to use something like '/dev/zero'.

If you think that your stale extents are transient, due perhaps to a loss of path, then re-sync the logical volume with:

# lvsync /dev/vgXX/lvolY

or:

# vgsync /dev/vgXX

Regards!

...JRF...


yaplej
Advisor

Re: Resync stale blocks

Thanks for the help.

Problem is that the drive seems to be working other than the stale extents. I just wanted to make sure the device is not having any other problems.

I did run into problems using dd if=/dev/null so thanks for pointing out the correct way to wipe the drive.

If its able to write all zeros to the drive I will call it good and added the drive back into the vg sync it and check on it again.

James R. Ferguson
Acclaimed Contributor

Re: Resync stale blocks

Hi:

> If its able to write all zeros to the drive I will call it good and added the drive back into the vg sync it and check on it again.

I would have re-synced the mirror ('lvsync' or 'vgsync' as noted). and then I might have *read* the drive :

# dd if=/dev/rdsk/c8t6d0 of=/dev/null bs=1024k

Note the raw device to bypass the buffer cache and the large block size so it gets done as fast as possible.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Resync stale blocks

The problem is, or could be, that once you see some stale extents on a disk it usually indicates the beginning of the end.

While it may be OK now, and you may be able to resync all extents now, eventually the disk will fail.

I have found it to be more expedient to just go ahead and replace a disk when it starts showing stale extents.
Bill Hassell
Honored Contributor

Re: Resync stale blocks

The dd command is redundant. When you run lvsync or vgsync, all the stale extents will be written. If there is a problem, you'll a swarm of error messages on the console, in syslog and EMS email messages -- which means its time to replace the drive. dd won't "clean up the sectors". As Patrick points out, disk drives never get better. It's the law of entropy that everything is falling apart (and what keeps us support folk employed). I would order the replacement now. You'll need it soon.


Bill Hassell, sysadmin
yaplej
Advisor

Re: Resync stale blocks

Thanks for all the assistance. I plan on ordering a new drive for it now it├в s actually a backup system so not critical until our primary host fails.

I don├в t expect it to fix the drive but it├в s been a good learning exercise.
Dennis Handly
Acclaimed Contributor

Re: Resync stale blocks

>Bill: It's the law of entropy that everything is falling apart

And if you analyze the units of entropy, it is exactly the same as information and we all know you need more and more disk space. :-)
yaplej
Advisor

Re: Resync stale blocks

Things are not looking good for this drive.

dd if=/dev/zero of=/dev/rdsk/c8t6d0 bs=1024k
I/O error
34733+0 records in
34732+1 records out

Patrick Wallek
Honored Contributor

Re: Resync stale blocks

No, they are not.