Lustre: Installing and setting up a RobinHood server (RBH)

From Define Wiki
Revision as of 12:28, 22 March 2016 by David (talk | contribs)
Jump to navigation Jump to search

Enabling the HSM Coordinator for an Existing File System

The HSM Coordinator can be enabled at any time after a file system has been created, provided that the file system is based on Lustre 2.5.0 or newer, the Metadata service is online, and the MDT and MGT are mounted.

  1. Log into Intel® Manager for Lustre dashboard as a superuser.
  2. Navigate to the File Systems window: Click Configuration > File Systems.
  3. Select the file system for which HSM support is to be enabled from the list of file systems.
  4. Under Metadata Target, click the name of the metadata target.
  5. Click the Advanced tab and look for the property hsm_control.
  6. Enter the string enabled into the text field.
  7. Click the Apply button. The background will briefly flash to grey then back to white to indicate that the setting has been applied. Click Close when done.

Verifying the Current Status of the Coordinator

The most reliable way to verify the status of the HSM Coordinator process is to log into the metadata server that currently has the MDT mounted. Then enter the following command:

 lctl get_param mdt.*.hsm_control

For example:

  [root@mds2 ~]#  lctl get_param mdt.*.hsm_control
  mdt.lfs-MDT0000.hsm_control=stopped
  # Go perform the step above
  [root@mds2 ~]#  lctl get_param mdt.*.hsm_control
  mdt.lfs-MDT0000.hsm_control=enabled

Configure MDS Changelogs

Robinhood relies on the MDT Changelogs feature in Lustre in order to track changes to the file system. The Changelog records changes to the file system's metadata, such as creating and deleting files, modifying a file's content, ownership, permissions, and other attributes. Robinhood captures this data and stores it in a MySQL database for processing by its policy engine. Applications that want to consume the Changelogs content need to register with the MDT, which will return a unique identifier, referred to as a userid. This is not the same as a UNIX user account identifier; it is internal to Lustre and is a token used to distinguish registrations from multiple consumers. Each registered userid has its own view of the Changelog register. Changelog entries are kept until each registered user has acknowledged that the entry has been consumed.

# on server with MGT mounted / also assumes only one FSname (used a * for fsname below)
[root@mds2 ~]# lctl get_param  mdd.*-MDT*.changelog_mask 
mdd.lfs-MDT0000.changelog_mask=    
MARK CREAT MKDIR HLINK SLINK MKNOD UNLNK RMDIR RENME RNMTO OPEN LYOUT TRUNC SATTR XATTR HSM MTIME CTIME 
[root@mds2 ~]# lctl set_param  -Pmdd.*-MDT*.changelog_mask="all-XATTR-MARK-ATIME"
mdd.lfs-MDT0000.changelog_mask=all-XATTR-MARK-ATIME 
[root@mds2 ~]# lctl get_param  mdd.*-MDT*.changelog_mask
mdd.lfs-MDT0000.changelog_mask= 
CREAT MKDIR HLINK SLINK MKNOD UNLNK RMDIR RENME RNMTO OPEN CLOSE LYOUT TRUNC SATTR HSM MTIME CTIME 
# so the word MARK seems to be removed and XATTR 
# Note; If you run without the -P, the changes wont be persistent (and without the -P you can run on the MDS)

Register a Changelog user identifier on the MDS and keep a record of the name of the userid that is returned (normally this will be "cl1", unless there is more than one Changelog registration):

# lctl --device <fsname>-<MDT index> changelog_register
[root@mds2 ~]# lctl --device lfs-MDT0000 changelog_register 
lfs-MDT0000: Registered changelog userid 'cl1'
# Note; This is not a UNIX user account; it is an identifier used to track Lustre changelog events.

Setup the RobinHood Server (RBH)

Provision the server through the IML Interface; - Configuration -> Servers -> Add Servers -> Enter details -> Add -> Select the profile to Deploy (Robinhood policy engine)

Quick note; I got an error about a file initramfs-.img missing so created a symlink to get around this. Its as if the installer isnt picking the kernel version installed.