ltfs file backend does not work with a format and type different from LTO5
@madjesc ya está trabajando en esto.
Desde el 31/7/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Describe the bug
Even tho you can change the tape type and density using cart_type and density_code, if you use any other format besides LTO5 it will not format.
To Reproduce
mkdir tapemkltfs -e file -d tapecd tape- Change the backend configuration to use any density and type different from LTO5, e.g.
<?xml version="1.0" encoding="UTF-8"?>
<filedebug_cartridge_config>
<dummy_io>false</dummy_io>
<emulate_readonly>false</emulate_readonly>
<capacity_mb>204800</capacity_mb>
<cart_type>L6</cart_type>
<density_code>5A</density_code>
<delay_mode>None</delay_mode>
<wraps>40</wraps>
<change_direction_us>2000000</change_direction_us>
<change_track_us>10000</change_track_us>
<threading_sec>0</threading_sec>
</filedebug_cartridge_config>
mkltfs -f -e file -d tape
LTFS15000I Starting mkltfs, LTFS version 2.5.0.0 (Prelim), log level 3.
LTFS15041I Launched by "mkltfs -f -t -e file -d tape0".
LTFS15042I This binary is built for Linux (x86_64).
LTFS15043I GCC version is 11.4.1 20231218 (Red Hat 11.4.1-3).
LTFS17087I Kernel version: Linux version 5.14.0-427.13.1.el9_4.x86_64 ([email protected]) (gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), GNU ld version 2.35.2-43.el9) #1 SMP PREEMPT_DYNAMIC Wed Apr 10 10:29:16 EDT 2024 i386.
LTFS17089I Distribution: NAME="Red Hat Enterprise Linux".
LTFS17089I Distribution: Red Hat Enterprise Linux release 9.4 (Plow).
LTFS17089I Distribution: Red Hat Enterprise Linux release 9.4 (Plow).
LTFS15025D Validating command line options.
LTFS15037D Command line options are valid.
LTFS15003I Formatting device 'tape0'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.
LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x55738f543c50).
LTFS15006D Opening the device.
LTFS17085I Plugin: Loading "file" tape backend.
LTFS30000I Opening a device through generic file driver (tape0).
LTFS30003I Opening a directory through generic file driver (tape0).
LTFS12023D Reserving device.
LTFS12028D Unlocking medium.
LTFS30061E Cannot unlock medium: unit not ready.
LTFS17160I Maximum device block size is 4194304.
LTFS11330I Loading cartridge.
LTFS30048I Loading a directory through generic file driver (tape0).
LTFS30086I Cartridge is unsupported (LTO5, 0x68).
LTFS11331E Failed to load the cartridge (ltfs_load_tape).
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15007D Device opened.
LTFS15049I Checking the medium (load).
LTFS30198D Backend readpos: (0, 0) FM = 0.
LTFS15010I Creating data partition b on SCSI partition 1.
LTFS15011I Creating index partition a on SCSI partition 0.
LTFS17254E This cartridge cannot be reformatted in the drive (0x68, 5).
LTFS15012E Failed to format the medium.
LTFS12028D Unlocking medium.
LTFS12025D Releasing device.
LTFS15023I Formatting failed.
Expected behavior
It should format to any other format available
Desktop (please complete the following information):
- OS: RHEL 9.4
Additional context
The reason is becase it's hardcoded in filedebug_tc.c:411
state->product_id = "ULTRIUM-TD5";
But also it tries to get the drive_type from the serial of the tape wich is weird.
for (i = 0; i < (int)strlen(state->serial_number); i++) {
if (state->serial_number[i] == '.') {
state->serial_number[i] = '\0';
state->product_id = &(state->serial_number[i+1]);
break;
}
}
In this part gets the first compatible drive from the ibm_supported_drives variable, wich is an ULT3580-TD5 that is not compatible with any other tape.
while(*d_cur) {
if((! strncmp(IBM_VENDOR_ID, (*d_cur)->vendor_id, strlen((*d_cur)->vendor_id)) ) &&
(! strncmp(state->product_id, (*d_cur)->product_id, strlen((*d_cur)->product_id)) ) ) {
state->drive_type = (*d_cur)->drive_type;
break;
}
d_cur++;
}
I'm currently working in a new option for the xml file to specify the drive type
- Lenguaje dominante
- C
- Estrellas
- 356
- Forks
- 111
- Merge medio
- 1 h 52 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LinearTapeFileSystem/ltfs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
LinearTapeFileSystem/ltfs#650 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
LinearTapeFileSystem/ltfs#647 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
LinearTapeFileSystem/ltfs#645 · 3 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
LinearTapeFileSystem/ltfs#643 ·
-
Format fails on HP LTO-6 6250 with Adaptec HBAQuizá libre de nuevo @madjesc la tomó hace 42 días y no hay ningún pull request abierto. AbiertoH/W issue HBA Report Investigating
LinearTapeFileSystem/ltfs#640 · 8 comentarios · 1 asignado ·
Todos los issues de LinearTapeFileSystem/ltfs
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9272 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
semantic-reasoning/wirelog#2163 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Xinyuan-LilyGO/T-Display-S3#352 · 3 comentarios ·
-
documentation severity/minor
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día