Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

losing devices from device_list when mounting a device #489

Open
dericed opened this issue Nov 14, 2024 · 4 comments
Open

losing devices from device_list when mounting a device #489

dericed opened this issue Nov 14, 2024 · 4 comments
Labels

Comments

@dericed
Copy link

dericed commented Nov 14, 2024

Describe the bug
On my setup, after a reboot, I see 6 LTO decks attached to my Mac Studio. After I use one device to mount a tape, then one unused device is lost from the list.

To Reproduce
Steps to reproduce the behavior:

Here I run four commands:

  1. get the device list and i see 4 decks
  2. make a directory to mount a tape to (in this case the empty dir already exists)
  3. mount device 0 to that directory
  4. re-run step 1, now device 0 is unlisted which makes sense because I mounted it, but device 5 is gone too :(
% ltfs -o device_list
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o device_list".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
Tape Device list:.
Device Name = 0, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002893, Product Name =[ULTRIUM-HH9].
Device Name = 1, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002486, Product Name =[ULTRIUM-HH9].
Device Name = 2, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002867, Product Name =[ULTRIUM-HH9].
Device Name = 3, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002685, Product Name =[ULTRIUM-HH9].
Device Name = 4, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 1097021251, Product Name =[ULTRIUM-HH7].
Device Name = 5, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 10WT054125, Product Name =[ULTRIUM-HH7].

% mkdir test
mkdir: test: File exists

% ltfs -o devname=0 test
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o devname=0 test".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS14063I Sync type is "time", Sync time is 300 sec.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
103 LTFS17085I Plugin: Loading "unified" iosched backend.
103 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
103 LTFS30810I Opening a device through iokit driver (0).
103 LTFS30814I Vendor ID is IBM     .
103 LTFS30815I Product ID is 'ULTRIUM-HH9     '.
103 LTFS30816I Firmware revision is Q9E1.
103 LTFS30817I Drive serial is 1097002893.
103 LTFS30872I Setting up timeout values from RSOC.
103 LTFS17160I Maximum device block size is 1048576.
103 LTFS11330I Loading cartridge.
103 LTFS30854I Logical block protection is disabled.
103 LTFS11332I Load successful.
103 LTFS17157I Changing the drive setting to write-anywhere mode.
103 LTFS11005I Mounting the volume.
103 LTFS30854I Logical block protection is disabled.
103 LTFS17227I Tape attribute: Vendor = IBM     .
103 LTFS17227I Tape attribute: Application Name = LTFS                            .
103 LTFS17227I Tape attribute: Application Version = 2.4.5.1 .
103 LTFS17227I Tape attribute: Medium Label = H00032.
103 LTFS17228I Tape attribute: Text Localization ID = 0x81.
103 LTFS17227I Tape attribute: Barcode = H00032                          .
103 LTFS17227I Tape attribute: Application Format Version = 2.4.0           .
103 LTFS17228I Tape attribute: Volume Lock Status = 0x00.
103 LTFS17227I Tape attribute: Media Pool name = .
103 LTFS11031I Volume mounted successfully. H00032 : Gen = 1 / (a, 5) -> (b, 5) / 1097002893.
103 LTFS14111I Initial setup completed successfully.
103 LTFS14112I Invoke 'mount' command to check the result of final setup.
103 LTFS14113I Specified mount point is listed if succeeded.

% ltfs -o device_list   
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o device_list".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
Tape Device list:.
Device Name = 1, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002486, Product Name =[ULTRIUM-HH9].
Device Name = 2, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002867, Product Name =[ULTRIUM-HH9].
Device Name = 3, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002685, Product Name =[ULTRIUM-HH9].
Device Name = 4, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 1097021251, Product Name =[ULTRIUM-HH7].

Expected behavior

I would expect to see device 5 in the second device list.

Screenshots
I think the copy/paste sufficies.

Desktop (please complete the following information):

  • OS: Mac OSX Sonoma 14.6.1
  • Browser [e.g. chrome, safari]: Chrome?
  • Version [e.g. 22]: unclear what is meant here

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]: lol i have an iphone
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@dericed
Copy link
Author

dericed commented Nov 15, 2024

Testing at this again and noticing that itdt and ltfs give differing device lists.

% ltfs -o device_list
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o device_list".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
Tape Device list:.
Device Name = 2, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002685, Product Name =[ULTRIUM-HH9].
Device Name = 3, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002486, Product Name =[ULTRIUM-HH9].
     IBM Tape Diagnostic Tool Standard Edition  - Device List                  
                                                                               
       Host Bus  ID   LUN  Model          Serial       Fware  Changer     [#]  
 +----+----+----+----+----+--------------+------------+------+------------+-+  
 | 0  | 3  | 0  | 1  | 0  | ULTRIUM-HH9  | 1097002685 | Q9E1 |            | |  
 | 1  | 4  | 0  | 1  | 0  | ULTRIUM-HH9  | 1097002486 | Q9E1 |            | |  
 | 2  | 6  | 0  | 112| 0  | ULTRIUM-HH7  | 1097021251 | Q3A1 |            | |  
 | 3  | 6  | 0  | 113| 0  | ULTRIUM-HH7  | 10WT054125 | P381 |            | |  
 | 4  |    |    |    |    |              |            |      |            | |  
 | 5  |    |    |    |    |              |            |      |            | |  
 | 6  |    |    |    |    |              |            |      |            | |  
 | 7  |    |    |    |    |              |            |      |            | |  
 | 8  |    |    |    |    |              |            |      |            | |  
 | 9  |    |    |    |    |              |            |      |            | |  
 +----+----+----+----+----+--------------+------------+------+------------+-+  
                                                                               
     Please select a device by entering the number in the leftmost column      
     of the list followed by enter.                                            
 [S] Scan                                                                      
                                                                               
                                                                               
 [H] Help   [M] Main Menu  [V] Toggle View                                     
<[Q] Quit | [P] Previous | [N] Next | Line # | Command > 

@piste-jp piste-jp added invalid as expected Reported behavior is as expected and removed invalid as expected Reported behavior is as expected labels Nov 17, 2024
@piste-jp
Copy link
Member

Please put the log captured by ltfs -o verbose=606 -o -o device_list.

ltfs command just calls a tape enumerate function of the iokit, tries to open one by one and fetch drive information. It is really simple.

@dericed
Copy link
Author

dericed commented Dec 9, 2024

Hi @piste-jp, -verbose606 doesn't offer much more than the default. Here's the command:

% ltfs -o verbose=606 -o device_list 
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 606.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o verbose=606 -o device_list".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
Tape Device list:.
Device Name = 0, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 1097021251, Product Name =[ULTRIUM-HH7].
Device Name = 1, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 10WT054125, Product Name =[ULTRIUM-HH7].
Device Name = 2, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002893, Product Name =[ULTRIUM-HH9].
Device Name = 3, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002486, Product Name =[ULTRIUM-HH9].
Device Name = 4, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002867, Product Name =[ULTRIUM-HH9].
Device Name = 5, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002685, Product Name =[ULTRIUM-HH9].

After that I mounted a tape on 10WT054125, then reran the first command and got this:

% ltfs -o verbose=606 -o device_list 
103 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 606.
103 LTFS14058I LTFS Format Specification version 2.4.0.
103 LTFS14104I Launched by "ltfs -o verbose=606 -o device_list".
103 LTFS14105I This binary is built for Mac OS X .
103 LTFS14106I GCC version is 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66)).
103 LTFS17087I Kernel version: Unknown kernel.
103 LTFS17085I Plugin: Loading "iokit" tape backend.
Tape Device list:.
Device Name = 0, Vendor ID = IBM    , Product ID = ULTRIUM-HH7    , Serial Number = 1097021251, Product Name =[ULTRIUM-HH7].
Device Name = 2, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002893, Product Name =[ULTRIUM-HH9].
Device Name = 3, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002486, Product Name =[ULTRIUM-HH9].
Device Name = 4, Vendor ID = IBM    , Product ID = ULTRIUM-HH9    , Serial Number = 1097002867, Product Name =[ULTRIUM-HH9].

The second output has 4 devices whereas the first had 6. 10WT054125 is missing in the 2nd list since I'm using it to mount a tape, but 1097002685 is now unlisted and won't come back until I unmount 10WT054125. It's like this for a few combinations where mounting x will remove x and y from the list.

@piste-jp
Copy link
Member

piste-jp commented Jan 4, 2025

Hmm , LTFS just issue a query to macOS, ioKit, and list the response.

No further debug is possible on my side. Because I cannot prepare such kind of RICH environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants