VMware Cloud Community
aetius1980
Contributor
Contributor

Basics - difference between LUN and datastore?

Hi,

Can someone tell me the difference between a da LUN and a datastore?

My understanding is that that a datastore is what you see in the Vsphere client - i.e. either a local disk on an ESXi host or a collection of disks\parts of a disk within a SAN.

A LUN, from my understanding is a logical unit number which is used to identify a piece of storage at the end of a Fibre Channel or SCSI cable. A LUN can represent a single disk, multiple disks or a portion of one or more disks.

I've read it's not advisable to put multiple data store on a single LUN, however I'm assuming it's generally OK to have multiple LUNs to a single data store?

Vmware has a 256 LUN limit, would this limit mean you have a 256 datastore limit?

Apologies, storage is not my strong point and I've seen lots of examples where the terms LUN and datastore are used interchangeably.

Thanks

4 Replies
schepp
Leadership
Leadership

Hi,

if you have a SAN, a LUN is a piece of your SAN, some vendors call it virtual disc. Let's say you have a 10TB RAID 6 Array in your SAN. You can split that into 2TB blocks in your SAN-management and you get 5 LUNs.

What you see as datastore in your vSphere client is a VMFS formatted partition that lies on your local disc or your SAN LUN.

You can create multiple datastores on a single LUN ( like normal partitioning ) and you can also connect multiple LUNs to create a single large datastore.

besides the LUN limit, vSphere 5.1 has also the 256 VMFS volumes per host limit, so yes, 256 datastores is the limit at the moment.

Regards

0 Kudos
aetius1980
Contributor
Contributor

Cheers schepp,

Am I right in saying it's generally a bad practice to have multiple datastores on a single LUN, but the other way around is OK?

I'm thinking of going with a 1:1 data store to LUN mapping, with multiple vms per data store.

If I wanted to tier out my storage for different applications, replication and backup purposes, I take it's generally advised to do this at the LUN level?

Thanks

0 Kudos
schepp
Leadership
Leadership

Hi,

I use one datastore per LUN as well, for reasons of clarity . But don't know why you shouldn't use more datastores per LUN.

aetius1980 wrote:

If I wanted to tier out my storage for different applications, replication and backup purposes, I take it's generally advised to do this at the LUN level?

Yes I would do it at LUN level, by creating LUNs on different kind of RAID arrays to create different performance tiers, something like for example:

Tier 1: LUNs on a RAID array of 6 SSD.

Tier 2: LUNs on a RAID array of 12 fast SAS dicsc.

Tier 3: LUNs on a RAID array of 24 SATA discs.

Tier 4: LUNs on a RAID array of 12 SATA discs.

Regards

0 Kudos
admin
Immortal
Immortal

A LUN is a logical section of storage. A LUN can be backed by a single disk or multiple disks. It can also be allocated from a disk pool/volume/aggregate depending on the storage vendor's terminology. A datastore is a description VMware uses for an area of storage that virtual machines can reside on. This includes NFS mounts and does not relate to whether the storage is on a LUN or some other block device, it purely refers to a place where a VM can reside.

It is either unsupported, or highly not recommended to put multiple VMFS partitions on a single block storage device (ie. what everyone refers to as a LUN), I can't remember off the top of my head, but just don't do it. You can however have a single datastore comprised of multiple block storage devices (ie. extents). With VMFS3 you could have a datastore larger than 2TB by adding extents, the 2TB less 512b limit for file size still applies though. With VMFS5 and the move to GPT, larger than 2TB block devices are now supported so there is no logical reason I can think of why someone would want to build a datastore using extents. There is no advantage but if one of the block device extents is lost, the entire datastore is lost.

VMware has a 256 LUN limit, yes. It is possible to have 256 LUN's and then NFS targets as datastores on a host. I am not sure whether there is a maximum supported datastore value for vSphere, somehow I would imagine 256 (block storage) + 32 (? for NFS, or whatever the max NFS mounts are).

Regards,

Corey