search

what is linux lun

Mar 25, 2023 am 10:28 AM
linuxlun

linux lun refers to the logical unit number. Its full English name is "Logical Unit Number". It is actually defined in SCSI-3 and is not only used in the storage category. It can also refer to the use of the SCSI protocol. All peripheral equipment, such as tape drives, SCSI printers, etc.

what is linux lun

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What is linux lun?

1. The concept of LUN

The full name of LUN is Logical Unit Number, which is the logical unit number. We know that the number of devices that can be attached to the SCSI bus is limited, usually 6 or 15. We can use Target ID (also called SCSI ID) to describe these devices. As soon as a device is added to the system, there is a Code name, when we distinguish the equipment, we only need to say the number and it will be ok.

In fact, the objects we need to describe far exceed this number, so we introduced the concept of LUN, which means that the function of LUN ID is to expand the Target ID. There can be multiple LUN Devices under each Target. We usually refer to LUN Device as LUN. In this way, we can say that the description of each device has changed from the original Target x to Target x LUN y. So obviously, we describe the device capabilities are enhanced.

Just like there is a physical hard disk in our computer, we need to partition it into logical disks: such as C drive, D drive, E drive...

So we can To sum up, LUN is just a method we introduced in order to use and describe more devices and objects. There is nothing special about it at all.

LUN ID is not equal to a certain device, it is just a number and does not represent any physical attribute. In our actual environment, the LUN we encounter may be disk space, a tape drive, or media changer and so on.

2. What is a LUN?

The mystery of LUN (relative to some novices) is that it is often not a visible entity, but some virtual objects. For example, an array cabinet is regarded as a Target Device by the host. For some special needs, we have to divide the disk space of the disk array cabinet into several small units for the host to use, so some logic is generated. In terms of drives, they are logical objects with a lower level than Target Device. We are used to calling these smaller disk resources LUN0, LUN1, LUN2... and so on. Due to the mechanism of the operating system, the minimum storage object level recognized by the operating system is LUN Device. This is a logical object, so it is often called Logical Device.

Some people say that in my Windows, I only recognize a disk, but I don’t see anything about LUN. Does it mean LUN=Physical Disk? The answer is no. As long as you pay attention, you can see a LUN value in the disk's properties. This is just because your Disk is not divided into multiple storage resource objects, but the entire disk is used as a LUN. LUN The ID defaults to zero, that's all.

We have encountered such a problem. For example, someone asked, we have a disk array connected to two hosts. We divided a LUN for the two hosts to recognize, and then we thought, first The operating system divides the disk into two partitions, allowing the two hosts to use two partitions respectively. Then, if a host goes down, use cluster software to switch the partition to another host. Is this feasible? The answer is also no. The disk unit operated by the cluster software is a LUN, not a partition, so this operation is not feasible. Of course, in some environments, generally those with relatively low requirements, different disk partitions can be mounted on multiple hosts. However, in this case, there is actually no disk switching involved, so in some high-demand environments In the environment, this situation is simply not allowed to exist.

It should also be noted that in the concepts of some manufacturers and some products, the LUN ID is bound to a specific Device. For example, some of IBM's tape libraries have only one Target ID for the entire tape library, and then The changer and tape drive are assigned to LUN0, LUN1, LUN2..., but we should note that this is only a special design of the product, and it is also a rare case.

3. What is the difference between LUN and storage volume?

It is common for people to talk about the difference between storage volumes and LUNs, and then argue endlessly. From the above we can know what a LUN is. LUN is the abbreviation of English Logical unit number, that is, logical unit number. It is actually defined in SCSI-3 and is not only used in the storage category. It can also refer to all peripheral devices that use the SCSI protocol, such as tape drives, SCSI Printer etc. From the SAM model of SCSI-3, we know that the protocol layer of SCSI-3 (or later versions) stipulates that for a 16-bit wide SCSI bus, there are only 16 addressing ranges, that is, only 16 peripheral devices can be mounted. , each device is called a target. In order to improve the addressing capability of the bus, another layer was introduced, which stipulates that multiple devices can be virtualized (or actually connected) on each target. For example, a tape drive may be connected to a target, and a tape drive may be connected to a target. Printers share a target address, but in order to distinguish them, LUN is used to distinguish them. The tape drive is assumed to be LUN0 and the printer is assumed to be LUN2. This solves the addressing problem of multiple devices.

This is an example of a real device connection, a storage array (e.g. HP leftHand P4000 SAN) is the best example of a virtual device. A storage disk array appears as a Target to the SCSI bus and occupies a SCSI Target address. However, the storage space of the storage array is too large. We need to divide it into different parts for different applications to achieve centralized storage and centralized management. the goal of. Therefore, we use LUN to distinguish each divided storage part (or area). For example, LUN1 represents address block 0-1023, LUN2 represents address block 1024-65535, and so on. As can be seen from the above, when the computer uses the SCSI standard (note that the word standard I use here represents the 4 layers in the SAM model, and does not use words such as interface, protocol or command) to connect to external storage, use It is a BUS-Target-LUN ternary addressing scheme. The bus refers to how many SCSI buses and how many SCSI cards there are on your computer? The target refers to the target address of the device on the bus, which is often called the SCSI address? LUN refers to the logical address and logical unit number assigned by the device on a Target. This addressing scheme and device connection method are similar to a network topology that is physically star-connected and logically bus-connected.

So what is a storage volume? This starts with the storage volume manager. The storage volume manager is an object in the operating system. It is mainly responsible for the online management of storage block devices. When one of our storage LUNs is connected to the computer and the computer discovers the existence of this device, it needs to register it on the volume manager. The volume manager provides a registered virtual interface for the storage volume and obtains the basic information of the storage LUN, such as space size. Ternary address, block size, start and end address, health status, etc., and then create an abstraction of the corresponding data structure for it, so that the computer can dynamically capture the real-time information of the registered storage LUN through the volume manager, and realize dynamic manage. After a storage LUN is registered and abstracted by the volume manager, it is considered by the volume manager to be a direct subordinate that can be exploited. It can be divided into smaller areas again, or of course not divided, and then divided or not divided. The subsequent storage space is used for data abstraction and relevant data structures are established for calls by the file system layer. Therefore, storage LUNs and volumes may be physically the same thing, but we just look at it and understand it from different angles and levels. Of course, for computers, these differences are indeed the needs of the data processing process, and it is necessary to clarify them.

Recommended learning: "linux video tutorial"

The above is the detailed content of what is linux lun. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How Debian improves Hadoop data processing speedHow Debian improves Hadoop data processing speedApr 13, 2025 am 11:54 AM

This article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file

How to learn Debian syslogHow to learn Debian syslogApr 13, 2025 am 11:51 AM

This guide will guide you to learn how to use Syslog in Debian systems. Syslog is a key service in Linux systems for logging system and application log messages. It helps administrators monitor and analyze system activity to quickly identify and resolve problems. 1. Basic knowledge of Syslog The core functions of Syslog include: centrally collecting and managing log messages; supporting multiple log output formats and target locations (such as files or networks); providing real-time log viewing and filtering functions. 2. Install and configure Syslog (using Rsyslog) The Debian system uses Rsyslog by default. You can install it with the following command: sudoaptupdatesud

How to choose Hadoop version in DebianHow to choose Hadoop version in DebianApr 13, 2025 am 11:48 AM

When choosing a Hadoop version suitable for Debian system, the following key factors need to be considered: 1. Stability and long-term support: For users who pursue stability and security, it is recommended to choose a Debian stable version, such as Debian11 (Bullseye). This version has been fully tested and has a support cycle of up to five years, which can ensure the stable operation of the system. 2. Package update speed: If you need to use the latest Hadoop features and features, you can consider Debian's unstable version (Sid). However, it should be noted that unstable versions may have compatibility issues and stability risks. 3. Community support and resources: Debian has huge community support, which can provide rich documentation and

TigerVNC share file method on DebianTigerVNC share file method on DebianApr 13, 2025 am 11:45 AM

This article describes how to use TigerVNC to share files on Debian systems. You need to install the TigerVNC server first and then configure it. 1. Install the TigerVNC server and open the terminal. Update the software package list: sudoaptupdate to install TigerVNC server: sudoaptinstalltigervnc-standalone-servertigervnc-common 2. Configure TigerVNC server to set VNC server password: vncpasswd Start VNC server: vncserver:1-localhostno

Debian mail server firewall configuration tipsDebian mail server firewall configuration tipsApr 13, 2025 am 11:42 AM

Configuring a Debian mail server's firewall is an important step in ensuring server security. The following are several commonly used firewall configuration methods, including the use of iptables and firewalld. Use iptables to configure firewall to install iptables (if not already installed): sudoapt-getupdatesudoapt-getinstalliptablesView current iptables rules: sudoiptables-L configuration

Debian mail server SSL certificate installation methodDebian mail server SSL certificate installation methodApr 13, 2025 am 11:39 AM

The steps to install an SSL certificate on the Debian mail server are as follows: 1. Install the OpenSSL toolkit First, make sure that the OpenSSL toolkit is already installed on your system. If not installed, you can use the following command to install: sudoapt-getupdatesudoapt-getinstallopenssl2. Generate private key and certificate request Next, use OpenSSL to generate a 2048-bit RSA private key and a certificate request (CSR): openss

Debian mail server virtual host configuration methodDebian mail server virtual host configuration methodApr 13, 2025 am 11:36 AM

Configuring a virtual host for mail servers on a Debian system usually involves installing and configuring mail server software (such as Postfix, Exim, etc.) rather than Apache HTTPServer, because Apache is mainly used for web server functions. The following are the basic steps for configuring a mail server virtual host: Install Postfix Mail Server Update System Package: sudoaptupdatesudoaptupgrade Install Postfix: sudoapt

Debian Mail Server DNS Setup GuideDebian Mail Server DNS Setup GuideApr 13, 2025 am 11:33 AM

To configure the DNS settings for the Debian mail server, you can follow these steps: Open the network configuration file: Use a text editor (such as vi or nano) to open the network configuration file /etc/network/interfaces. sudonano/etc/network/interfaces Find network interface configuration: Find the network interface to be modified in the configuration file. Normally, the configuration of the Ethernet interface is located in the ifeth0 block.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use