OpenFiler

From vwiki
Revision as of 10:27, 9 November 2009 by Sstrutt (talk | contribs) (Initial creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Set-up

Installation

  1. Download the appropriate appliance from OpenFiler
  2. Extract, upload to your ESX and Add to Inventory, and start
  3. The machine will attempt use DHCP to assign an IP
  4. Browse to the machine, and login using openfiler/password
  5. If change IP option doesn't appear on System page, attempt following fix
    1. Login to console of VM (root, no password)
    2. Change line 94 of /opt/openfiler/var/www/includes/network.inc to
    3. exec("sudo ifconfig -a | grep 'eth'",$output);

Create iSCSI Disk

  1. Login to OpenFiler (user/pass openfiler/password)
  2. First create a partition...
    1. Go to Volumes, and to the Create a new volume group section
    2. Click on the create new physical volumes link
    3. In the resulting Block Device Management page, edit the disk that we want to create the iSCSI storage on.
    4. Find the Create a partition in /dev/sdx section and hit Create (default options)
  3. Then create a volume group for iSCSI use...
    1. Go to Volume Groups (right-hand menu) and find the Create a new volume group section
    2. Give the volume group a name (eg volgrp1), select the partition/physical volume and hit Add volume group
    3. Click on the create new physical volumes link
    4. Go to Add Volume, and find the Create a volume in volgrp section
    5. Give the volume a name (eg iSCSIvolgrp), select all space, change Filesystem to iSCSI, and hit Create
  4. Create network share
    1. On System tab, find Network Access Configuration
    2. Add in the OpenFiler's IP address, etc, and hit Update
  5. Enable iSCSI target
    1. On Services tab, Enable iSCSI target server


Troubleshooting

Failed to get disk partition information

To fix "Failed to get disk partition information" error when mounting iSCSI partition, see this fix.

[root@labesx-1 /]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         140     1124518+  83  Linux
/dev/sda2             141         154      112455   fc  VMware VMKCORE
/dev/sda3             155        2610    19727820    5  Extended
/dev/sda5             155        2610    19727788+  fb  VMware VMFS

Disk /dev/sdb: 7973 MB, 7973371904 bytes
255 heads, 63 sectors/track, 969 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          76      610438+  82  Linux swap / Solaris
/dev/sdb2              77         331     2048287+  83  Linux
/dev/sdb3             332         969     5124735    5  Extended
/dev/sdb5             332         969     5124703+  83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 217.9 GB, 217968541696 bytes
256 heads, 63 sectors/track, 26396 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       26397   212860927+  ee  EFI GPT
[root@labesx-1 /]# fdisk /dev/sdc

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


The number of cylinders for this disk is set to 26396.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdc: 217.9 GB, 217968541696 bytes
256 heads, 63 sectors/track, 26396 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       26397   212860927+  ee  EFI GPT

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/sdc: 217.9 GB, 217968541696 bytes
256 heads, 63 sectors/track, 26396 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): p

Disk /dev/sdc: 217.9 GB, 217968541696 bytes
256 heads, 63 sectors/track, 26396 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-26396, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-26396, default 26396):
Using default value 26396

Command (m for help): p

Disk /dev/sdc: 217.9 GB, 217968541696 bytes
256 heads, 63 sectors/track, 26396 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       26396   212857312+  83  Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fb
Changed system type of partition 1 to fb (VMware VMFS)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.