linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Franky Van Liedekerke <liedekef@telenet.be>
To: linux-lvm@redhat.com
Subject: [linux-lvm] lvcreate/convert a clustered striped mirror
Date: Tue, 25 Jun 2013 15:20:23 +0200	[thread overview]
Message-ID: <25f646caf787289b2d4fb94f7f2c06da@imap.telenet.be> (raw)

Since RHEL 6.4, the "-type raid*" options of lvcreate have been 
disabled for a clvm setup. Which is ok for me, since I don't like the 
chance of haveing data corruption.
However: when needing to do a mirror between 2 SAN storages, something 
is still needed. So I use the good old "-m 1" and cmirrord. And here 
lies the problem: suppose I have 2 disks from SAN 1, and 2 disks from 
SAN 2 so that I need to stripe over the SAN 1 disks and then mirror to 
SAN 2 disks.
This command (combining stripe and mirror) is working as expected:

lvcreate -m1 -i 2 -I 4 --nosync --alloc anywhere -n lvtest vgtest -L 
90G /dev/mapper/CLVM-SAN1-1315 /dev/mapper/CLVM-SAN1-1316  
/dev/mapper/CLVM-SAN2-1415 /dev/mapper/CLVM-SAN2-14

The command "lvs -a -o +devices" shows the setup is as expected:
   lvtest            vgtest     Mwa-a-m--  90.00g                        
lvtest_mlog   100.00         lvtest_mimage_0(0),lvtest_mimage_1(0)
   [lvtest_mimage_0] vgtest     iwa-aom--  90.00g                        
                              
/dev/mapper/CLVM-SAN1-1315(0),/dev/mapper/CLVM-SAN1-1316(0)
   [lvtest_mimage_1] vgtest     iwa-aom--  90.00g                        
                              
/dev/mapper/CLVM-SAN2-1415(0),/dev/mapper/CLVM-SAN2-1416(0)
   [lvtest_mlog]     vgtest     lwa-aom--   4.00m                        
                              /dev/mapper/CLVM-SAN2-1416(11520)


The command "pvs -a -o +devices" shows everything is ok (the mirror leg 
is also striped, since there's some space free on both the mirrored 
devices):
   PV                              VG         Fmt  Attr PSize   PFree  
Devices

   /dev/mapper/CLVM-SAN1-1315       vgtest     lvm2 a--   50.00g  5.00g 
/dev/mapper/CLVM-SAN1-1315(0),/dev/mapper/CLVM-SAN1-1316(0)
   /dev/mapper/CLVM-SAN1-1315       vgtest     lvm2 a--   50.00g  5.00g
   /dev/mapper/CLVM-SAN1-1316       vgtest     lvm2 a--   50.00g  5.00g 
/dev/mapper/CLVM-SAN1-1315(0),/dev/mapper/CLVM-SAN1-1316(0)
   /dev/mapper/CLVM-SAN1-1316       vgtest     lvm2 a--   50.00g  5.00g
   /dev/mapper/CLVM-SAN2-1415       vgtest     lvm2 a--   50.00g  5.00g 
/dev/mapper/CLVM-SAN2-1415(0),/dev/mapper/CLVM-SAN2-1416(0)
   /dev/mapper/CLVM-SAN2-1415       vgtest     lvm2 a--   50.00g  5.00g
   /dev/mapper/CLVM-SAN2-1416       vgtest     lvm2 a--   50.00g  4.99g 
/dev/mapper/CLVM-SAN2-1415(0),/dev/mapper/CLVM-SAN2-1416(0)
   /dev/mapper/CLVM-SAN2-1416       vgtest     lvm2 a--   50.00g  4.99g 
/dev/mapper/CLVM-SAN2-1416(11520)
   /dev/mapper/CLVM-SAN2-1416       vgtest     lvm2 a--   50.00g  4.99g

Now, however, if I decide to first create the stripe on SAN1:
   lvcreate -i 2 -I 4 -n lvtest vgtest -L 90G /dev/mapper/CLVM-SAN1-1315 
/dev/mapper/CLVM-SAN1-1316
and then the mirror (mirrorlog core used for testing):
   lvconvert -m1 --mirrorlog core vgtest/lvtest

The mirrored leg is now not striped:
   /dev/mapper/CLVM-SAN1-1315       vgtest     lvm2 a--   50.00g  5.00g 
/dev/mapper/CLVM-SAN1-1315(0),/dev/mapper/CLVM-SAN1-1316(0)
   /dev/mapper/CLVM-SAN1-1315       vgtest     lvm2 a--   50.00g  5.00g
   /dev/mapper/CLVM-SAN1-1316       vgtest     lvm2 a--   50.00g  5.00g 
/dev/mapper/CLVM-SAN1-1315(0),/dev/mapper/CLVM-SAN1-1316(0)
   /dev/mapper/CLVM-SAN1-1316       vgtest     lvm2 a--   50.00g  5.00g
   /dev/mapper/CLVM-SAN2-1415       vgtest     lvm2 a--   50.00g     0  
/dev/mapper/CLVM-SAN2-1415(0)
   /dev/mapper/CLVM-SAN2-1416       vgtest     lvm2 a--   50.00g  9.99g 
/dev/mapper/CLVM-SAN2-1416(0)
   /dev/mapper/CLVM-SAN2-1416       vgtest     lvm2 a--   50.00g  9.99g

In itself this is not a problem, but when the mirror breaks and you 
need to recreate it, the same command needs to be executed. Suppose in 
the beginning we execute the lvcreate with stripe/mirror combo and we 
need to rebuild the mirror after a failure, suddenly one part will no 
longer be striped.

So here are my questions:
- Is there an option to lvconvert to also force the same striping on 
the mirror leg?
- And a second question: "-mirrorlog mirrored" doesn't seem to be 
possible in a clvm setup, is this intended?
- And in general: is there another method to get a mirrored stripe in a 
clustered setup?

With friendly regards,

Franky

             reply	other threads:[~2013-06-25 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 13:20 Franky Van Liedekerke [this message]
2013-06-25 13:25 ` [linux-lvm] lvcreate/convert a clustered striped mirror Franky Van Liedekerke

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=25f646caf787289b2d4fb94f7f2c06da@imap.telenet.be \
    --to=liedekef@telenet.be \
    --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).