Skip to contentSkip to conversation

What if a drive dies ?

linux-lvm Perplexer 2 participants 4 messages Mar 2, 2004

lore
Share & tools
lore

Perplexer

author
#0 lore raw

Hello.

I'm sorry if I ask something that's be asked a million times before but I prefer answers to my specific questions. I hope someone will try to help.

I have a VG with several differently sized PVs and one LV. It is working fine but I am affraid that one day one of the drives would fail. I'd like to know what I'll be looking at when that happens. What if one drive would fail in that VG ? Can I remove it and 'repair' the VG/LV to run on with one drive less (data is written in striped mode). That would mean I got my VG/LV back on-line but the data that was on the bad disk would be missing (a small price to pay actually). Would I need to resize the filesystem again with some tool or anything special ?

Thanks for the answer(s).

---------
Perplexer

#1 lore raw
Quoted 7 lines · Perplexer

Hello.

I'm sorry if I ask something that's be asked a million times before but I prefer answers to my specific questions. I hope someone will try to help.

I have a VG with several differently sized PVs and one LV. It is working fine but I am affraid that one day one of the drives would fail.

It happened to me.

Quoted 3 lines

I'd like to know what I'll be looking at when that happens. What if one drive would fail in that VG ? Can I remove it and 'repair' the VG/LV to run on with one drive less

LVM2 can run readonly with some drives missing.

Quoted 1 line

(data is written in striped mode).

That lowers your odds considerably. I wouldn't count on recovering anything at all.

Quoted 4 lines

That would mean I got my VG/LV back on-line but the data that was on the bad disk would be missing (a small price to pay actually). Would I need to resize the filesystem again with some tool or anything special ?

If you didn't run in striped mode you'd probably be able to recover most of the data from the remaining disks, the exact results would depend on the filesystem used and which part of it was lost. However, in striped mode you'll lose fragments all over the place. Recovering from that is more or less impossible.

If your data is precious, use RAID1 or RAID5 and make regular backups.

Signature · 2 lines
M�ns Rullg�rd
[email protected]
author
#2 lore raw

Ahh I made a major typo .... it's a linear setup, not a striped one.

You mentioned anyway that a recovery would be somewhat possible. I'm using ext3 journaling fs on my LV. Would I be able to mount this LV if one PV died, meaning I would see all data except the part that was lost with that drive or would I need to do anything special to make the LV mountable again ?

---------
Perplexer

----- Original Message -----
From: "M�ns Rullg�rd" <[email protected]>
To: <[email protected]>
Sent: Tuesday, March 02, 2004 1:08 PM
Subject: [linux-lvm] Re: What if a drive dies ?

Quoted 46 lines
Quoted 7 lines · Perplexer

Hello.

I'm sorry if I ask something that's be asked a million times before but I prefer answers to my specific questions. I hope someone will try to help.

I have a VG with several differently sized PVs and one LV. It is working fine but I am affraid that one day one of the drives would fail.

It happened to me.

Quoted 3 lines

I'd like to know what I'll be looking at when that happens. What if one drive would fail in that VG ? Can I remove it and 'repair' the VG/LV to run on with one drive less

LVM2 can run readonly with some drives missing.

Quoted 1 line

(data is written in striped mode).

That lowers your odds considerably. I wouldn't count on recovering anything at all.

Quoted 4 lines

That would mean I got my VG/LV back on-line but the data that was on the bad disk would be missing (a small price to pay actually). Would I need to resize the filesystem again with some tool or anything special ?

If you didn't run in striped mode you'd probably be able to recover most of the data from the remaining disks, the exact results would depend on the filesystem used and which part of it was lost. However, in striped mode you'll lose fragments all over the place. Recovering from that is more or less impossible.

If your data is precious, use RAID1 or RAID5 and make regular backups.

Signature · 8 lines
M�ns Rullg�rd
[email protected]

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
#3 lore raw
Quoted 4 lines · Perplexer

Ahh I made a major typo .... it's a linear setup, not a striped one.

You mentioned anyway that a recovery would be somewhat possible. I'm using ext3 journaling fs on my LV.

That's what I had.

Quoted 3 lines

Would I be able to mount this LV if one PV died, meaning I would see all data except the part that was lost with that drive or would I need to do anything special to make the LV mountable again ?

It will depend on which part of the filesystem is lost. I had a 10 GB LV with various source code packages on it and lost maybe 2 GB somewhere in the middle of it. Obviously, everything on the dead disk was lost. The rest was mostly recovered, but many of the files ended up in lost+found.

A different 20 GB LV had some 10-15 files each 0.5-1 GB in the root, and no subdirectories. This LV lost a GB or two at the beginning. All the files were gone, even those that were stored entirely on a good disk. The reason for this was that all the inode information for the root directory was stored on the bad part.

I don't know how other filesystems will deal with such situations. I'm running RAID now to be somewhat safer. It was a good thing too, since one of the replacement disks turned out to be bad.

Signature · 2 lines
M�ns Rullg�rd
[email protected]