Add new OST using a loopback device

From Wiki
Jump to: navigation, search

While not ideal for performance you can use a loopback device as a lustre object storage target. This may be necessary if you are stuck on a platform where partitions cannot be resized.

First, create the data file.

mkdir -p /home/data
dd if=/dev/zero of=/home/data/ost.bin bs=1M seek=137000 count=1

Next create a loop device.

losetup /dev/loop0 /home/data/ost.bin

You will also want to add this to /etc/rc.local

Format the device.

mkfs.lustre --ost --fsname=lustre --mgsnode=10.38.65.4@tcp1 /dev/loop0

Mount.

mkdir /mnt/ost3
mount -t lustre /dev/loop0 /mnt/ost3