* [linux-lvm] Mounting a read only disk
@ 2014-01-28 12:34 Angel L. Mateo
2014-01-28 15:22 ` Fran Garcia
0 siblings, 1 reply; 6+ messages in thread
From: Angel L. Mateo @ 2014-01-28 12:34 UTC (permalink / raw)
To: linux-lvm
Hello guys,
I'm having a problem I don't know how to solve.
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.
In the system trying to mount the snapshot I could see PVs, VGs and
LVs, as:
amateo_adm@myotis52fa:~$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 Disk1 lvm2 a- 6.76g 0
/dev/sdb IndexesDisk lvm2 a- 69.98g 20.00g
/dev/sdc UsersDisk lvm2 a- 2.50t 0
/dev/sdd UsersDisk lvm2 a- 1023.98g 499.97g
amateo_adm@myotis52fa:~$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
Disk1 1 2 0 wz--n- 6.76g 0
IndexesDisk 1 1 0 wz--n- 69.98g 20.00g
UsersDisk 2 1 0 wz--n- 3.50t 499.97g
amateo_adm@myotis52fa:~$ sudo lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
Convert
root Disk1 -wi-ao 5.82g
swap_1 Disk1 -wi-ao 956.00m
vol_indexes IndexesDisk -wi-d- 49.98g
vol_users UsersDisk -wi-d- 3.01t
but I can't activate LVs:
amateo_adm@myotis52fa:~$ sudo lvchange -a y UsersDisk/vol_users
device-mapper: reload ioctl failed: Invalid argument
and in the logs I get:
Jan 28 13:32:41 myotis52fa kernel: [ 1789.845945] device-mapper: table:
252:0: linear: dm-linear: Device lookup failed
Jan 28 13:32:41 myotis52fa kernel: [ 1789.846047] device-mapper: ioctl:
error adding target to table
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).
Any help?
--
Angel L. Mateo Mart�nez
Secci�n de Telem�tica
�rea de Tecnolog�as de la Informaci�n
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Mounting a read only disk
2014-01-28 12:34 [linux-lvm] Mounting a read only disk Angel L. Mateo
@ 2014-01-28 15:22 ` Fran Garcia
2014-01-29 7:58 ` Angel L. Mateo
0 siblings, 1 reply; 6+ messages in thread
From: Fran Garcia @ 2014-01-28 15:22 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 2989 bytes --]
hola Angel,
you need to present your snapshot as a RW LUN ; otherwise you won't be able
to activate the VG.
As you should be writing your metadata to the snapshot the original data
will remain unharmed.
Cheers
Fran
On Tue, Jan 28, 2014 at 1:34 PM, Angel L. Mateo <amateo@um.es> wrote:
> Hello guys,
>
> I'm having a problem I don't know how to solve.
>
> 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.
>
> In the system trying to mount the snapshot I could see PVs, VGs and
> LVs, as:
>
> amateo_adm@myotis52fa:~$ sudo pvs
> PV VG Fmt Attr PSize PFree
> /dev/sda5 Disk1 lvm2 a- 6.76g 0
> /dev/sdb IndexesDisk lvm2 a- 69.98g 20.00g
> /dev/sdc UsersDisk lvm2 a- 2.50t 0
> /dev/sdd UsersDisk lvm2 a- 1023.98g 499.97g
> amateo_adm@myotis52fa:~$ sudo vgs
> VG #PV #LV #SN Attr VSize VFree
> Disk1 1 2 0 wz--n- 6.76g 0
> IndexesDisk 1 1 0 wz--n- 69.98g 20.00g
> UsersDisk 2 1 0 wz--n- 3.50t 499.97g
> amateo_adm@myotis52fa:~$ sudo lvs
> LV VG Attr LSize Origin Snap% Move Log Copy%
> Convert
> root Disk1 -wi-ao 5.82g
> swap_1 Disk1 -wi-ao 956.00m
> vol_indexes IndexesDisk -wi-d- 49.98g
> vol_users UsersDisk -wi-d- 3.01t
>
> but I can't activate LVs:
>
> amateo_adm@myotis52fa:~$ sudo lvchange -a y UsersDisk/vol_users
> device-mapper: reload ioctl failed: Invalid argument
>
> and in the logs I get:
>
> Jan 28 13:32:41 myotis52fa kernel: [ 1789.845945] device-mapper: table:
> 252:0: linear: dm-linear: Device lookup failed
> Jan 28 13:32:41 myotis52fa kernel: [ 1789.846047] device-mapper: ioctl:
> error adding target to table
>
> 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).
>
> Any help?
>
> --
> Angel L. Mateo Martínez
> Sección de Telemática
> Área de Tecnologías de la Información
> y las Comunicaciones Aplicadas (ATICA)
> http://www.um.es/atica
> Tfo: 868887590
> Fax: 868888337
>
> _______________________________________________
> 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/
>
[-- Attachment #2: Type: text/html, Size: 3875 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Mounting a read only disk
2014-01-28 15:22 ` Fran Garcia
@ 2014-01-29 7:58 ` Angel L. Mateo
2014-01-29 11:45 ` Angel L. Mateo
0 siblings, 1 reply; 6+ messages in thread
From: Angel L. Mateo @ 2014-01-29 7:58 UTC (permalink / raw)
To: linux-lvm
El 28/01/14 16:22, Fran Garcia escribi�:
> hola Angel,
>
> you need to present your snapshot as a RW LUN ; otherwise you won't be
> able to activate the VG.
>
> As you should be writing your metadata to the snapshot the original data
> will remain unharmed.
>
Ok. I'm going to try it. Thank you.
--
Angel L. Mateo Mart�nez
Secci�n de Telem�tica
�rea de Tecnolog�as de la Informaci�n
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Mounting a read only disk
2014-01-29 7:58 ` Angel L. Mateo
@ 2014-01-29 11:45 ` Angel L. Mateo
2014-01-29 11:58 ` Seb A
0 siblings, 1 reply; 6+ messages in thread
From: Angel L. Mateo @ 2014-01-29 11:45 UTC (permalink / raw)
To: linux-lvm
El 29/01/14 08:58, Angel L. Mateo escribi�:
> El 28/01/14 16:22, Fran Garcia escribi�:
>> hola Angel,
>>
>> you need to present your snapshot as a RW LUN ; otherwise you won't be
>> able to activate the VG.
>>
>> As you should be writing your metadata to the snapshot the original data
>> will remain unharmed.
>>
> Ok. I'm going to try it. Thank you.
>
>
It works now with RW LUNs. Thank you very much.
--
Angel L. Mateo Mart�nez
Secci�n de Telem�tica
�rea de Tecnolog�as de la Informaci�n
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Mounting a read only disk
2014-01-29 11:45 ` Angel L. Mateo
@ 2014-01-29 11:58 ` Seb A
2014-01-29 12:27 ` Angel L. Mateo
0 siblings, 1 reply; 6+ messages in thread
From: Seb A @ 2014-01-29 11:58 UTC (permalink / raw)
To: linux-lvm
Glad it's working for you now Angel. I noticed you had exactly the same
error messages as I did in my post yesterday.
Was there any way of telling from the information you gave, or the output of
any other command, if the LUNs are RW or RO?
Kind regards,
Sebastian
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com
> [mailto:linux-lvm-bounces@redhat.com] On Behalf Of Angel L.
> Mateo amateo-at-um.es |linux-lvm/Allow + Forward to Syn&Yahoo&Gmail|
> Sent: 29 January 2014 11:45
> To: ****************; ********************;
> *****************; linux-lvm@redhat.com
> Subject: Re: [linux-lvm] Mounting a read only disk
>
> El 29/01/14 08:58, Angel L. Mateo escribi�:
> > El 28/01/14 16:22, Fran Garcia escribi�:
> >> hola Angel,
> >>
> >> you need to present your snapshot as a RW LUN ; otherwise
> you won't be
> >> able to activate the VG.
> >>
> >> As you should be writing your metadata to the snapshot the
> original data
> >> will remain unharmed.
> >>
> > Ok. I'm going to try it. Thank you.
> >
> >
> It works now with RW LUNs. Thank you very much.
>
> --
> Angel L. Mateo Mart�nez
> Secci�n de Telem�tica
> �rea de Tecnolog�as de la Informaci�n
> y las Comunicaciones Aplicadas (ATICA)
> http://www.um.es/atica
> Tfo: 868887590
> Fax: 868888337
>
> _______________________________________________
> 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/
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Mounting a read only disk
2014-01-29 11:58 ` Seb A
@ 2014-01-29 12:27 ` Angel L. Mateo
0 siblings, 0 replies; 6+ messages in thread
From: Angel L. Mateo @ 2014-01-29 12:27 UTC (permalink / raw)
To: LVM general discussion and development
El 29/01/14 12:58, Seb A escribi�:
> Glad it's working for you now Angel. I noticed you had exactly the same
> error messages as I did in my post yesterday.
>
> Was there any way of telling from the information you gave, or the output of
> any other command, if the LUNs are RW or RO?
>
In my system, there are messages like:
Jan 28 14:15:25 myotis52fa kernel: [ 1.724926] sd 3:0:2:0: [sdc]
Write Protect is on
--
Angel L. Mateo Mart�nez
Secci�n de Telem�tica
�rea de Tecnolog�as de la Informaci�n
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-29 12:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 12:34 [linux-lvm] Mounting a read only disk Angel L. Mateo
2014-01-28 15:22 ` Fran Garcia
2014-01-29 7:58 ` Angel L. Mateo
2014-01-29 11:45 ` Angel L. Mateo
2014-01-29 11:58 ` Seb A
2014-01-29 12:27 ` Angel L. Mateo
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.