Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Scalable File Service Turbo
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic Cloud Server/ User Guide (Kuala Lumpur Region)/ FAQs/ Disk Management/ Disk Attachment/ How Do I Obtain My Disk Device Name in the ECS OS Using the Device Identifier Provided on the Console?

How Do I Obtain My Disk Device Name in the ECS OS Using the Device Identifier Provided on the Console?

Updated on 2024-07-24 GMT+08:00

Scenarios

You find that the device name displayed in the ECS OS is different from that displayed on the management console and you cannot determine which disk name is correct. This section describes how to obtain the disk name used in an ECS OS according to the device identifier on the console.

For details about how to attach disks, see Attaching an EVS Disk to an ECS.

Obtaining the Disk ID of an ECS on the Console

  1. Log in to the management console.
  2. Under Computing, choose Elastic Cloud Server.
  3. Click the target ECS name in the ECS list.

    The ECS details page is displayed.

  4. Click the Disks tab and then click to expand the disk information.
  5. Check the device type and ID of the disk.
    NOTE:

    If Device Identifier is not displayed on the page, stop the ECS and restart it.

Using a Serial Number to Obtain the Disk Device Name (Windows)

If a serial number is displayed on the console, use either of the following methods to obtain the disk name.

cmd

  1. Start cmd in a Windows OS as an administrator and run either of the following commands:

    wmic diskdrive get serialnumber

    wmic path win32_physicalmedia get SerialNumber

    wmic path Win32_DiskDrive get SerialNumber

    NOTE:

    A serial number is the first 20 digits of a disk UUID.

    For example, if the serial number of a VBD disk on the console is 97c876c0-54b3-460a-b, run either of the following commands to obtain the serial number of the disk on the ECS OS:

    wmic diskdrive get serialnumber

    wmic path win32_physicalmedia get SerialNumber

    wmic path Win32_DiskDrive get SerialNumber

    Information similar to the following is displayed:

    Figure 1 Obtaining the disk serial number
  2. Run the following command to check the disk corresponding to the serial number:

    wmic diskdrive get Name, SerialNumber

    Figure 2 Checking the disk corresponding to the serial number

PowerShell

  1. Start PowerShell as an administrator in a Windows OS.
  2. Run the following command to check the disk on which the logical disk is created:
    • Windows Server 2012 or later
      1. Run the following command to check the disk on which the logical disk is created:

        Get-CimInstance -ClassName Win32_LogicalDiskToPartition |select Antecedent, Dependent |fl

        As shown in Figure 3, the disk is Disk 0.

      2. Run the following command to view the mapping between the serial number and the disk:

        Get-Disk |select Number, SerialNumber

        As shown in Figure 3, the disk is Disk 0.

        Figure 3 Viewing the disk on which the logical disk is created
    • Versions earlier than Windows 2012
      1. Run the following command to check the disk on which the logical disk is created:

        Get-WmiObject -Class Win32_PhysicalMedia |select Tag, Serialnumber

      2. Run the following command to view the mapping between the serial number and the disk:

        Get-WmiObject -Class Win32_LogicalDiskToPartition |select Antecedent, Dependent |fl

Using a Serial Number to Obtain a Disk Device Name (Linux)

If a serial number is displayed on the console, run either of the following commands to obtain the device name.

udevadm info --query=all --name=/dev/xxx | grep ID_SERIAL

ll /dev/disk/by-id/*

NOTE:

A serial number is the first 20 digits of a disk UUID.

For example, if the serial number of the VBD disk is 62f0d06b-808d-480d-8, run either of the following commands:

udevadm info --query=all --name=/dev/vdb | grep ID_SERIAL

ll /dev/disk/by-id/*

The following information is displayed:

[root@ecs-ab63 ~]# udevadm info --query=all --name=/dev/vdb | grep ID_SERIAL
E: ID_SERIAL=62f0d06b-808d-480d-8
[root@ecs-ab63 ~]# ll /dev/disk/by-id/*
lrwxrwxrwx 1 root root  9 Dec 30 15:56 /dev/disk/by-id/virtio-128d5bfd-f215-487f-9 -> ../../vda
lrwxrwxrwx 1 root root 10 Dec 30 15:56 /dev/disk/by-id/virtio-128d5bfd-f215-487f-9-part1 -> ../../vda1
lrwxrwxrwx 1 root root  9 Dec 30 15:56 /dev/disk/by-id/virtio-62f0d06b-808d-480d-8 -> ../../vdb

/dev/vdb is the disk device name.

Using a BDF to Obtain a Disk Device Name (Linux)

  1. Run the following command to use a BDF to obtain the device name:

    ll /sys/bus/pci/devices/BDF disk ID/virtio*/block

    For example, if the BDF disk ID of the VBD disk is 0000:02:02.0, run the following command to obtain the device name:

    ll /sys/bus/pci/devices/0000:02:02.0/virtio*/block

    The following information is displayed:

    [root@ecs-ab63 ~]# ll /sys/bus/pci/devices/0000:02:02.0/virtio*/block
    total 0
    drwxr-xr-x 8 root root 0 Dec 30 15:56 vdb

    /dev/vdb is the disk device name.

Using a WWN to Obtain the Disk Name (Windows)

  1. Obtain the device identifier on the console by referring to Obtaining the Disk ID of an ECS on the Console.
  2. Manually convert the WWN.

    For example, the obtained WWN (device identifier) is 688860300003252ffa16520d39517815.

    1. Obtain the 21st to 17th digits that are counted backwards (3252f).
    2. Convert a hexadecimal (3252f) to a decimal (206127).
  3. Start PowerShell as an administrator in a Windows OS.
  4. Run the following command:

    Get-CimInstance Win32_DiskDrive | Select-Object DeviceID, SerialNumber

  5. In the command output, the disk whose serial number ends with 206127 is the disk corresponding to the WWN.
    Figure 4 Disk with the serial number ending with 206127

Using a WWN to Obtain a Disk Device Name (Linux)

  1. Log in to the ECS as user root.
  2. Run the following command to view the disk device name:

    ll /dev/disk/by-id |grep WWN|grep scsi-3

    For example, if the WWN obtained on the console is 6888603000008b32fa16688d09368506, run the following command:

    ll /dev/disk/by-id |grep 6888603000008b32fa16688d09368506|grep scsi-3

    The following information is displayed:

    [root@host-192-168-133-148 block]# ll /dev/disk/by-id/ |grep 6888603000008b32fa16688d09368506 |grep scsi-3
    lrwxrwxrwx 1 root root  9 May 21 20:22 scsi-36888603000008b32fa16688d09368506 -> ../../sda

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback