Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   [dm-devel] Use LVM on /dev/mapper/diskname (http://www.linux-archive.org/device-mapper-development/648-dm-devel-use-lvm-dev-mapper-diskname.html)

11-19-2007 04:22 PM

[dm-devel] Use LVM on /dev/mapper/diskname
 
Tore Anderson [tore@linpro.no] wrote:
> * S. J. van Harmelen
>
> > I have a couple of LUN's that are handled by the multipath driver.
> > This works great, but now I want to use LVM so I can take snapshots
> > of one LUN to another LUN.
> >
> > Can someone tell me how to do this?
> >
> > When I do pvcreate /dev/mapper/diskname I get an error that the disk
> > is already part of an volume group. But I sertainly did not configure
> > that.
> >
> > Can it be that the multipath driver of devmapper did that?
>
> If you have a PV signature on the volume, LVM might have used one of the
> paths instead of using the multipath'ed device under /dev/mapper. You
> should be able to check this by running the command "pvs" - it should
> list all the detected PVs on your system.

If LVM uses single pathed disks like /dev/sda, then multipath can't use
the same path to make a multipathed device, right? My guess is that
/dev/mapper/multipath-name is indeed part of the LVM in your case. I
would like to know what happened otherwise. Thank you.

--Malahal.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"S. J. van Harmelen" 11-19-2007 05:13 PM

[dm-devel] Use LVM on /dev/mapper/diskname
 
On Mon, 2007-11-19 at 09:22 -0800, malahal@us.ibm.com wrote:
> Tore Anderson [tore@linpro.no] wrote:
> > * S. J. van Harmelen
> >
> > > I have a couple of LUN's that are handled by the multipath driver.
> > > This works great, but now I want to use LVM so I can take snapshots
> > > of one LUN to another LUN.
> > >
> > > Can someone tell me how to do this?
> > >
> > > When I do pvcreate /dev/mapper/diskname I get an error that the disk
> > > is already part of an volume group. But I sertainly did not configure
> > > that.
> > >
> > > Can it be that the multipath driver of devmapper did that?
> >
> > If you have a PV signature on the volume, LVM might have used one of the
> > paths instead of using the multipath'ed device under /dev/mapper. You
> > should be able to check this by running the command "pvs" - it should
> > list all the detected PVs on your system.
>
> If LVM uses single pathed disks like /dev/sda, then multipath can't use
> the same path to make a multipathed device, right? My guess is that
> /dev/mapper/multipath-name is indeed part of the LVM in your case. I
> would like to know what happened otherwise. Thank you.

I already send this in a reply to the list, but will mail it to you
directly in case you missed it:

I executed the pvs command and it did find a few partitions. I use iSCSI
to share the LUN's to a XenSource server (I use the /dev/mapper/diskname
as sharing point for iSCSI), and XenSource creates the PV's
and LV's in order to provision VM's. Didn't think of that, but that's on
the disk of course.

Here's the output of pvs:

root@storage:~# pvs
/dev/sdc: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdf: read failed after 0 of 4096 at 0: Input/output error
/dev/sdi: read failed after 0 of 4096 at 0: Input/output error
PV VG Fmt
Attr PSize PFree
/dev/sde VG_XenStorage-755d6649-e770-6f01-5e17-fd7f8dcd8651 lvm2 a-
199.99G 185.49G

The four disks that give a "read failed" error are the redundant disk,
so this is no problem.

Now is there any way to configure snapshots for these already created
LVM partitions? Or do I have to whipe the disk clean (rather not do
that, but if I have to it can be done), then create the pv's and lv's
and then share the lv's true iSCSI?

In that case XenSource will again create pv's and lv's in the shared lv.
Ain't that a problem?

Sander

>
> --Malahal.
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

"S. J. van Harmelen" 11-19-2007 05:16 PM

[dm-devel] Use LVM on /dev/mapper/diskname
 
P.S. When I run pvscan I get this output:

root@storage:~# pvscan
/dev/sdc: read failed after 0 of 4096 at 0: Input/output error
/dev/sdc: read failed after 0 of 4096 at 214748299264: Input/output
error
/dev/sdc: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 214748299264: Input/output
error
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdf: read failed after 0 of 4096 at 0: Input/output error
/dev/sdf: read failed after 0 of 4096 at 214748299264: Input/output
error
/dev/sdf: read failed after 0 of 4096 at 0: Input/output error
/dev/sdi: read failed after 0 of 4096 at 0: Input/output error
/dev/sdi: read failed after 0 of 4096 at 214748299264: Input/output
error
/dev/sdi: read failed after 0 of 4096 at 0: Input/output error
PV /dev/dm-0 VG VG_XenStorage-755d6649-e770-6f01-5e17-fd7f8dcd8651
lvm2 [199.99 GB / 185.49 GB free]
Total: 1 [199.99 GB] / in use: 1 [199.99 GB] / in no VG: 0 [0 ]

So here it does see the dm-0? Please advice...

Sander


On Mon, 2007-11-19 at 09:22 -0800, malahal@us.ibm.com wrote:
> Tore Anderson [tore@linpro.no] wrote:
> > * S. J. van Harmelen
> >
> > > I have a couple of LUN's that are handled by the multipath driver.
> > > This works great, but now I want to use LVM so I can take snapshots
> > > of one LUN to another LUN.
> > >
> > > Can someone tell me how to do this?
> > >
> > > When I do pvcreate /dev/mapper/diskname I get an error that the disk
> > > is already part of an volume group. But I sertainly did not configure
> > > that.
> > >
> > > Can it be that the multipath driver of devmapper did that?
> >
> > If you have a PV signature on the volume, LVM might have used one of the
> > paths instead of using the multipath'ed device under /dev/mapper. You
> > should be able to check this by running the command "pvs" - it should
> > list all the detected PVs on your system.
>
> If LVM uses single pathed disks like /dev/sda, then multipath can't use
> the same path to make a multipathed device, right? My guess is that
> /dev/mapper/multipath-name is indeed part of the LVM in your case. I
> would like to know what happened otherwise. Thank you.
>
> --Malahal.
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 05:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.