SYS: Configure a system as an iSCSI initiator that persistently mounts an iSCSI target.

Share this link

In order to test an iSCSI initiator, you will need to configure an iSCSI target.

Install the following package:

# yum install -y iscsi-initiator-utils

Discover the available iSCSI targets from your already installed ‘targetserver‘:

# iscsiadm -m discoverydb -t st -p targetserver -D

Start the iSCSI service:

# service iscsi start

Retrieve the new iSCSI disk name (here /dev/sda):

# grep "Attached SCSI" /var/log/messages
Nov 22 10:28:38 testvm kernel: sd 2:0:0:1: [sda] Attached SCSI disk

Create a file system on this disk:

# mkfs.ext4 /dev/sda

Note: if you are connecting remotely, set up a console access before.

Retrieve the UUID of this disk:

# blkid | grep "/dev/sda"

Add the disk UUID to the /etc/fstab file:

# echo "UUID=..." >> /etc/fstab

Edit the /etc/fstab file and add mount point, file system type and mount options (_netdev):

UUID=... /mnt ext4 _netdev 0 0

You can additionally read this very interesting Linux Journal’s article about iSCSI & RHEL 6 certification.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

RHCSA7: Task of the day

Allowed time: 3 minutes.
Check that you've got no SELinux policy violations.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a httpd virtual server called "dummy" with DocumentRoot assigned to /opt.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...