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

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 8 minutes.
Find all files bigger than 100MB and write their names into the /root/results.txt file.

RHCE7: Task of the day

Allowed time: 10 minutes.
Change the SSH process configuration to only listen on the 443 port.

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 ...