Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] LVM on a drive with a bad sector?
@ 2004-05-24  8:55 Michael
  2004-05-24 18:31 ` Martijn Schoemaker
  0 siblings, 1 reply; 3+ messages in thread
From: Michael @ 2004-05-24  8:55 UTC (permalink / raw)
  To: LVM general discussion and development

I have a drive I was getting ready to change to LVM. When moving all the 
old files off I noticed it seems to have a bad sector on the drive.. not 
unlikely as I move a lot so the disks take a lot of physical abuse.. but 
only that one bad sector. Is there anything special I should do before 
using the drive with LVM to mark the sector as bad so that LVM just 
works around it? So far there is no evidence that the entire drive is 
failing.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] LVM on a drive with a bad sector?
  2004-05-24  8:55 [linux-lvm] LVM on a drive with a bad sector? Michael
@ 2004-05-24 18:31 ` Martijn Schoemaker
  2004-05-24 18:41   ` Alasdair G Kergon
  0 siblings, 1 reply; 3+ messages in thread
From: Martijn Schoemaker @ 2004-05-24 18:31 UTC (permalink / raw)
  To: LVM general discussion and development

Michael wrote:
 > I have a drive I was getting ready to change to LVM. When moving all the
 > old files off I noticed it seems to have a bad sector on the drive.. not
 > unlikely as I move a lot so the disks take a lot of physical abuse.. but
 > only that one bad sector. Is there anything special I should do before
 > using the drive with LVM to mark the sector as bad so that LVM just
 > works around it? So far there is no evidence that the entire drive is
 > failing.

Running with bad harddisks is generally a bad idea. What you should try
to do is run the manufacturers diagnostic tools over your hdd to swap
out the bad sector in the hdd's internal bad sector list (it will use
spare good blocks to swap it with). For Maxtor you can do this with
the PowerMax tool, other vendors have their own tools.

If this does not work, you can use LVM (as far as I know there is no
bad-block mapping within LVM, correct me if I'm wrong) but you need
to specify the bad block when making the filesystem. You can do this
by creating the logical volume, and then using 'badblocks' to locate
the bad block. This information can be passed to mke2fs for instance
to make it avoid the bad block (using the -l option). All other
filesystems have their own mechanism for this (if any).

Bottom line is, when a drive starts having bad sectors it's not reliable
anymore and further deterioration is possible. If you use a mirrored
configuration I think you can take the risk, but if you're not, you'd
better make sure you have a good backup system in place :)

My few cents,
Martijn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] LVM on a drive with a bad sector?
  2004-05-24 18:31 ` Martijn Schoemaker
@ 2004-05-24 18:41   ` Alasdair G Kergon
  0 siblings, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2004-05-24 18:41 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, May 24, 2004 at 08:31:25PM +0200, Martijn Schoemaker wrote:
> (as far as I know there is no
> bad-block mapping within LVM, correct me if I'm wrong)

The closest in LVM2 would be to put the bad sectors inside a single
LV and avoid using that LV.

e.g.  lvcreate -l1 vg -n broken /dev/sda5:46
if the bad sector falls inside physical extent 46 on /dev/sda5.

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-24 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-24  8:55 [linux-lvm] LVM on a drive with a bad sector? Michael
2004-05-24 18:31 ` Martijn Schoemaker
2004-05-24 18:41   ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox