Re: Difficulties with creating RAID1 LV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tried same setup on rhel7 :

[root@rhel7 ~]# rpm -q lvm2
lvm2-2.02.115-3.el7.x86_64

[root@rhel7 ~]# pvcreate  /dev/sdb1 /dev/sdc1
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created

[root@rhel7 ~]# vgcreate  vmhost-vg  /dev/sdb1 /dev/sdc1
  Volume group "vmhost-vg" successfully created

[root@rhel7 ~]# lvcreate --verbose --type raid1 --mirrors 1 --extents 1 -n testlv vmhost-vg
    Finding volume group "vmhost-vg"
    Archiving volume group "vmhost-vg" metadata (seqno 1).
    Creating logical volume testlv
    Creating logical volume testlv_rimage_0
    Creating logical volume testlv_rmeta_0
    Creating logical volume testlv_rimage_1
    Creating logical volume testlv_rmeta_1
    activation/volume_list configuration setting not defined: Checking only host tags for vmhost-vg/testlv_rmeta_0
    Creating vmhost--vg-testlv_rmeta_0
    Loading vmhost--vg-testlv_rmeta_0 table (253:2)
    Resuming vmhost--vg-testlv_rmeta_0 (253:2)
    Clearing metadata area of vmhost-vg/testlv_rmeta_0
    Initializing 512 B of logical volume "vmhost-vg/testlv_rmeta_0" with value 0.
    Removing vmhost--vg-testlv_rmeta_0 (253:2)
    activation/volume_list configuration setting not defined: Checking only host tags for vmhost-vg/testlv_rmeta_1
    Creating vmhost--vg-testlv_rmeta_1
    Loading vmhost--vg-testlv_rmeta_1 table (253:2)
    Resuming vmhost--vg-testlv_rmeta_1 (253:2)
    Clearing metadata area of vmhost-vg/testlv_rmeta_1
    Initializing 512 B of logical volume "vmhost-vg/testlv_rmeta_1" with value 0.
    Removing vmhost--vg-testlv_rmeta_1 (253:2)
    Creating volume group backup "/etc/lvm/backup/vmhost-vg" (seqno 3).
    Activating logical volume "testlv" exclusively.
    activation/volume_list configuration setting not defined: Checking only host tags for vmhost-vg/testlv
    Creating vmhost--vg-testlv_rmeta_0
    Loading vmhost--vg-testlv_rmeta_0 table (253:2)
    Resuming vmhost--vg-testlv_rmeta_0 (253:2)
    Creating vmhost--vg-testlv_rimage_0
    Loading vmhost--vg-testlv_rimage_0 table (253:3)
    Resuming vmhost--vg-testlv_rimage_0 (253:3)
    Creating vmhost--vg-testlv_rmeta_1
    Loading vmhost--vg-testlv_rmeta_1 table (253:4)
    Resuming vmhost--vg-testlv_rmeta_1 (253:4)
    Creating vmhost--vg-testlv_rimage_1
    Loading vmhost--vg-testlv_rimage_1 table (253:5)
    Resuming vmhost--vg-testlv_rimage_1 (253:5)
    Creating vmhost--vg-testlv
    Loading vmhost--vg-testlv table (253:6)
    Resuming vmhost--vg-testlv (253:6)
    Monitoring vmhost-vg/testlv
    Wiping known signatures on logical volume "vmhost-vg/testlv"
    Initializing 4.00 KiB of logical volume "vmhost-vg/testlv" with value 0.
  Logical volume "testlv" created.

[root@rhel7 ~]# lvs -a vmhost-vg
  LV                VG        Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  testlv            vmhost-vg rwi-a-r--- 4.00m                                    100.00         
  [testlv_rimage_0] vmhost-vg iwi-aor--- 4.00m                                                   
  [testlv_rimage_1] vmhost-vg iwi-aor--- 4.00m                                                   
  [testlv_rmeta_0]  vmhost-vg ewi-aor--- 4.00m                                                   
  [testlv_rmeta_1]  vmhost-vg ewi-aor--- 4.00m


[root@rhel7 ~]# dmsetup status
vmhost--vg-testlv_rmeta_1: 0 8192 linear
vmhost--vg-testlv_rmeta_0: 0 8192 linear
vmhost--vg-testlv_rimage_1: 0 8192 linear
vmhost--vg-testlv_rimage_0: 0 8192 linear
vmhost--vg-testlv: 0 8192 raid raid1 2 AA 8192/8192 idle 0

[root@rhel7 ~]# dmsetup table vmhost--vg-testlv
0 8192 raid raid1 3 0 region_size 1024 2 253:2 253:3 253:4 253:5



On Sat, Jun 27, 2015 at 11:48 AM, MegaBrutal <megabrutal@gmail.com> wrote:
Hi all,

Nowadays it's difficult to create raid1 LVs, or converting linear LVs
to raid1. If I try hard, once it succeeds, but it's not supposed to
work like this. I'm on Ubuntu Vivid. I've never experienced this
before, but I didn't create much raid1 LVs before I added plus PVs.
But I don't remember ever having this problem, so whatever it is,
probably it's introduced with Vivid.


Case 1: Creating raid1 LV

root@vmhost:~# lvcreate --verbose --type raid1 --mirrors 1 --extents 1
--name testlv vmhost-vg
    DEGRADED MODE. Incomplete RAID LVs will be processed.
    Setting logging type to disk
    Finding volume group "vmhost-vg"
    Archiving volume group "vmhost-vg" metadata (seqno 112).
    Creating logical volume testlv
    Creating logical volume testlv_rimage_0
    Creating logical volume testlv_rmeta_0
    Creating logical volume testlv_rimage_1
    Creating logical volume testlv_rmeta_1
    activation/volume_list configuration setting not defined: Checking
only host tags for vmhost-vg/testlv_rmeta_0
    Creating vmhost--vg-testlv_rmeta_0
    Loading vmhost--vg-testlv_rmeta_0 table (252:122)
    Resuming vmhost--vg-testlv_rmeta_0 (252:122)
    Clearing metadata area of vmhost-vg/testlv_rmeta_0
    Initializing 512 B of logical volume "vmhost-vg/testlv_rmeta_0"
with value 0.
    Removing vmhost--vg-testlv_rmeta_0 (252:122)
    activation/volume_list configuration setting not defined: Checking
only host tags for vmhost-vg/testlv_rmeta_1
    Creating vmhost--vg-testlv_rmeta_1
    Loading vmhost--vg-testlv_rmeta_1 table (252:122)
    Resuming vmhost--vg-testlv_rmeta_1 (252:122)
    Clearing metadata area of vmhost-vg/testlv_rmeta_1
    Initializing 512 B of logical volume "vmhost-vg/testlv_rmeta_1"
with value 0.
    Removing vmhost--vg-testlv_rmeta_1 (252:122)
    Creating volume group backup "/etc/lvm/backup/vmhost-vg" (seqno 114).
    Activating logical volume "testlv" exclusively.
    activation/volume_list configuration setting not defined: Checking
only host tags for vmhost-vg/testlv
    Creating vmhost--vg-testlv_rmeta_0
    Loading vmhost--vg-testlv_rmeta_0 table (252:122)
    Resuming vmhost--vg-testlv_rmeta_0 (252:122)
    Creating vmhost--vg-testlv_rimage_0
    Loading vmhost--vg-testlv_rimage_0 table (252:123)
    Resuming vmhost--vg-testlv_rimage_0 (252:123)
    Creating vmhost--vg-testlv_rmeta_1
    Loading vmhost--vg-testlv_rmeta_1 table (252:124)
    Resuming vmhost--vg-testlv_rmeta_1 (252:124)
    Creating vmhost--vg-testlv_rimage_1
    Loading vmhost--vg-testlv_rimage_1 table (252:125)
    Resuming vmhost--vg-testlv_rimage_1 (252:125)
    Creating vmhost--vg-testlv
    Loading vmhost--vg-testlv table (252:126)
  device-mapper: reload ioctl on  failed: Device or resource busy
    Removing vmhost--vg-testlv (252:126)
  Failed to activate new LV.
    Creating volume group backup "/etc/lvm/backup/vmhost-vg" (seqno 115).

Result: nothing is actually created according to "lvs -a".


Case 2: Create linear LV and then convert it to raid1

root@vmhost:~# lvcreate --verbose --extents 1 --name testlv vmhost-vg
    DEGRADED MODE. Incomplete RAID LVs will be processed.
    Setting logging type to disk
    Finding volume group "vmhost-vg"
    Archiving volume group "vmhost-vg" metadata (seqno 115).
    Creating logical volume testlv
    Creating volume group backup "/etc/lvm/backup/vmhost-vg" (seqno 116).
    Activating logical volume "testlv".
    activation/volume_list configuration setting not defined: Checking
only host tags for vmhost-vg/testlv
    Creating vmhost--vg-testlv
    Loading vmhost--vg-testlv table (252:126)
    Resuming vmhost--vg-testlv (252:126)
    Wiping known signatures on logical volume "vmhost-vg/testlv"
    Initializing 4.00 KiB of logical volume "vmhost-vg/testlv" with value 0.
    Creating volume group backup "/etc/lvm/backup/vmhost-vg" (seqno 116).
  Logical volume "testlv" created

root@vmhost:~# lvs -a | grep testlv
  testlv                    vmhost-vg -wi-a-----   4.00m

root@vmhost:~# lvconvert --verbose --type raid1 --mirrors 1 vmhost-vg/testlv
    DEGRADED MODE. Incomplete RAID LVs will be processed.
    Archiving volume group "vmhost-vg" metadata (seqno 116).
    Creating logical volume testlv_rmeta_0
    Creating logical volume testlv_rmeta_1
    Creating logical volume testlv_rimage_0
    activation/volume_list configuration setting not defined: Checking
only host tags for vmhost-vg/testlv_rmeta_0
    Creating vmhost--vg-testlv_rmeta_0
  device-mapper: create ioctl on vmhost--vg-testlv_rmeta_0 failed:
Device or resource busy
  Failed to activate localy testlv_rmeta_0 for clearing

root@vmhost:~# lvs -a | grep testlv
  testlv                    vmhost-vg -wi-a-----   4.00m
  testlv_rimage_1           vmhost-vg -wi-------   4.00m
  testlv_rmeta_0            vmhost-vg -wi-------   4.00m
  testlv_rmeta_1            vmhost-vg -wi-------   4.00m

Result: mirror and meta LVs are created as distinct linear LVs and are
not bound together to form a raid1 LV.


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux