askvity

What is LUN mapping?

Published in Storage Networking 3 mins read

LUN mapping makes a Logical Unit Number (LUN) available to a host (server) so it can access the storage it represents.

In essence, LUN mapping is the process of granting a server access to a specific storage volume (the LUN) on a Storage Area Network (SAN). It essentially associates a LUN with a specific host or group of hosts. Without LUN mapping, a server would be unable to see or utilize the storage presented by the SAN.

Here's a breakdown:

  • Logical Unit Number (LUN): A unique identifier given to a logical unit, which is a discrete, addressable unit of storage. It's like a volume label on a hard drive.
  • Host: The server that needs to access the storage on the SAN.
  • Mapping: The process of linking a LUN to a specific host, allowing that host to access the storage represented by that LUN.

Think of it like assigning a parking space (the LUN) to a specific car (the host). Only the car with the assigned space is allowed to park there.

Why is LUN Mapping Important?

  • Security: By controlling which hosts have access to which LUNs, you can ensure that sensitive data is only accessible by authorized servers.
  • Resource Management: LUN mapping allows you to efficiently allocate storage resources to different servers based on their needs.
  • Data Isolation: Mapping different LUNs to different hosts ensures that data for one application or server is isolated from others, preventing conflicts.
  • Simplified Management: It provides a structured way to manage and provision storage in a SAN environment.

Common LUN Mapping Practices:

  • Direct Mapping: Mapping a LUN directly to a specific host.
  • Group Mapping: Mapping a LUN to a group of hosts, allowing multiple servers to share the storage.
  • LUN Masking: Hiding a LUN from certain hosts, even if they are connected to the SAN. This provides an additional layer of security.
  • LUN Numbering: You can specify a specific LUN number that a SAN host entry can use. This allows multiple SAN host entries to access a LUN using the same unique LUN number. Note that if you use this approach you cannot map any individual hosts to this LUN, only SAN host entries.

Example:

Imagine you have a SAN with three LUNs: LUN 0, LUN 1, and LUN 2. You have two servers: Server A and Server B.

  • You map LUN 0 to Server A.
  • You map LUN 1 to Server B.
  • You map LUN 2 to both Server A and Server B.

In this scenario, Server A can access LUN 0 and LUN 2, while Server B can access LUN 1 and LUN 2.

In summary, LUN mapping is a critical process in SAN environments that controls access to storage volumes, ensuring security, efficient resource allocation, and data isolation.

Related Articles