SUMMARY What use are LUNs

From: Shin (shin@solarider.org)
Date: Thu Apr 01 2004 - 06:00:18 EST


Dear All,

Apologies for the slightly delayed summary posting - sickness
intervened. As usual some really useful information was received.
All the replies can be found after the replication of my original
question.

Many thanks to all who replied, Brilliant info.
Shin

PS. To those that replies about allowing more than 7 slices - I
didnt really consider this as I was thinking that with Sol 9 this
was mostly a non issue now. But I should have been clearer about
this. Anyhow still good to reinforce the point and not everyone
(maybe even a miniority) will be on Sol 9 yet.

On Sun, Mar 21, 2004 at 09:30:41PM +0000, Shin wrote:

> I just reliased that I have asked a number of questions, without
> truly understanding the point of a LUNs, specifically multiple LUNs
> on a device.
>
> I have an A1000, which is setup as Raid5 + 1 hot spare. This has 1
> LUN on it. I believe this is the default setup.
>
> When I run format I see this as one big slice (s2). My limited
> understanding is that using RaidManager I can setup multiple LUNs on
> this device.
>
> Why would I want to do this - does this give me something special
> over and above just slicing this s2 into a number of slices to
> create filesystems on as opposed to creating multiple LUNs and then
> creating slices on each LUN; which I then create file systems on? As
> I see it I get the same effect; ie multiple slices both ways but the
> 1 LUN method needs less effort.
>
> Am I correct in assuming that If I have 1 LUN on 1 A1000 then I see something
> like c1t0d0s2 when I run format. With s2 being the total space
> available after the Raid 5 and hot spare overhead are take into
> account.
>
> But if I created 3 LUNs on the 1 A1000 then I'd see something like
> c1t0d0s2, c1t0d1s2, c1t0d2s2 ? Am I losing space with this approach
> or is the underlying Raid5 + hot spare acting in exactly the same
> way as in the above setup?
>
> If anyone has a link to a good reference to LUNs and their use I'd
> appreciate it. Or a link to general use of RAID and what level
> should be used when, how to setup LUNs, what software to use to
> manage the RAID devices.
>
> I'm trying to learn a lot about RAID very quickly!

NB. I've reformated some of the replies. Other than that no changes.

----------------------------------------------------------------
From: Will Braithwaite

possibly the one reason where having multiple LUNs makes more sense
is to obtain more slices (partitions) than the standard solaris
7 (or 8 if you allocate slice 2). alternatively the use of something
like veritas volume manager allows you to have a lot more slices on
the one LUN. I've found couple of nice tutorials about RAID in
general and veritas in particular is here -
                              
http://www.cuddletech.com/veritas/
                                                                                                                                                                i
realise its not quite what your after but some of the discussion on
Veritas gives great background information.
================================================================

----------------------------------------------------------------
From: Ben Rockwood

Shin wrote:

>I just reliased that I have asked a number of questions, without
>truly understanding the point of a LUNs, specifically multiple LUNs
>on a device.
>
>I have an A1000, which is setup as Raid5 + 1 hot spare. This has 1
>LUN on it. I believe this is the default setup.

Yup.

>When I run format I see this as one big slice (s2). My limited
>understanding is that using RaidManager I can setup multiple LUNs on
>this device.

Yes, you can define several LUNs per A1000.

>Why would I want to do this - does this give me something special
>over and above just slicing this s2 into a number of slices to
>create filesystems on as opposed to creating multiple LUNs and then
>creating slices on each LUN; which I then create file systems on? As
>I see it I get the same effect; ie multiple slices both ways but the
>1 LUN method needs less effort.

Okey, break down the SCSI address... c1t1d0s2: Control 1, Target 1
would be our physical device since each SCSI device uses it's own
SCSI ID. Now, D (Device) is the LUN number. LUNS are used to break
a single SCSI device into multiple usable devices. For a single
SCSI hard disk this isn't useful since we can break a single device
into multiple peices using partitions/slices (the s2 above). But
what if we have a big giant disk array, like an A1000. If we want
to break that device into multiple usable filesystems we have some
options. Lets look at 'em.

1) Use one LUN on the device so it looks like a normal big disk to
the OS (c1t1d0) and then partition it (using the format command)
into 5 diffrent slices. Then we create our files systems. So we
basically have c1t1d0 with s0, s1 (s2 is reserved for full disk),
s3, s4, and s5. We can create filesystems on each. The problem? You
can not dynamically change partition sizes, so if you ever need to
grow the file system your screwed.

2) Use one LUN on the device (c1t1d0) and then use a Volume Manager
(aka: Software RAID) like the Veritas Volume Manager or Sun
DiskSuite (aka: Solaris Volume Manager). So we are really just
re-allocating the single large LUN into smaller bits to be used for
file systems. Okey, so with a Volume Manger we don't have to worry
about resizing problems, but now we've got a peice of software
running that maybe we don't need. A VM gives you alot of flexablity
but might not always be the best solution. (BTW, I use this solution
on alot of systems)

3) Using RAID Manager, break the A1000 into several LUNs. Lets say
3. So we can create diffrent sub-RAIDs if you will. So lets break
the thing up like this: LUN 0: RAID5, using 5 disks (18G disks, so
thats somethink like 60-70G usable) LUN 1: RAID0 using 3 disks (18G
disks, so thats about 54G stripped) LUN 2: RAID0 using 3 disks Okey,
so now we've got 3 diffrent LUNs, which when recognized by the
system would look something like this: c1t1d0 -> 70G c1t1d1 -> 54G
c1t1d2 -> 54G Now you can slice these up by using either a Volume
Manger, or by using file system partitions. Generally you'd probly
just use Slice 2 (whole disk).

Okey, the advantages of using LUNs are really based on your personal
preference. But the nice things would be that if LUN0's RAID5 for
some reason is destroyed, or you loose the thing due to failures
your still okey in LUNs 1 and 2. If you use a single RAID5 LUN for
the whole array and then divide the data out via methods 1 or 2
above, your screwed on all the file systems if you loose 2+ disks in
your RAID5. So you get some fault isolation.

There is more to the LUN vs Partitions vs Volume Manager argument, but
those are the highlites.

>Am I correct in assuming that If I have 1 LUN on 1 A1000 then I see something
>like c1t0d0s2 when I run format. With s2 being the total space
>available after the Raid 5 and hot spare overhead are take into
>account.

Exactly.

>But if I created 3 LUNs on the 1 A1000 then I'd see something like
>c1t0d0s2, c1t0d1s2, c1t0d2s2 ? Am I losing space with this approach
>or is the underlying Raid5 + hot spare acting in exactly the same
>way as in the above setup?

Yup, and no your not loosing space. Obviously a hot spare disk
isn't usable. And in RAID5 roughly 1/3 of the volume is just
partity. So you could work out the numbers yourself. Count the
number of disks per LUN, then take away approx 1/3 of the usable
space for parity. Work the numbers for diffrent scenarios. Remember
that on, say, and 18G disk only about 17.5 is usable.

>If anyone has a link to a good reference to LUNs and their use I'd
>appreciate it. Or a link to general use of RAID and what level
>should be used when, how to setup LUNs, what software to use to
>manage the RAID devices.
>
Look here:http://cuddletech.com/veritas/index.html.
The paper "RAID Theory" might help you. It's intended as a
refresher for learning the Veritas Volume Manager from my tutorials,
but it might help you too.
================================================================

----------------------------------------------------------------
From: Ilya Birman

If you do this...

"Why would I want to do this - does this give me something special
over and above just slicing this s2 into a number of slices to
create filesystems"

You wont be able to create multiple file systems, just one,
on one slice.

One slice = 1 file system max. ( unless i had to much to drink
this weekend)

(You can have 1 file system on more then one slice though)

You create multiple slice if you want more files systems. and there
is raid under the hood, so you OK as far as data protection.
================================================================

----------------------------------------------------------------
From: Hans Jacobsen

LUNs in general can be used in many ways as a good abstraction from
actual devices.

1) You can split up a disk (or group of disks in a RAID-5
configuration, for example) into separate LUNs. If you are using
fiber, you can mount them on different systems - using the same
disks on differents systems, but having some access to all of the
spindles.

2) You can use advanced features like lun security and so forth with
some storage/storage network devices

3) If you want hardware raid-5, you have to use a lun or luns to
present storage to a server (the server in general doesn't even know
about the disks behind the lun - just that the lun is there).
================================================================

----------------------------------------------------------------
From: Anthony Talltree

What if you want to create more than six slices/partitions?
================================================================

----------------------------------------------------------------
From: Soeren Schaper

a LUN is more or less similar to a Harddisk. If you have 1 LUN, you
have 1 HD, if you have more LUN's you have more HD's. More Luns
allow you to have have different mount points for example 3 mounts
at 300GB instead of 1 mount wih 900GB. If you have your RAID
connected via SAN you may mount each LUN on a different server so 1
raid serves severell servers.
================================================================

----------------------------------------------------------------
From: Darren Dunham

> I just reliased that I have asked a number of questions, without
> truly understanding the point of a LUNs, specifically multiple LUNs
> on a device.
>
> I have an A1000, which is setup as Raid5 + 1 hot spare. This has 1
> LUN on it. I believe this is the default setup.

Correct.

> When I run format I see this as one big slice (s2). My limited
> understanding is that using RaidManager I can setup multiple LUNs on
> this device.
>
> Why would I want to do this - does this give me something special
> over and above just slicing this s2 into a number of slices to
> create filesystems on as opposed to creating multiple LUNs and then
> creating slices on each LUN; which I then create file systems on?

Yes, it does. Solaris VTOC slices on the R5 lun are the same as you
might have on a single disk. Suitable for most operations, and very
simple.

However, you might want to partition your I/O. Right now, if you
had 2 slices, then having one very busy would slow access to the
other slice. Splitting the disks into 2 LUNS would set up some disks
on one and some disks on the other. Now the I/O is partitioned and
one can be used at full speed regardless of the actions on the other
lun.

Or you may have different sets of data with different needs. Raid 5
on an A1000 isn't too bad at most speeds because of the NVRAM cache.
However at very high speeds, it can still throttle and slow down.
You could create one lun that is raid5, and then another 2 disk raid
0 or raid 1 LUN very small, but very fast.

> As I see it I get the same effect; ie multiple slices both ways
> but the 1 LUN method needs less effort.

It does need less effort, but it is less configurable.

> Am I correct in assuming that If I have 1 LUN on 1 A1000 then I
> see something like c1t0d0s2 when I run format. With s2 being the
> total space available after the Raid 5 and hot spare overhead are
> take into account.

Yes.

> But if I created 3 LUNs on the 1 A1000 then I'd see something like
> c1t0d0s2, c1t0d1s2, c1t0d2s2 ? Am I losing space with this approach
> or is the underlying Raid5 + hot spare acting in exactly the same
> way as in the above setup?

It depends on the LUNS. Raid 0 doesn't have any parity overhead.
Raid 1 (mirroring) has a 2:1 overhead.
================================================================

----------------------------------------------------------------
From: Hendrik Visage

On Sun, Mar 21, 2004 at 09:30:41PM +0000, Shin wrote:
>
> Why would I want to do this - does this give me something special
> over and above just slicing this s2 into a number of slices to
> create filesystems on as opposed to creating multiple LUNs and then
> creating slices on each LUN; which I then create file systems on? As
> I see it I get the same effect; ie multiple slices both ways but the
> 1 LUN method needs less effort.

You could have (depending on the number of disk etc.) have a RAID5,
RAID1 and/or RAID0 on the same device. (Like the A1000). Because
of the different speed/diskspace/etc. characteristics of the different
RAIDs, you'll put different types of data there.

Then each of those seperate RAID would be addressed as seperate
LUNs, ie. c?tAdR where A is the target address of the A1000, and R
the LUN of the specific RAID you'll be looking at.

Inside those RAID "disks", you'll have seperate slices/partitions,
where s2 would typically span the whole of the RAID instead of a
portion you might want to allocate to a certian
system/database/etc./etc.

> Am I correct in assuming that If I have 1 LUN on 1 A1000 then I see something
> like c1t0d0s2 when I run format. With s2 being the total space
> available after the Raid 5 and hot spare overhead are take into
> account.

Correct.

> But if I created 3 LUNs on the 1 A1000 then I'd see something like
> c1t0d0s2, c1t0d1s2, c1t0d2s2 ? Am I losing space with this approach
> or is the underlying Raid5 + hot spare acting in exactly the same
> way as in the above setup?

It depends on your specific setup.

> If anyone has a link to a good reference to LUNs and their use I'd
> appreciate it. Or a link to general use of RAID and what level
> should be used when, how to setup LUNs, what software to use to
> manage the RAID devices.

LUNs are also used in tape libraries to address the tape changer and
the different tape drives (but there are exceptions)
================================================================

----------------------------------------------------------------
From: Johan Hartzenberg

You can only create 7 slices per LUN. Those 7 slices must be used
by the same single host.

You can slice up the Raid into many many LUNs. LUNs from the same
array can be allcoated to different hosts.

Therefore when using a single LUN you can only conenct one host to
the array, and you only get 7 slices out of it.

That about summarises it. We don't use Solaris slices any more
except on internal (physical) disks. External disks we user vx
volume manager (Which can create many volumes from a single LUN, and
also can combine slices from multiple LUNs to create bigger volumes,
and also automatically detects and caters for when LUN Ids, Target
IDs, etc change (this can happen if you reboot after new devices
were connected to a fabric. Hmmm - I should have been a veritas
sales person)
================================================================

----- End forwarded message -----
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:23 EDT