23.07.2014 Views

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

27.1 Expanding the Filesystem by Adding<br />

OSTs<br />

To add OSTs to existing <strong>Lustre</strong> filesystems:<br />

1. Add a new OST by passing on the following commands, run:<br />

$ mkfs.lustre --fsname=spfs --ost --mgsnode=mds16@tcp0 /dev/sda<br />

$ mkdir -p /mnt/test/ost0<br />

$ mount -t lustre /dev/sda /mnt/test/ost0<br />

2. Migrate the data (possibly).<br />

The filesystem is quite unbalanced when new empty OSTs are added. New file<br />

creations are automatically balanced. If this is a scratch filesystem or files are<br />

pruned at a regular interval, then no further work may be needed. Files existing<br />

prior to the expansion can be rebalanced with an in-place copy, which can be<br />

done with a simple script.<br />

The basic method is to copy existing files to a temporary file, then move the temp<br />

file over the old one. This should not be attempted with files which are currently<br />

being written to by users or applications. This operation redistributes the stripes<br />

over the entire set of OSTs. For a sample data migration script, see A Simple Data<br />

Migration Script.<br />

A very clever migration script would do the following:<br />

■<br />

■<br />

■<br />

■<br />

Examine the current distribution of data.<br />

Calculate how much data should move from each full OST to the empty ones.<br />

Search for files on a given full OST (using lfs getstripe).<br />

Force the new destination OST (using lfs setstripe).<br />

■ Copy only enough files to address the imbalance.<br />

If a <strong>Lustre</strong> administrator wants to explore this approach further, per-OST diskusage<br />

statistics can be found under /proc/fs/lustre/osc/*/rpc_stats<br />

27-2 <strong>Lustre</strong> <strong>1.6</strong> <strong>Operations</strong> <strong>Manual</strong> • September 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!