iSCSI initiator setup CentOS,Oracle,Redhat Linux

iSCSI initiator setup CentOS,Oracle,Redhat Linux

iSCSI initiator setup CentOS,Oracle,Redhat Linux

Let’s assume we are going to connect a SAN Volume or LUN to Linux. How do we go about doing that, how do we even add disks for that matter? This tutorial well take you through all the steps. ** PLEASE NOTE WE ARE NOT RESPONSIBLE FOR ANY DATA LOSS **

login, and su to root

Running yum install iscsi-initiator-utils as root to install the Linux iSCSI initiator

first we need to install iscsi initiator tools

Installing iscsi-initiator-utils with yum

we obviously want to start the service, and make sure it starts after a reboot

chkconfig iscsid on and service iscsid start

from here you want to get the targets from the SAN (replace 192.168.1.28 with your SAN’s IP address)

iscsiadm -m discovery -t sendtargets command against the SAN IP

from here we found two targets, as expected

service iscsid restart output

make sure you can do a restart of the iSCSI initiator service

Restarting the iSCSI initiator service

now if we do fdisk -l, we should see our new /dev/sdb that’s about 85GB

sweet

fdisk -l showing the new 85.9 GB iSCSI disk /dev/sdb

from here we need to format/partition

fdisk /dev/sdb command

m for help

fdisk help menu listing commands

from where we are going to hit “n” for new partition

fdisk n command creating a new primary partition

from here we need to change the partition type

fdisk t command setting the partition type

from here we are going to select type 83 for Linux

from here we do some checks, and use w to save/quit

from here we are going to create a physical volume on /dev/sdb1

pvcreate /dev/sdb1 creating an LVM physical volume

now we just have to make the filesystem

mke2fs /dev/sdb1 command creating the filesystem

done!

mke2fs output finishing inode tables and superblocks

now we need an area to mount this drive

Running mkdir /mnt/SAN1 to create the mount point for the iSCSI SAN volume

mount the volume by editing /etc/fstab

/etc/fstab entry mounting /dev/sdb1 on /mnt/SAN1

save + quit

do mount -a (will re-mount ALL FILESYSTEMS)

Running mount -a to mount the iSCSI disk from /etc/fstab

from there df -h to verify it’s mounted

df -h | grep sdb showing the iSCSI volume mounted on /mnt/SAN1

Done! That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Related guides: Expand SAN LUN Oracle Linux 6 | Mount SAN Volume Oracle Linux

Leave a Reply

Your email address will not be published. Required fields are marked *