Errol Neal wrote:
Quoting Pierre-Alain RIVIERE <[EMAIL PROTECTED]>:


You'll need to mount it using the offset option. Use sfdisk -l -uS /dev/XenDomains/of.snapshot.ares.bac

Find out where your partitions start. Mount volume with offset=$(( 512*starting_sector ))

Thanks! I didn't not this usage. That's seems much easier now.


----
You should not need clvm. Best practices here are to use udev rules to make sure you get consistent naming across your dom0 for iscsi disks.

Put this into /etc/udev/rules.d/55-openiscsi.rules (it's one line):

KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/iscsidev.sh
%b",SYMLINK+="iscsi/%c/part%n"


And this script as /etc/udev/scripts/iscsidev.sh (+chmod 755):

#!/bin/sh

BUS=${1}
HOST=${BUS%%:*}

[ -e /sys/class/iscsi_host ] || exit 1

file="/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/targetname"

target_name=$(cat ${file})

# This is not an open-scsi drive
if [ -z "${target_name}" ]; then
   exit 1
fi

echo "${target_name}"

This way, you get persistent names like
/dev/iscsi/<iscsi-target-name...>/part, being a symlink to the right
/dev/sdX.

You can also edit lvm.conf to make sure that only /dev/iscsi/* devices are scanned. I don't run LVM on anything but iSCSI devices on dom0s
In fact I'm using already this naming schema for udev. And when I talked about CLVM it wasn't for its consistent naming features. I remembered myself to have read something (Xen-users may be but I don't have a link right now) about the use of CLVM to propagate LVM modification. To be sure about this, I've just proceed some tests (VMWare is my friend) just before writing this. 3 boxes : 1 openfiler, 2 debian and 1 iSCSI volume from openfiler connected to the 2 debian boxes.

Then I've initialized LVM : pvcreate, vgcreate, lvcreate. All works fine and on the 2 boxes pvdisplay, vgdisplay and lvdisplay outputs are synchronised. But on the kernel side, the modifications are not propagated. On the box where I use LVM, the device is present: /dev/xendomains/testlv. But on the other box (where I didn't neither pvcreate etc), even if I can display LVM metadata using LVM tools (lvdisplay, etc), the kernel do not create the device. And that's where CLVM seems usefull. But CLVM documentation seems to be poor and I don't really know about its debian support. May be there's an easier way to propagate LVM changes?

_______________________________________________
Openfiler-users mailing list
[email protected]
https://lists.openfiler.com/mailman/listinfo/openfiler-users

Reply via email to