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

Re: Sharing LVM storage



 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').


> 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.


> 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.

Reco


Reply to: