Quoting Pierre-Alain RIVIERE <[EMAIL PROTECTED]>:
I'd really prefer to avoid mounting the volume before backing it up.
And in the case I should proceed the way you describe, there's
something I missed about LVM volumes I think.
I've just proceed some tests: create a snapshot of a LVM volume and try
to back it up after mounting the volume. But then, I don't understand
how to proceed to mount my partitions. I think my LVM snapshot volume
is OK as I can use fdisk on it to list the disk partitions
# fdisk -l /dev/XenDomains/of.snapshot.ares.bac
Disk /dev/XenDomains/of.snapshot.ares.ippon.fr.bac: 7851 MB, 7851737088 bytes
242 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15004 * 512 = 7682048 bytes
Device Boot Start
End Blocks Id System
/dev/XenDomains/of.snapshot.ares.bac1 * 1 781
5859031 83 Linux
/dev/XenDomains/of.snapshot.ares.bac2 782 848
502634 83 Linux
<snip>
But when I want to mount the partitions (here there's 3 partitions to
be back up), I don't know which device to use.
/dev/XenDomains/of.snapshot.ares.bac is a disk and I don't find the
devices for the disk partitions (/dev/XenDomains/of.snapshot.ares.bac#
do not exist).
What did I miss?
I must really export the snapshot via iSCSI before being able to mount
its partitions?
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 ))
Let's me clarify just to be sure I understand. You suggest to export
one big SCSI volume and attach it to the dom0. And then use LVM on the
dom0 to create logical volumes for domU.
I'm OK with this solution - it's easier to implement and as you said
reduces the load on the servers -, but I have several dom0 and wish
them to have the capability to make live migration. In this case I
should also use CLVM to propagate LVM metadata modification, no?
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
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Openfiler-users mailing list
[email protected]
https://lists.openfiler.com/mailman/listinfo/openfiler-users