LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-22-2010, 06:43 PM   #1
dtd646
LQ Newbie
 
Registered: Apr 2010
Posts: 18

Rep: Reputation: 0
Setting up a NFS server to connect to SAN


Hello, I am fairly new to linux and this seems like an easy question. I have installed RedHat 6 Beta to act as a front-end to my SAN using NFS. I understand how to allow users to connect to the linux box using NFS, what I am confused on is how to connect the SAN to the linux box. If this linux server was a virtual machine, I would just add a HD on the VM then partition, then share it using NFS. Since it is a physical box, I am missing how you would connect the SAN to the NFS server.

Any help would be appriciated!
 
Old 04-22-2010, 07:59 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
You would go through the host connectivity procedures for your SAN to make the block devices visible to the host that will then export those via NFS.
 
Old 08-10-2010, 12:07 PM   #3
dtd646
LQ Newbie
 
Registered: Apr 2010
Posts: 18

Original Poster
Rep: Reputation: 0
Ok..so my host is connected

I have NFS installed and working on an Ubuntu server. I have directly connected my SAN to my Ubuntu server via a Qlogic fibrchannel card. I have ran through the host connectivity procedures on my SAN and it is setup to connect to my Ubuntu host. What command do I use to mount the NFS Share on my Ubuntu to the LUN that I have created on the SAN?
 
Old 08-10-2010, 12:41 PM   #4
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
So if you have proper FC connectivity, you should see the new LUNS in /proc/scsi/scsi and in fdisk -l

You partition them,(possibly get them into some sort of volume manager) put a filesystem on them, create mount points and then mount those to the volumes. Once that's done, you create your /etc/exports to share the volumes out.
 
Old 08-10-2010, 06:33 PM   #5
dtd646
LQ Newbie
 
Registered: Apr 2010
Posts: 18

Original Poster
Rep: Reputation: 0
SAN to NFS cont.

Thanks for the quick response Cosmo. Yes, I do see the new LUN created in /proc/scsi/scsi:

Host: scsi4 Channel: 00 Id: 00 Lun: 01
Vendor: IBM Model: 1726-4xx FAStT Rev: 0617
Type: Direct-Access ANSI SCSI revision: 05

So I guess the second part of your answer is what I am getting at. What commands would I use to partition this LUN? Once I get that, I beleive and can install the filesystem and create the mount points.. The /etc/exports file portion is pretty straight forward too.

Thanks for the help.
 
Old 08-10-2010, 08:50 PM   #6
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Assuming no volume management:

Determine the SAN block device using fdisk -l

Let's say it's /dev/sdb

fdisk /dev/sdb

select 'n' for new and select partition 1, primary partition, take the default start sector, default end sector (which should be the last sector)

type 'w' to write the partition table and exit. You now have /dev/sdb1 in the output of fdisk -l

Assuming ext3, type mke2fs -j /dev/sdb1

It will put ext3 filesystem down.

Then create your mount point

mkdir /sanlun

then mount it with 'mount /dev/sdb1 /sanlun'

Add a new line to the /etc/fstab to make persistent

Then you can share this out.
 
Old 08-11-2010, 06:12 PM   #7
dtd646
LQ Newbie
 
Registered: Apr 2010
Posts: 18

Original Poster
Rep: Reputation: 0
Smile great info..just a couple more questions

So I got everything working, many thanks! Got one question though:

When I use fdisk -l, I notice that I have around 14000 GB of drive space available. BUT when I do a df -h, it only shows 2 TBs of space available. How do you create a drive that is 14 TB? Do you need to do the same procedure and combine them together somehow? I do have LVM on this server if that is easier to use.. Or should I be using a different file system.

I am running Ubuntu 10.04. I think I should be able to use ext4, right?

Thanks again.

Last edited by dtd646; 08-11-2010 at 06:33 PM.
 
Old 08-11-2010, 06:21 PM   #8
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Have a look at this http://en.wikipedia.org/wiki/GUID_Partition_Table

You are running into limits. Research that, plus, research a filesystem that is not limited. XFS comes to mind.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a NFS server powadha Debian 5 06-28-2009 05:23 PM
Can't connect from slackware nfs client to rhel nfs server llattan Linux - Server 2 04-21-2009 09:49 AM
How to connect SAN storage for RHEL4 server jaggu123 Linux - Enterprise 1 01-28-2009 08:38 AM
Setting Up A NFS Server? carlosinfl Debian 3 03-15-2007 07:51 PM
Can't connect to NFS Server logosys Linux - Networking 2 09-15-2005 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration