Best practice for lvm on raid-5
Hi everyone,
I have a LVM vg on top of a softraid 5 consisting of 3 80 GB harddrives.
Currently I have /dev/md0 as my only physical volume, but this will lead to problems if I am going to expand the raid 5 by adding another 80 GB harddrive to (as pvresize is not implemented again yet, as I understand).
What is the best practice in this case? To add a partition table on top of /dev/md0 (but how is it represented in the /dev filesystem) and only add single partitions as pvs to the vg?
I'm happy for every suggestion :)
CU all,
Jens
Signature · 7 lines
GPG: 1024D/CF884D50 F2E8 F7FC F823 6464 4E9D EFAB 6EE9 8B9C CF88 4D50 ------------------------------------------------------------------------ Jens Hoffrichter / [email protected] / Joho@IRC / Fon: +43-650-5376989 Wenn Du keine Kiefer sein kannst auf dem Hügel, sei ein Busch im Tal - aber sei der schönste kleine Busch am Ufer des Bachs. Sei ein Busch, wenn du kein Baum sein kannst. "Be the best you can be" (uebersetzt) von Douglas Malloch
Quoted 3 lines · Jens Hoffrichter
Currently I have
/dev/md0as my only physical volume, but this will lead to problems if I am going to expand the raid 5 by adding another 80 GB harddrive to (as pvresize is not implemented again yet, as I understand).
Unless I am mistaken, it is not even possible to expand /dev/md0 by adding another drive in the first place. And because linux software raid has no way of knowing which blocks are in use and which are not, i do not see how this could ever be possible.
If you add another array (raid1 or raid5) as /dev/md1, you can vgextend your VG.
cheers,
Nils
Signature · 3 lines
Nils Juergens | [email protected] | icq 7090774 Having problems sending big files over the net? Try out Efisto (http://efisto.rnbhq.org).
Quoted 8 lines · Nils Juergens
Quoted 3 lines
Currently I have
/dev/md0as my only physical volume, but this will lead to problems if I am going to expand the raid 5 by adding another 80 GB harddrive to (as pvresize is not implemented again yet, as I understand).Unless I am mistaken, it is not even possible to expand
/dev/md0by adding another drive in the first place. And because linux software raid has no way of knowing which blocks are in use and which are not, i do not see how this could ever be possible.
Yes, it should be possible using raidreconf. I have not testet it yet, but at least the manpage states it. Converting a raid 0 to a raid 5 of same size worked without problem.
Quoted 2 lines
If you add another array (raid1 or raid5) as
/dev/md1, you can vgextend your VG.
Yes, I'm aware of this, but for this I have to add another 3 disk to the system, and I want to avoid this.
CU all,
Jens
Signature · 5 lines
GPG: 1024D/CF884D50 F2E8 F7FC F823 6464 4E9D EFAB 6EE9 8B9C CF88 4D50 ------------------------------------------------------------------------ Jens Hoffrichter / [email protected] / Joho@IRC / Fon: +43-650-5376989 A dream is a wish your heart makes. (Seen on a parade in Walt Disney World)
Quoted 8 lines · Jens Hoffrichter
Hi everyone,
I have a LVM vg on top of a softraid 5 consisting of 3 80 GB harddrives.
Currently I have
/dev/md0as my only physical volume, but this will lead to problems if I am going to expand the raid 5 by adding another 80 GB harddrive to (as pvresize is not implemented again yet, as I understand).
Quoted 5 lines
What is the best practice in this case? To add a partition table on top of
/dev/md0(but how is it represented in the /dev filesystem) and only add single partitions as pvs to the vg?I'm happy for every suggestion :)
Obviously you cannot extend the existing md0 RAID5. However you can add another PV to the VG. That new PV could be another soft RAID5. It doesn't have to be though... you can basically build quite a menagerie with LVM if you really want to.