How to add a FiberChannel LUN on a compute node

Instruction to mount a FC Lun via FiberChannel on a compute node and mount with LVM on /var/lib/nova/instances

apt-get update

apt-get install multipath-tools-boot

Individuare il wwid dei dischi /dev/sda e /dev/sdb con il comando:

lib/udev/scsi_id –whitelisted –device=/dev/sda

vi /etc/multipath.conf <- inserire wwid

service multipath-tools restart

update-initramfs -u -k all

echo “1” > /sys/class/fc_host/host1/issue_lip

echo “1” > /sys/class/fc_host/host8/issue_lip

multipath -l

fdisk -l

vi /etc/multipath.conf

parted /dev/mapper/mpatha

mklabel gpt mkpart primary 0% 100% print quit

pvcreate /dev/mapper/mpatha1

pvs

vgcreate -h

vgcreate vg1 /dev/mapper/mpatha1

vgs

lvcreate -L 2900G -n lvnova vg1

vgs

mkfs.xfs /dev/vg1/lvnova

mv /var/lib/nova /var/lib/nova2

vi /etc/fstab

# edito: /dev/vg1/lvnova /var/lib/nova xfs defaults,noatime,nodiratime,swalloc,largeio,allocsize=4096k,logbsize=256k 0 0

mkdir /var/lib/nova

mount -a

df

rsync -av –progress /var/lib/nova2/ /var/lib/nova/

ls /var/lib/nova/instances/ -l