LVM mirror creation problem


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users LVM mirror creation problem
# 1  
Old 07-22-2012
LVM mirror creation problem

I apologize is this isn't an appropriate post for the 'advanced' UNIX, so please let me know if I should post this under UNIX for dummies, but here's my problem in a nutshell: I having problems creating a mirrored logical volume.

I have created two new physical volumes

Code:
root@ubuntu:/home/ubuntu# pvcreate /dev/sdc1 /dev/sdd1
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdd1" successfully created

I have created a volume group:

Code:
root@ubuntu:/home/ubuntu# vgcreate RAID1 /dev/sdc1 /dev/sdd1
  Volume group "RAID1" successfully created

root@ubuntu:/home/ubuntu# vgdisplay RAID1
  --- Volume group ---
  VG Name               RAID1
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               3.06 TiB
  PE Size               4.00 MiB
  Total PE              801288
  Alloc PE / Size       0 / 0   
  Free  PE / Size       801288 / 3.06 TiB
  VG UUID               ICsqOA-MMmL-wuOA-PqqA-oJ1o-vIeU-sG89xA

So far so good. I seem to have 3TB of free space to use.

I can create a striped volume

Code:
root@ubuntu:/home/ubuntu# lvcreate -i2 -l30%FREE -n test -I 128 RAID1 
  Logical volume "test" created
root@ubuntu:/home/ubuntu# lvchange -an RAID1/test
root@ubuntu:/home/ubuntu# lvremove RAID1/test

However when I try to create a mirrored volume, I get this:

Code:
root@ubuntu:/home/ubuntu# lvcreate -n backup -m1 --mirrorlog mirrored -l 30%VG RAID1
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.
  Unable to allocate extents for mirror(s).

Very puzzling. Can anyone tell me what I'm doign wrong?

Many thanks

---------- Post updated at 02:37 PM ---------- Previous update was at 12:40 PM ----------

Problem solved - user error. I didn't give the vg 2 additional volumes needed for the disk log
# 2  
Old 07-22-2012
Thank you for following up with your solution. It may help someone else.

Regards and welcome to the forum,
Alister
# 3  
Old 07-22-2012
To elaborate a little on my rather terse "solution", as I understand it, lvcreate uses the last physical disks (if specified) as the location of the disk logs.

So if you don't specify --mirrorlog core you will need at least three physical volumes, two for the data and one (which is on a separate PV) for the disk log. In this case, the last extent specified is where the log will be stored.

If you use --mirrorlog mirrored, you will need two physical devices for the two logs, and lvcreate will take the last two PV as the location of the logs.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Mirror disk problem

Hello all, i have the mirror disk problem with SunOS 5.10. here's the message: # metastat d15 d15: Mirror Submirror 0: d16 State: Needs maintenance Submirror 1: d17 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel... (4 Replies)
Discussion started by: rwprabowo
4 Replies

2. Linux

Centos 7.2 Convert single LVM to RAID Mirror Reinstall BootLoader

Hello, I am trying to convert a single-drive Centos 7.2 installation with LVM into a two-disk mdadm mirror with mrrored LVM. I was able to follow the excellent instructions at: http://www.dgoradia.com/creating-a-raid1-mirrored-on-an-existing-centos-on-lvm/and did create a two-disk mirror... (1 Reply)
Discussion started by: Clovis_Sangrail
1 Replies

3. HP-UX

Patch PHKL_31216 and PHCO_30698 HP-UX 11.11 for replace a LVM mirror boot disk

Hi, I have old server hp rp 3440 hp-ux 11.11. One mirrored disk is faulty. I need spesial patch PHKL_31216 and PHCO_30698, which give to correctly remove disk. Unfortunately I don't have access to hp support site. Please help me find it patch. regards,Andre (0 Replies)
Discussion started by: andre9
0 Replies

4. UNIX for Dummies Questions & Answers

Question about lvm file creation

Hi, I have below code for disk creation disk_list=$(ls /dev/sd) for disk in $disk_list do pvcreate $i done So what my understanding is first it is checking the disk under /dev sdb,sdc,sdd,...sdz whether 25 disk are existing if not then its creating the 25 physical volume. I... (4 Replies)
Discussion started by: stew
4 Replies

5. AIX

Script Checking LVM Mirror not Working

Hi, I need to know who can I create an script in order to check server mirror in AIX. I got this script !/usr/bin/ksh # # Check if a VG is mirrored. # # lsattr -El <lvname> -a strictness -a copies # If copies=2 and scrictness=y, then VG is mirrored # # LVs are retrieved via 'lsvg -l... (5 Replies)
Discussion started by: fede_mont
5 Replies

6. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

7. Linux

LVM - break mirror taking out orignal copy

Hi Guys, I have a mirrored LVM volume, and wish to break the mirror leaving only copy1 (effectively removing copy 0). Here's the config: # lvs -a -o +devices lvdata vg01 mwi-ao 2.19T lvdata_mlog 100.00 lvdata_mimage_0(0),lvdata_mimage_1(0) vg01... (0 Replies)
Discussion started by: badoshi
0 Replies

8. AIX

Partition offset problem after re-mirror vg

We had a mirrored disk failed (not the rootvg), there are 3 lvs (transfer, applogs, arch) from extvg gone open/stale state. After replaced failed disk and run cfgmgr, the new replaced disk is visible: ) I did the following to re-mirror new disk: # extendvg prodvg hdisk3 # lspv (got new pvid on... (2 Replies)
Discussion started by: jalite19
2 Replies

9. UNIX for Advanced & Expert Users

LVM problem

hi friends I have a problem .. actually I m working on LVM in linux through WinHex ..I have made one volume group and it has two logical volumes logvol00 and logvol01 and both are respectively mount on /rahul and /rock..I have found both folder(rahul & rock) in root directory which use ext file... (1 Reply)
Discussion started by: Rahul chauhan
1 Replies

10. HP-UX

Configure DNS,NFS,NIS,LDAP and LVM(mirror,sparing and multipathing)

Hello All, I am a newbee in HP UX wanted to know how to configure DNS,NFS,NIS,LDAP and LVM(mirror,sparing and multipathing) in HP UX 11iv2 and v3 and i did go through some of the docs on hp.com but i think those are for experience UX users and i am new to this so if some one could just mention... (1 Reply)
Discussion started by: coolsami
1 Replies
Login or Register to Ask a Question