Today, I'm going to post about the How-To to add new disks, create partition on them, create volume groups, and create logical volumes. Also how to map them in LUN [More about it] and access them [right now used the Windows ISCSI initiator]
From the previous article [Here] I have briefed about the installation procedure for Openfiler on virtual machine.
1. First we would need to add new disks to virtual machine.
Click the VM
Right click and go to Edit Setting
Click on Add ==>Click on Disk==> Click Next
Enter Disk Size=1GB, Click Next==>Finish
Please find the screenshot for adding the new disk to existing machine. The procedure may differ depending on the virtualization application like VirtualBox, VMware ESX etc.
2. Continue with the steps and add new disk of 1GB to existing machine. Thus the virtual disks /dev/sdb and /dev/sdc was added.
3. Now currently there are no volume groups available on the server.
4. After the disks are detected we would need to create partitions on it.
[Now the partition type can be Physical Volume or RAID volumes. We are using PV in this case]
For this navigate to Volumes-->Block Devices
Click on /dev/sdb
Navigate to bottom on page, Under Create a partition section
Mode : Primary
Partition Type : Physical Volume
Click on Create
Thus resembling the partition details as show below
5. Proceed with the same procedure on another disk /dev/sdc. Thus resembling the similar partition details as show below
6. Thus we have now created two Physical Volumes [PV] on two disks [namely sdb and sdc].
7. Next after the creation of PV's we should bind them together in a Volume Group [VG].
Navigate to Volumes-->Volume Groups
Under Volume Group Management, we are able to see the newly created PV's.
Name: ISCSI
Selected both the check-box for physical volumes to add
Click on Add volume group
Thus a new VG would be created which is similar to above screen. You may see the PV associated with it by Clicking View member PVs or could delete it using Delete
8. After creation of PV's and VG we are now in position to create Logical Volumes [LV] on them.
Navigate to Volume-->Add Volume
Under “Create a volume” section
Name : iscsi_volume
Volume Description : Volume for ISCSI
Required Space (MB) : 1024 [i.e. 1GB]
Filesystem / Volume type : iSCSI
The same can be verified by checking the Volume Groups again. This time a new VG and its associated LV will be available here.
9. Now only thing left is creation of LUN and mapping of corresponding LV to it so that iSCSI would access it.
For creation of LUN, Navigate to Volumes-->iSCSI Targets
Here you would see that Add button is grayed out. This is due to fact that iSCSI target server service is disabled. To enable the service, navigate to Services and then Click Enable
10. Edit the Target IQN and add a descriptive name rather than bunch of characters.
Target IQN: iqn.2006-01.iscsi
Click on Add
11. Next Click on LUN Mapping
Keep the default values as it is
R/W mode : write-thru
Transfer Mode : blockio
Click on Map
Next we need to provide the ACL so that only selected hosts are able to access the LUN
For this first we need to create a share.
Navigate to System
Under Network Access Configuration
Name : Anirudha
Network/Host : 10.0.0.0
Netmask : 255.0.0.0
Type : Share
Once the share is available, navigate to iSCSI target again. Under Network ACL, select the access name Anirudha as Allow and click Update
12. For accessing the iSCSI target one would require the iSCSI initiator. This was readily available on my Win7 desktop.
Navigate to Start==>Control Panel
Under Administrative Tools, you can find the iSCSI initiator
Click on it
In Target, enter the IP address of the openfiler and click on QuickConnect
It would throw a quickconnect dialog box with the detected LUN [iqn.2006-01.iscsi]
Click Done
This can be verified from openfiler portal
Navigate to Status-->iSCSI Targets
Clicking on View would show you the IP address of the Win7 machine
13. Now to access the new LUN, go to Start==>Run==>diskmgmt.msc
This would launch the Disk Management MMC and would launch a dialog box for Initialize Disk
Clicking OK would initialize the disk and make it available for formatting on the system
Right Click the new disk [1GB] and Click Simple Volume
Enter 500 in Simple volume size in MB, Click Next
Assign the Driver Letter : F [This might differ in your case]
Format the system using default settings
NTFS, Quick Format
After the disk is initialized, it is shown as In Use in openfiler portal
Now the new disk could be used as a local disk on the system.
Next article would be about taking the snapshots on the existing volume and mounting the same so as to view the contents of its
No comments:
Post a Comment