This hands-on lab describes using an iSCSI initiator and targets to mount devices.
>**Note:** The hands-on lab videos mention the LPI Certificate Level 2 Exam 1, but this lab can be taken as a stand-alone lab.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Install the iSCSI Software
Install the
scsi-target-utils
package.- Select an Available Disk for Use
Use the
fdisk -l
command and examine which disks can be used.Note: There are muliple 21.5GB disks, but you only need to take note of one of them.
- Configure the Target Server to Share the Chosen Device
Configure the server:
- Edit the
targets.conf
and define the target. - Start the service.
- Enable service for start on system boot.
- Edit the
Verify that the device share is available for use.
Note: There is only one server for this hands-on lab, so the server supplied is both target and client.
- Install and Configure the iSCSI Initiator (Client)
- Configure the client initiator.
Note: This is the same server due to only one server being supplied for this hands-on lab).
- Use the
iscsiadm
command to discover the resource you can use on the target system. - Restart the iscsi service.
- Use the
/etc/init.d/iscsi status
command to obtain information about the block storage device.
- Configure the client initiator.
- Partition and Format the New Block Device
- Partition the new block device.
- Format it as ext4.
- Mount the New Block Device
Mount the new remote block device onto the filesystem.
- Configure the System to Mount on Boot
Add the device onto the local filesystem via additions to the
/etc/fstab
file.