linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Libor Klepáč" <libor.klepac@bcom.cz>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Removing disk from raid LVM
Date: Thu, 12 Mar 2015 16:21:21 +0100	[thread overview]
Message-ID: <9916933.1FBSnvlGeW@libor-nb> (raw)
In-Reply-To: <21761.43140.252254.140180@quad.stoffel.home>

[-- Attachment #1: Type: text/plain, Size: 4412 bytes --]

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]
> 

[-- Attachment #2: Type: text/html, Size: 244725 bytes --]

  reply	other threads:[~2015-03-12 15:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 11:21 [linux-lvm] Removing disk from raid LVM Libor Klepáč
2015-03-10  9:23 ` emmanuel segura
2015-03-10  9:34   ` Libor Klepáč
2015-03-10 14:05 ` John Stoffel
2015-03-11 13:05   ` Libor Klepáč
2015-03-11 15:57     ` John Stoffel
2015-03-11 18:02       ` Libor Klepáč
2015-03-12 14:53         ` John Stoffel
2015-03-12 15:21           ` Libor Klepáč [this message]
2015-03-12 17:20             ` John Stoffel
2015-03-12 21:32               ` Libor Klepáč
2015-03-13 16:18                 ` John Stoffel
2015-03-12 15:32           ` Libor Klepáč
2015-03-11 23:12 ` Premchand Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9916933.1FBSnvlGeW@libor-nb \
    --to=libor.klepac@bcom.cz \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).