Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Mounting LUNs in RHEL 4 ...

SOLVED
Go to solution
skhan
Occasional Advisor

Mounting LUNs in RHEL 4 ...

Hi,

The RHEL 4 node is connected to HP MSA1000 Storage through switch.
I can see the luns in /proc/scsi/scsi file.
How to use/mount them or present the LUNs to Linux box?

Answers will be really appreciated by quick numbers.

Thanks
3 REPLIES
Ivan Ferreira
Honored Contributor
Solution

Re: Mounting LUNs in RHEL 4 ...

You must first check if you can see the disk with:

fdisk -l

The new disk will show that "it does not contain a valid partition table"

In the simple form, you must partition, create a file system, and mount it.

For example, if sdb is your new disk

Partition the disk:
fdisk /dev/sdb
n
p
1
ENTER
ENTER
w

Reload partition table:
partprobe

Create the file system:
mkfs -t ext3 /dev/sdb1
tune2fs -c 0 -m 0 -i 0 /dev/sdb1

Mount:

mkdir /mount_point
mount /dev/sdb1 /mount_point

If you can go further, you may use LVM, but requieres additional job and better understanding of the whole process.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
skhan
Occasional Advisor

Re: Mounting LUNs in RHEL 4 ...

Thanks Ivan Ferreira,

One more question?

how to auto mount the disk/mountpoint every os boot time?

Maaz
Valued Contributor

Re: Mounting LUNs in RHEL 4 ...

>Create the file system:
>mkfs -t ext3 /dev/sdb1
>tune2fs -c 0 -m 0 -i 0 /dev/sdb1

If you have followed Ivan Ferriera's above instructions, then open the terminal and open a file "fstab" which is located inside "/etc" directory, do

# gedit /etc/fstab
and append/add the following line
/dev/sdb1 /storage ext3 _netdev,rw,auto 1 2

save and exit from the file

Now create a directory,
# mkdir /storage
then
# mount -a

now execute
# df -hT
the last line of the output will be
/dev/sdb1 ext3 total_size used remaining percentage_used /storage

Now reboot the system, then run "df -hT" to check /dev/sdb1 is mounted on /storage.

Regards