Operating System - Linux
1757107 Members
2138 Online
108858 Solutions
New Discussion юеВ

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

 
SOLVED
Go to solution
S.S.
Super Advisor

how to see the LUNS on Linux Server, creation of partitions & filesystems

Hi Experts,

After creation of vdisk on EVA Storage how we can present the LUNS on Linux Server means that how can i see the LUNS on Linux Server?
Kindly give me the steps to present the LUNS on Linux Server and also to create the partitions and filesystems.

Thank you!
8 REPLIES 8
avizen9
Esteemed Contributor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Hello ss
what version linux are you using?
can you try hwbrowser command and verify if lun is created properly it should show a spare hdd there, and you can not down the hardware path, thanks,
Matti_Kurkela
Honored Contributor
Solution

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Presenting the LUNs is done at the storage side. This part of your question might get a better answer from the Storage section of these forums, but usually, you find the WWN(s) of the FibreChannel HBA(s) on your server and configure the storage system to "present this vdisk to these WWNs". I understand this is known as "masking" in the FibreChannel terminology.

If you use EVA CommandView, you can probably first add all the server's WWNs to the CommandView as a "Host" object, then you can use the Host object to present the vdisk(s) to the server as a single operation, even if the server has many HBAs.

There are probably also parameters that identify the type of the host (Linux/Windows/HP-UX 11.31+/HP-UX older/ etc...) or the FC/SCSI features understood by the host, so that the storage's behavior can be tailored to match the capabilities of the host OS. Be sure to set these parameters correctly.

If you have SAN switches, you may also want to configure them, to make sure the server uses sensible paths through your SAN fabric and does not see any devices it isn't supposed to see. I understand this is known as "zoning". I don't know anything about this part, so if you need help in this, you'll have to read your SAN switch documentation or find a storage expert to help you.

After the masking and zoning steps (if necessary) are correctly done, the Linux OS should simply auto-detect the new LUNs as /dev/sd* devices as it boots up. Newer distributions (RHEL 5 and newer) should be able to detect new LUNs automatically even without rebooting; however, this mechanism is not yet perfect and may require manual re-scanning.

See RedHat's Online Storage Reconfiguration Guide:
https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/html/Online_Storage_Reconfiguration_Guide/index.html

It is nominally written for RHEL 5, but the procedures in it should be usable (perhaps with minor changes) in most modern Linux distributions that use a 2.6.* series kernel.

After the LUNs are visible as /dev/sd* devices, the next steps are essentially "do whatever you want/need with them". But usually, if you have more than one HBA or your SAN fabric otherwise presents multiple paths to your LUNs (i.e. you see 2 or more /dev/sd* devices for each LUN), the first step is to implement a multipath solution.

Currently, RedHat's recommendation is to use "device-mapper-multipath", the generic mechanism built in the Linux kernel:
https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/DM_Multipath/index.html

You may also use the storage manufacturer's proprietary multipath software, if you wish and one is available for your OS version.

After that, it really depends on your environment and what you wish to use your LUNs for. You can set up a traditional PC partition table on the LUNs if you want and use them like regular SCSI disks.

If you want to create filesystem(s), the use of LVM is recommended: that would make the on-line management and expansion of those filesystems *much* easier.
If you're unfamiliar with LVM, see RedHat's LVM Administration Guide for an introduction:

https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Logical_Volume_Manager_Administration/index.html

In a mixed Linux/Windows environment, the creation of a traditional PC partition table is usually recommended even if you plan to use LVM. If someone ever makes a mistake in the SAN configuration and presents a Linux LUN to a Windows system, the existence of a partition table indicates to the Windows system that the LUN is already in use, so the "easy and automatic" Windows systems won't overwrite it. If you want to do this, just use fdisk or cfdisk to create a partition that covers the entire LUN, and set its type to "Linux" (83) or "Linux LVM" (8e) as appropriate, then use that partition as a LVM physical volume.

If you're using the LUNs for Oracle databases, you might want to use ASM directly on top of the multipath solution.

MK
MK
S.S.
Super Advisor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Hi MK,
Thank you for your detailed explanation. I will go through your provided docs and learn.
Many thanks!

Hi avizen9,
My Linux version is:
2.6.9-67.0.1.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/Linux

Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

I have tried with you advised command but i have encountered the following error:

# whereis hwbrowser
hwbrowser: /usr/bin/hwbrowser /usr/share/hwbrowser

# /usr/bin/hwbrowser
Traceback (most recent call last):
File "/usr/share/hwbrowser/DeviceList.py", line 37, in ?
import gtk
File "/usr/src/build/463933-x86_64/install/usr/lib64/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 37, in ?
RuntimeError: could not open display
Traceback (most recent call last):
File "/usr/share/hwbrowser/DeviceList.py", line 53, in ?
import gtk
File "/usr/src/build/463933-x86_64/install/usr/lib64/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 37, in ?
RuntimeError: could not open display
[root@oradb6 ~]#

Thank you for helping me.

avizen9
Esteemed Contributor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

hello ss
its GUI so you need to export display

export DISPLAY=your_local_system_hostname:0.0

try it...!
S.S.
Super Advisor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Hi Avizen,

As per your advise i have opened my Reflection X manager and tried to export my IP and have executed the "hwbrowser" command.
It has worked.

The browser window has been opened. Please find in the attachment.

Do you know how to access the GUI of RHEL ( i have read we can use GUI with KDE)

Thank you.

avizen9
Esteemed Contributor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Hello SS
if luns are properly mapped you should able to see them all under hard drive,

all other gus base command you can try system-config- it will show you all available gui commands, thanks,
Tim Nelson
Honored Contributor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

back to the basic approach if you want to figure out the xwindows later..

create vdisk on array
preset to server

I have the fibre channel utilities intstalled, either HPs or actual vendors.
they come with fc scan utility.

scan the fc bus

then a combination of
fdisk -l
multipath -ll

configure devices in /etc/multipath.conf if you like
to determine devices

if using LVM ( preferred)
pvcreate /dev/mapper/my_lun1
or
pvcreate /dev/mpath/mpath#

vgcreate a volume group with new lun

lvcreate new a logical volume

mkfs -t ext3 /dev/vgname/lvolname

edit /etc/fstab
mkdir /mountpoint
mount /mountpoint


S.S.
Super Advisor

Re: how to see the LUNS on Linux Server, creation of partitions & filesystems

Thank you Nelson for your steps.