Project

General

Profile

Actions

Bug #14614

closed

format: should recognize new nvme disk

Added by Toomas Soome 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Before patch:

root@test:/home/tsoome# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t1d0 <drive type unknown>
          /pci@0,0/pci15ad,7a0@16/pci15ad,7f0@0/blkdev@1,0
       1. c3t0d0 <VMware,-VMware Virtual S-1.0-30.00GB>
          /pci@0,0/pci15ad,1976@10/sd@0,0

After patch:

root@test:/net/beastie/code/illumos-gate/usr/src/cmd/format# ./format 
Searching for disks...done

c1t1d0: configured with capacity of 20.00GB

AVAILABLE DISK SELECTIONS:
       0. c1t1d0 <VMware-Virtual NVMe Disk-1.3-20.00GB>
          /pci@0,0/pci15ad,7a0@16/pci15ad,7f0@0/blkdev@1,0
       1. c3t0d0 <VMware,-VMware Virtual S-1.0-30.00GB>
          /pci@0,0/pci15ad,1976@10/sd@0,0
       2. c3t1d0 <VMware,-VMware Virtual S-1.0-10.00GB>
          /pci@0,0/pci15ad,1976@10/sd@1,0
       3. c3t2d0 <VMware,-VMware Virtual S-1.0-10.00GB>
          /pci@0,0/pci15ad,1976@10/sd@2,0
       4. c3t3d0 <VMware,-VMware Virtual S-1.0-10.00GB>
          /pci@0,0/pci15ad,1976@10/sd@3,0
Specify disk (enter its number): 0
selecting c1t1d0
[disk formatted, no defect list found]
No Solaris fdisk partition found.

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> ver
Warning: Could not read label.
format> l
Ready to label disk, continue? y

format> ver

Volume name = <        >
ascii name  = <VMware-Virtual NVMe Disk-1.3-20.00GB>
bytes/sector    =  512
sectors = 41943040
accessible sectors = 41926589
first usable sector = 34
last usable sector = 41943006
Part      Tag    Flag     First Sector        Size        Last Sector
  0        usr    wm                34      19.99GB         41926622    
  1 unassigned    wm                 0          0              0    
  2 unassigned    wm                 0          0              0    
  3 unassigned    wm                 0          0              0    
  4 unassigned    wm                 0          0              0    
  5 unassigned    wm                 0          0              0    
  6 unassigned    wm                 0          0              0    
  8   reserved    wm          41926623       8.00MB         41943006    

format> 

root@test:/net/beastie/code/illumos-gate/usr/src/cmd/format# mdb /dev/rdsk/c1t1d0p0 
> ::load disk_label
> ::mbr
Format: unknown
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0

PART TYPE                  ACTIVE  STARTCHS    ENDCHS      SECTOR     NUMSECT  
0    EFI_PMBR:0xee         0       0/0/2       1023/255/63 1          41943039 
1    UNUSED:0
2    UNUSED:0
3    UNUSED:0
> ::gpt
Signature: EFI PART (valid)
Revision: 1.0
HeaderSize: 92 bytes
HeaderCRC32: 0x4fa69b5c (should be 0x4fa69b5c)
Reserved1: 0 (should be 0x0)
MyLBA: 1 (should be 1)
AlternateLBA: 41943039
FirstUsableLBA: 34
LastUsableLBA: 41943006
DiskGUID: 14dee8fc-709b-4f73-c905-fe34c94592f5
PartitionEntryLBA: 2
NumberOfPartitionEntries: 9
SizeOfPartitionEntry: 0x80 bytes
PartitionEntryArrayCRC32: 0x9ea6d217 (should be 0x9ea6d217)

PART TYPE                STARTLBA      ENDLBA        ATTR     NAME
0    EFI_USR             34            41926622      0        
1    EFI_UNUSED         
2    EFI_UNUSED         
3    EFI_UNUSED         
4    EFI_UNUSED         
5    EFI_UNUSED         
6    EFI_UNUSED         
7    EFI_UNUSED         
8    EFI_RESERVED        41926623      41943006      0        
> 

Actions #1

Updated by Electric Monk 5 months ago

  • Gerrit CR set to 2095
Actions #2

Updated by Electric Monk 3 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit dcc43656b5993828b48fbae35b5de53b9f05004e

commit  dcc43656b5993828b48fbae35b5de53b9f05004e
Author: Toomas Soome <tsoome@me.com>
Date:   2022-05-11T16:15:34.000Z

    14614 format: should recognize new nvme disk
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF