All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: [RFC LVM2] (6/6) Allow allocation from LV
Date: Thu, 11 Oct 2007 19:03:25 -0400	[thread overview]
Message-ID: <470EABBD.2080808@ce.jp.nec.com> (raw)
In-Reply-To: <470EA422.6000003@ce.jp.nec.com>

This patch allows allocation from LV.

Example 1: striped LV on mirrored LV

# lvcreate -l4 -m1 --corelog testvg
  Logical volume "lvol0" created
# lvcreate -l4 -m1 --corelog testvg
  Logical volume "lvol1" created
# lvchange --addtag m testvg/lvol0 testvg/lvol1
  Logical volume "lvol0" changed
  Logical volume "lvol1" changed
# lvcreate -i2 -l2 testvg @m
  Using default stripesize 64.00 KB
  Logical volume "lvol2" created
# lvextend -l+2 testvg/lvol2 @m
  Using stripesize of last segment 64.00 KB
  Extending logical volume lvol2 to 16.00 MB
  Logical volume lvol2 successfully resized
# lvs -a -o name,attr,devices
  LV               Attr   Devices                            
  [lvol0]          mwi-ao lvol0_mimage_0(0),lvol0_mimage_1(0)
  [lvol0_mimage_0] iwi-ao /dev/mapper/d1(0)                  
  [lvol0_mimage_1] iwi-ao /dev/mapper/d2(0)                  
  [lvol1]          mwi-ao lvol1_mimage_0(0),lvol1_mimage_1(0)
  [lvol1_mimage_0] iwi-ao /dev/mapper/d3(0)                  
  [lvol1_mimage_1] iwi-ao /dev/mapper/d4(0)                  
  lvol2            -wi-a- lvol0(0),lvol1(0)        
# dmsetup ls --tree
testvg-lvol2 (253:15)
 |-testvg-lvol1 (253:14)
 |  |-testvg-lvol1_mimage_1 (253:13)
 |  |  `-d4 (253:4)
 |  |     `- (7:0)
 |  `-testvg-lvol1_mimage_0 (253:12)
 |     `-d3 (253:3)
 |        `- (7:0)
 `-testvg-lvol0 (253:11)
    |-testvg-lvol0_mimage_1 (253:10)
    |  `-d2 (253:2)
    |     `- (7:0)
    `-testvg-lvol0_mimage_0 (253:9)
       `-d1 (253:1)
          `- (7:0)

Example 2: mirrored mirror log

# lvcreate -m1 --corelog -l1 --addtag m testvg
  Logical volume "lvol0" created
# lvcreate -m1 -l1 --corelog testvg
  Logical volume "lvol1" created
# lvconvert --mirrorlog disk testvg/lvol1 @m
  Logical volume lvol1 converted.
# lvs -a -o name,attr,devices
  LV               Attr   Devices                            
  [lvol0]          mwi-ao lvol0_mimage_0(0),lvol0_mimage_1(0)
  [lvol0_mimage_0] iwi-ao /dev/mapper/d1(0)                  
  [lvol0_mimage_1] iwi-ao /dev/mapper/d2(0)                  
  lvol1            mwi-a- lvol1_mimage_0(0),lvol1_mimage_1(0)
  [lvol1_mimage_0] iwi-ao /dev/mapper/d3(0)                  
  [lvol1_mimage_1] iwi-ao /dev/mapper/d4(0)                  
  [lvol1_mlog]     lwi-ao lvol0(0)                      
# dmsetup ls --tree
testvg-lvol1 (253:14)
 |-testvg-lvol1_mimage_1 (253:13)
 |  `-d4 (253:4)
 |     `- (7:0)
 |-testvg-lvol1_mimage_0 (253:12)
 |  `-d3 (253:3)
 |     `- (7:0)
 `-testvg-lvol1_mlog (253:15)
    `-testvg-lvol0 (253:11)
       |-testvg-lvol0_mimage_1 (253:10)
       |  `-d2 (253:2)
       |     `- (7:0)
       `-testvg-lvol0_mimage_0 (253:9)
          `-d1 (253:1)
             `- (7:0)

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-allocate-from-lv.patch
Type: text/x-patch
Size: 11167 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071011/2b71ee7f/attachment.bin>

      parent reply	other threads:[~2007-10-11 23:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 22:30 [RFC LVM2] (0/6) Stacking LVs Jun'ichi Nomura
2007-10-11 22:54 ` [RFC LVM2] (1/6) Add 'const' to PV accessor functions Jun'ichi Nomura
2007-10-11 22:55 ` [RFC LVM2] (2/6) Add pv_dev_name() to access PV device name Jun'ichi Nomura
2007-10-11 22:56 ` [RFC LVM2] (3/6) Add _pv_allocate() (split from _pv_create) Jun'ichi Nomura
2007-10-11 22:56 ` [RFC LVM2] (4/6) Add 'pvseg' to AREA_LV lv_segment_area Jun'ichi Nomura
2007-10-11 22:57 ` [RFC LVM2] (5/6) Allow merging AREA_LV striped segments Jun'ichi Nomura
2007-10-11 23:03 ` Jun'ichi Nomura [this message]

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=470EABBD.2080808@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.