<div dir="ltr"><div><div>hola Angel,<br><br>you need to present your snapshot as a RW LUN ; otherwise you won't be able to activate the VG.<br><br></div>As you should be writing your metadata to the snapshot the original data will remain unharmed.<br>

<br></div>Cheers<br><br>Fran<br><br><div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 1:34 PM, Angel L. Mateo <span dir="ltr"><<a href="mailto:amateo@um.es" target="_blank">amateo@um.es</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello guys,<br>
<br>
    I'm having a problem I don't know how to solve.<br>
<br>
    I have a running system with its disk under LVM2. Physical disks are in a SAN and we have no problems with them. Now we have configured an automated snapshots of our disks from our SAN to another one (both are HP 3par) and we want now the snapshot to be mounted in another system. This system has connected the snapshot disk without any problem but we can't mount the FS, because we can't activate volumes in it. The "only" difference between original disks and snaptshot ones are that this are seen by the OS as read only disks, so they can't be written.<br>


<br>
    In the system trying to mount the snapshot I could see PVs, VGs and LVs, as:<br>
<br>
amateo_adm@myotis52fa:~$ sudo pvs<br>
  PV         VG          Fmt  Attr PSize    PFree<br>
  /dev/sda5  Disk1       lvm2 a-      6.76g      0<br>
  /dev/sdb   IndexesDisk lvm2 a-     69.98g  20.00g<br>
  /dev/sdc   UsersDisk   lvm2 a-      2.50t      0<br>
  /dev/sdd   UsersDisk   lvm2 a-   1023.98g 499.97g<br>
amateo_adm@myotis52fa:~$ sudo vgs<br>
  VG          #PV #LV #SN Attr   VSize  VFree<br>
  Disk1         1   2   0 wz--n-  6.76g      0<br>
  IndexesDisk   1   1   0 wz--n- 69.98g  20.00g<br>
  UsersDisk     2   1   0 wz--n-  3.50t 499.97g<br>
amateo_adm@myotis52fa:~$ sudo lvs<br>
  LV          VG          Attr   LSize   Origin Snap%  Move Log Copy%  Convert<br>
  root        Disk1       -wi-ao 5.82g<br>
  swap_1      Disk1       -wi-ao 956.00m<br>
  vol_indexes IndexesDisk -wi-d- 49.98g<br>
  vol_users   UsersDisk   -wi-d- 3.01t<br>
<br>
    but I can't activate LVs:<br>
<br>
amateo_adm@myotis52fa:~$ sudo lvchange -a y UsersDisk/vol_users<br>
  device-mapper: reload ioctl failed: Invalid argument<br>
<br>
    and in the logs I get:<br>
<br>
Jan 28 13:32:41 myotis52fa kernel: [ 1789.845945] device-mapper: table: 252:0: linear: dm-linear: Device lookup failed<br>
Jan 28 13:32:41 myotis52fa kernel: [ 1789.846047] device-mapper: ioctl: error adding target to table<br>
<br>
    the original system and the one trying to mount the snapshot are both ubuntu 12.04 with same kernel (3.4.0-030400-generic) and version of lvm2 (2.02.66-4ubuntu7.4, the packaged by ubuntu).<br>
<br>
    Any help?<br>
<br>
-- <br>
Angel L. Mateo Martínez <br>
Sección de Telemática<br>
Área de Tecnologías de la Información<br>
y las Comunicaciones Aplicadas (ATICA)<br>
<a href="http://www.um.es/atica" target="_blank">http://www.um.es/atica</a><br>
Tfo: 868887590<br>
Fax: 868888337<br>
<br>
______________________________<u></u>_________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-<u></u>HOWTO/</a><br>
</blockquote></div><br></div></div></div></div></div>