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

Re: Sharing LVM storage

On Tue, 14 Apr 2015 18:14:31 +0300
Reco <recoverym4n@gmail.com> wrote:

>  Hi.
> On Tue, Apr 14, 2015 at 04:01:02PM +0200, Petter Adsen wrote:
> > I'm using LVM as storage for virtual machines, and would like to
> > share a PV between two machines with iSCSI to be able to migrate
> > the VM's.
> I did the thing some time ago. It worked, although I used ietd and not
> today's tgtd. The main reason was - ietd had configuration file, tdtd
> had not (as in 'our daemon does not need config at all, use tdtadm').

I've already set up iSCSI, and went with ietd, too. To be fair, I
didn't know about tgtd :)

> > Wikipedia says this:
> > "The LVM will also work in a shared-storage cluster (where disks
> > holding the PVs are shared between multiple host computers), but
> > requires an additional daemon to propagate state changes between
> > cluster nodes."
> > 
> > But nothing else. Is the clvm (with dependencies) package
> > everything I need to do this? Or would I need to mess with all
> > sorts of clustering stuff to get that working?
> Not strictly as the main role of clvm is to guarantee that one LV will
> always be used by one node. Secondary role of clvm is to handle LV
> addition and removal by principle of least surprise. I.e. lvcreate on
> node one should add the same LV on node two.

That sounds reasonable.

> > I just want to try it out to see how it works, it's not something I
> > need by any stretch of the imagination, so there's a limit to how
> > far down that rabbit-hole I want to go.
> As long as you don't forget to run lvscan on partner node after doing
> basically anything with LV on main node - you should be OK.
> But just to be on the safe side - don't export PV via iSCSI. Export
> LVs.

May I ask why, so I don't mess anything up? I was thinking of exporting
maybe my VM VG, so that all LV's for VM's were available to both
machines. Or just the device itself.

Thank you for the advice!


"I'm ionized"
"Are you sure?"
"I'm positive."

Attachment: pgp6qoxRo3ZQ6.pgp
Description: OpenPGP digital signature

Reply to: