Upstream contributing: Difference between revisions

From Lustre Wiki
Jump to navigation Jump to search
(First cut on how to get upstream code and build it)
(add line breaks)
Line 12: Line 12:
With the lustre client source tree available the next step will be configuring your kernel to enable Lustre. The easiest way to configure a kernel is to run make menuconfig. If this fails it most likely is due to the missing libncurses library that is required. Running the make menuconfig will present you the top level menu. The section for Lustre is located in the Device Drivers section:
With the lustre client source tree available the next step will be configuring your kernel to enable Lustre. The easiest way to configure a kernel is to run make menuconfig. If this fails it most likely is due to the missing libncurses library that is required. Running the make menuconfig will present you the top level menu. The section for Lustre is located in the Device Drivers section:


< > Volume Management Device Driver
< > Volume Management Device Driver<br>
[*] Networking support  --->
[*] Networking support  ---><br>
Device Drivers  --->
Device Drivers  ---><br>
Firmware Drivers  --->
Firmware Drivers  ---><br>


Once in the Device Drivers menu you want to enable the Staging driver menu as shown here:
Once in the Device Drivers menu you want to enable the Staging driver menu as shown here:


Virtio drivers  --->
Virtio drivers  ---><br>
Microsoft Hyper-V guest support  ----  
Microsoft Hyper-V guest support  ----<br>
[*] Staging drivers  --->  
[*] Staging drivers  ---><br>
[ ] X86 Platform Specific Device Drivers  --->
[ ] X86 Platform Specific Device Drivers  ---><br>


Enable the staging driver allows you to display the options of that menu. Scroll down to the Staging drivers option and hit enter to go to the Staging menu.
Enable the staging driver allows you to display the options of that menu. Scroll down to the Staging drivers option and hit enter to go to the Staging menu.
In the menu you will see:
In the menu you will see:


< >  GCT GDM724x LTE support
< >  GCT GDM724x LTE support><br>
< >  TTY over Firewire
< >  TTY over Firewire<br>
< >  Lustre networking subsystem (LNet)
< >  Lustre networking subsystem (LNet)<br>
< >  Digi Neo and Classic PCI Products
< >  Digi Neo and Classic PCI Products<br>


You want to select Lustre networking subsystem which will in turn enable several other options.
You want to select Lustre networking subsystem which will in turn enable several other options.


< >  GCT GDM724x LTE support
< >  GCT GDM724x LTE support<br>
< >  TTY over Firewire
< >  TTY over Firewire<br>
<M>  Lustre networking subsystem (LNet)
<M>  Lustre networking subsystem (LNet)<br>
  (1048576) Lustre lnet max transfer payload (default 1MB)  
  (1048576) Lustre lnet max transfer payload (default 1MB)<br>
<M>    Lustre networking self testing
<M>    Lustre networking self testing<br>
<M>    LNET infiniband support
<M>    LNET infiniband support<br>
<M>    Lustre file system client support  
<M>    Lustre file system client support<br>
(8192)    Lustre obd max ioctl buffer bytes (default 8KB)     
(8192)    Lustre obd max ioctl buffer bytes (default 8KB)<br>    
[ ]      Enable Lustre DEBUG checks
[ ]      Enable Lustre DEBUG checks<br>
<M>      Lustre virtual block device
<M>      Lustre virtual block device<br>
< >  Digi Neo and Classic PCI Products  
< >  Digi Neo and Classic PCI Products<br>
< >  Xilinx FPGA firmware download module
< >  Xilinx FPGA firmware download module<br>


These default values will be enough to get you on your way to building a lustre client. Help sections are provided for all the entries to help you understand your options.
These default values will be enough to get you on your way to building a lustre client. Help sections are provided for all the entries to help you understand your options.

Revision as of 13:03, 24 March 2016

Getting started

The upstream Lustre client code is currently hosted in the staging area of the linux kernel tree. All current efforts for the upstream client are done with the git staging repo and that work then goes into Linus's tree during the merge window shortly after a Linux kernel release is cut. The git staging tree has several branches but the one of interest for contributing is the staging-testing branch. Any patches created against the other branches will likely not even apply correctly so please ensure you are working and testing with the staging-testing branch. Before we can start developing patches we need to obtain the source repo, build and install the Lustre enabled kernel with the proper utilities. The steps to getting started are listed below. In my example I named by git repo top directory lustre-upstream but you can name it whatever you want.

cd your-work-directory git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git lustre-upstream cd lustre-upstream git checkout -b staging-testing origin/staging-testing

Kernel configuration

With the lustre client source tree available the next step will be configuring your kernel to enable Lustre. The easiest way to configure a kernel is to run make menuconfig. If this fails it most likely is due to the missing libncurses library that is required. Running the make menuconfig will present you the top level menu. The section for Lustre is located in the Device Drivers section:

< > Volume Management Device Driver
[*] Networking support --->
Device Drivers --->
Firmware Drivers --->

Once in the Device Drivers menu you want to enable the Staging driver menu as shown here:

Virtio drivers --->
Microsoft Hyper-V guest support ----
[*] Staging drivers --->
[ ] X86 Platform Specific Device Drivers --->

Enable the staging driver allows you to display the options of that menu. Scroll down to the Staging drivers option and hit enter to go to the Staging menu. In the menu you will see:

< > GCT GDM724x LTE support>
< > TTY over Firewire
< > Lustre networking subsystem (LNet)
< > Digi Neo and Classic PCI Products

You want to select Lustre networking subsystem which will in turn enable several other options.

< > GCT GDM724x LTE support
< > TTY over Firewire
<M> Lustre networking subsystem (LNet)

(1048576) Lustre lnet max transfer payload (default 1MB)

<M> Lustre networking self testing
<M> LNET infiniband support
<M> Lustre file system client support
(8192) Lustre obd max ioctl buffer bytes (default 8KB)
[ ] Enable Lustre DEBUG checks
<M> Lustre virtual block device
< > Digi Neo and Classic PCI Products
< > Xilinx FPGA firmware download module

These default values will be enough to get you on your way to building a lustre client. Help sections are provided for all the entries to help you understand your options. Once you have made your selections then the normal build process of make bzImage and make modules on x86 machines will produce the lustre client modules. For other platforms or if you want to create debian or rpm packages please consult freely available documentation about kernel building on the web. Also feel free to ask for help on the lustre-devel mailing list. Once your kernel is ready just install it as you normally would a new kernel and reboot.

Building the Lustre utilities

To use the lustre upstream client properly you will need to install the lustre utilities rpm.