You can create LUNs (or alter existing LUNs) on a NetApp filer using the lun command. Specifically, LUNs are created using the lun create command along with a boatload of switches. Here's an example of a complete command:
lun create -s (size) -t (type) (LUN path)
The -s switch designates the size of the LUN and uses the format of (size)(unit), so 40g would create a 40GB LUN and 20m would create a 20MB LUN. LUN type will generally be linux on a Linux box or windows on a Windows box using MBR, but here are a few others that are common:
windows - Creates a Windows partition using a Master Boot Record, or MBR.
windows_gpt - Creates a Windows partition using a GUID Partition Table, or GPT.
vmware - Creates a VMware partition.
xen - Creates a Citrix Xen partition.
hyper_v - Creates a Microsoft Hyper-V partition.
Finally, the LUN Path is the location of the volume.
For example, let's assume you want to create a 40MB LUN for a Linux system located in /vol/test_1a/lun40. You might scoff at such a small LUN size, but I find it handy to make a bunch of small LUNs of varying sizes (e.g. 10MB, 20MB, 30MB, 40MB, etc) and serve one from each controller whenever I stand up a new storage system. This helps me quickly identify path isues such as bad fiber and defective HBAs because I can quickly see which LUNs aren't visible as I scan the HBAs on each host. The command to create this LUN from a Linux host is as follows:
lun create -s 40m -t linux /vol/test_1a/lun40
If you want to get a bit fancier, you can see the whole list of lun command switches here:
Comments