Coder Social home page Coder Social logo

doug-gilbert / lsscsi Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 1.62 MB

Author's own git mirror of his lsscsi subversion repository

Home Page: https://sg.danny.cz/scsi/lsscsi.html

License: GNU General Public License v2.0

Makefile 0.41% Shell 13.48% M4 0.30% C 85.48% CMake 0.32%
linux scsi command-line storage

lsscsi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wenchao-hao

lsscsi's Issues

json output and --transport (0.33)

I'm testing the 0.33 pre-release and am pleased to see the json output. One strange thing: Adding --transport does not add the transport to SCSI devices (only to NVMe devices). I also have to add --list. An oversight?

/dev/disk/by-id enumeration and duplicate IDs

There's a known design shortcoming related to udev and symlinks where symlinks get randomly overwritten in case of duplicate identifiers. This for example concerns /dev/disk/by-XXX that is heavily used by lsscsi for enumeration. As a result identifiers may be missing in its output for some devices.

The test case for example is as follows:

# modprobe scsi_debug add_host=3 num_tgts=4
# lsscsi -i
[6:0:0:0]    disk    Linux    scsi_debug       0191  /dev/sda   333333330000036b0
[6:0:1:0]    disk    Linux    scsi_debug       0191  /dev/sdb   33333333000003a98
[6:0:2:0]    disk    Linux    scsi_debug       0191  /dev/sdc   -
[6:0:3:0]    disk    Linux    scsi_debug       0191  /dev/sde   33333333000004268
[7:0:0:0]    disk    Linux    scsi_debug       0191  /dev/sdd   33333333000003e80
[7:0:1:0]    disk    Linux    scsi_debug       0191  /dev/sdf   -
[7:0:2:0]    disk    Linux    scsi_debug       0191  /dev/sdg   -
[7:0:3:0]    disk    Linux    scsi_debug       0191  /dev/sdh   -
[8:0:0:0]    disk    Linux    scsi_debug       0191  /dev/sdi   33333333000004650
[8:0:1:0]    disk    Linux    scsi_debug       0191  /dev/sdj   33333333000004a38
[8:0:2:0]    disk    Linux    scsi_debug       0191  /dev/sdk   33333333000004e20
[8:0:3:0]    disk    Linux    scsi_debug       0191  /dev/sdl   33333333000005208

Running udevadm trigger will regenerate the symlinks in different (random) order, resulting in the same number of missing identifiers on different devices each time.

Any suggestion for a workaround avoiding drastic changes to the lsscsi enumeration code?

nvme devices are not showed up in lsscsi

[root@ltcrain119-lp2 src]# ./lsscsi
[0:0:1:0] disk AIX VDASD 0001 /dev/sda
[0:0:2:0] cd/dvd AIX VOPTA /dev/sr0
[N:0:65:1] disk 3.2TB NVMe Gen4 U.2 SSD__1 -

We expect to see /dev/nvmxxx in lsscsi.

Thanks,
Wend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.