[linux-lvm] Removing disk from raid LVM
Libor Klepáč
libor.klepac at bcom.cz
Thu Mar 12 15:21:21 UTC 2015
Hello,
but when i use
# lvs -a | grep Vokapo
output is
lvBackupVokapo vgPecDisk2 rwi-aor- 128.00g
[lvBackupVokapo_rimage_0] vgPecDisk2 iwi-aor- 42.67g
[lvBackupVokapo_rimage_1] vgPecDisk2 iwi-aor- 42.67g
[lvBackupVokapo_rimage_2] vgPecDisk2 iwi-aor- 42.67g
[lvBackupVokapo_rimage_3] vgPecDisk2 iwi-aor- 42.67g
[lvBackupVokapo_rmeta_0] vgPecDisk2 ewi-aor- 4.00m
[lvBackupVokapo_rmeta_1] vgPecDisk2 ewi-aor- 4.00m
[lvBackupVokapo_rmeta_2] vgPecDisk2 ewi-aor- 4.00m
[lvBackupVokapo_rmeta_3] vgPecDisk2 ewi-aor- 4.00m
what are these parts then?
it was created using
# lvcreate --type raid5 -i 3 -L 128G -n lvBackupVokapo vgPecDisk2
(with tools 2.02.104)
I was not sure about number of stripes
Libor
On Čt 12. března 2015 10:53:56 John Stoffel wrote:
> Libor> here it comes.
>
> Great, this is a big help, and it shows me that you are NOT using
> RAID5 for your backup volumes. The first clue is that you have 4 x
> 3tb disks and you only have a VG with 10.91t (terabytes) of useable
> space, with a name of 'vgPecDisk2'.
>
> And then none of the LVs in this VG are of type RAID5, so I don't
> think you actually created them properly. So when you lost one of the
> disks in your VG, you immediately lost any LVs which had extents on
> that missing disk. Even though you did a vgcfgrestore, that did NOT
> restore the data.
>
> You really need to redo this entirely. What you WANT to do is this:
>
> 0. copy all the remaining good backups elsewhere. You want to empty
> all of the disks in the existing vgPecDisk2 VG.
>
> 1. setup an MD RAID5 using the four big disks.
>
> mdadm --create -l 5 -n 4 --name vgPecDisk2 /dev/sda /dev/sdb /dev/sdd
> /dev/sdg
>
> 2. Create the PV on there
>
> pvcreate /dev/md/vgPecDisk2
>
> 3. Create a new VG ontop of the RAID5 array.
>
> vgcreate vgPecDisk2 /dev/md/vgPecDisk2
>
> 3. NOW you create your LVs on top of this
>
> lvcreate ....
>
>
> The problem you have is that none of your LVs was ever created with
> RAID5. If you want to do a test, try this:
>
> lvcreate -n test-raid5 --type raid5 --size 5g --stripes 4 vgPecDisk2
>
> and if it works (which it probably will on your system, assuming your
> LVM tools have support for RAID5 in the first please, you can then
> look at the output of the 'lvdisplay test-raid5' command to see how
> many devices and stripes (segments) that LV has.
>
> None of the ones you show have this. For example, your lvBackupVokapo
> only shows 1 segment. Without multiple segments, and RAID, you can't
> survive any sort of failure in your setup.
>
> This is why I personally only ever put LVs ontop of RAID devices if I
> have important data.
>
> Does this help you understand what went wrong here?
>
> John
>
>
> Libor> I think i have all PV not on top of raw partitions. System is on
> mdraid and backup PVs are Libor> directly on disks, without partitions.
>
> Libor> I think that LVs:
>
> Libor> lvAmandaDaily01old
>
> Libor> lvBackupPc
>
> Libor> lvBackupRsync
>
> Libor> are old damaged LVs, i left for experimenting on.
>
> Libor> These LVs are some broken parts of old raid?
>
> Libor> lvAmandaDailyAuS01_rimage_2_extracted
>
> Libor> lvAmandaDailyAuS01_rmeta_2_extracted
>
> Libor> LV lvAmandaDailyBlS01 is also from before crash, but i didn't try to
> repair it (i think)
>
> Libor> Libor
>
> Libor> ---------------
>
> Libor> cat /proc/mdstat (mdraid used only for OS)
>
> Libor> Personalities : [raid1] [raid10] [raid6] [raid5] [raid4]
>
> Libor> md1 : active raid1 sde3[0] sdf3[1]
>
> Libor> 487504704 blocks super 1.2 [2/2] [UU]
>
> Libor> bitmap: 1/4 pages [4KB], 65536KB chunk
>
> Libor> md0 : active raid1 sde2[0] sdf2[1]
>
> Libor> 249664 blocks super 1.2 [2/2] [UU]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20150312/41fedd1b/attachment.htm>
More information about the linux-lvm
mailing list