If one disk fails i loose everything?
I have tree simple questions about LVM that just could not be answered after 4 hours of search in LVM howto, Google, Linux questions and linux-lvm Archives.
I have a small file server with 600Gbytes in one liner volume group consisting of 3 200 Gbyte Hard disk. My questions are:
1. If one hard disk fails (hardware) do I loose all the data stored on the VG?
2. Can I add a new hard disk in the VG without having to format it before? (I mean if it is full of data can I just add it?)
3. In case of failure can I recover the data from a single disk on another box?
Thanks in advance
Kyriakos
Greece
Quoted 6 lines · kyr
I have tree simple questions about LVM that just could not be answered after 4 hours of search in LVM howto, Google, Linux questions and linux-lvm Archives.
Quoted 6 lines
I have a small file server with 600Gbytes in one liner volume group consisting of 3 200 Gbyte Hard disk. My questions are:
1. If one hard disk fails (hardware) do I loose all the data stored on the VG?
Yup. That's how it works. There are programs that can scavange
partial data from the hard disks that make up the VG. r-studio being one of them.
Quoted 2 lines
2. Can I add a new hard disk in the VG without having to format it before? (I mean if it is full of data can I just add it?)
You'll have to create an LVM data partition for the data that you want
to store on the drive, and this will wipe out the currently existing data on the drive.
Quoted 2 lines
3. In case of failure can I recover the data from a single disk on another box?
Possibly, but I've never done this. Seems rather doubtful to me.
Quoted 14 lines
Thanks in advance
Kyriakos
Greece
_______________________________________________
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/
In the answers below I've taken 'one linear volume group' to actually mean 'one linear volume using all the space in the volume group'. If this is not what you meant, can you please describe your setup?
Quoted 2 lines
1. If one hard disk fails (hardware) do I loose all the data stored on the VG?
I'm not sure where you searched, but the answer to this is a fundamental characteristic of RAID0 - there is no redundancy. If you have a concat (rather than a stripe), then you /might/ be able to salvage /some/ data - but the chances are pretty slim that you'll get anything sane back out of it, and you're going to have to do some relatively low level stuff to do even that I would have thought.
Quoted 2 lines
2. Can I add a new hard disk in the VG without having to format it before? (I mean if it is full of data can I just add it?)
Not easily using LVM on linux, no. If it already has partitions on it, then the layout of the data on the drive is incorrect for LVM. There may be tools out there to overlay the required metadata, but the underlying partitions will have to reduce in size, so this would require the filesystems to support being shrunk.
Quoted 2 lines
3. In case of failure can I recover the data from a single disk on another box?
What sort of failure? Any VG that has enough drives to provide you with a working volume group/volume can be imported to another machine and read. So if you have 3 volumes over the VG, and only one of them doesn't have a complete set of blocks on it - the other 2 can be salvaged. In the case of the arrangement you're talking about, no.
If you need to be able to recover the data, then a simple linear volume (with no redundancy) is not a good idea.
(In answer to the subject line, 'with the arrangement you're talking about' - YES')
Quoted 37 lines · [email protected] wrote:
In the answers below I've taken 'one linear volume group' to actually mean 'one linear volume using all the space in the volume group'. If this is not what you meant, can you please describe your setup?
Quoted 3 lines
1. If one hard disk fails (hardware) do I loose all the data stored on the VG?
I'm not sure where you searched, but the answer to this is a fundamental characteristic of RAID0 - there is no redundancy. If you have a concat (rather than a stripe), then you /might/ be able to salvage /some/ data - but the chances are pretty slim that you'll get anything sane back out of it, and you're going to have to do some relatively low level stuff to do even that I would have thought.
Quoted 3 lines
2. Can I add a new hard disk in the VG without having to format it before? (I mean if it is full of data can I just add it?)
Not easily using LVM on linux, no. If it already has partitions on it, then the layout of the data on the drive is incorrect for LVM. There may be tools out there to overlay the required metadata, but the underlying partitions will have to reduce in size, so this would require the filesystems to support being shrunk.
Quoted 3 lines
3. In case of failure can I recover the data from a single disk on another box?
What sort of failure? Any VG that has enough drives to provide you with a
working volume group/volume can be imported to another machine and read. So if you have 3 volumes over the VG, and only one of them doesn't have a complete set of blocks on it - the other 2 can be salvaged. In the case
of the arrangement you're talking about, no.If you need to be able to recover the data, then a simple linear volume (with no redundancy) is not a good idea.
Quoted 10 lines
(In answer to the subject line, 'with the arrangement you're talking about' - YES')
_______________________________________________
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/
Good discussion....the need to protect data under various contingencies is why I use raid5 sets as the PVs. You can lose up to two and keep your data, hot add, have spares, etc.
Signature · 3 lines
Regards, Old Fart