LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
251 stars 75 forks source link

mkltfs fail if lock status is unavailable #112

Closed manu0401 closed 5 years ago

manu0401 commented 5 years ago

Describe the bug If lock status attribute is not available from the tape, mkltfs fill fail with error 11341E

To Reproduce mkltfs /dev/nst0 I do not know why this attribute happens to be missing at mine, though.

Expected behavior Format should succeed whatever prior content exists on tape.

Screenshots n/a

Desktop (please complete the following information): n/a

Smartphone (please complete the following information): n/a

Additional context That bug is worked around in HPE LTFS by using a fake lock status during mkltfs operation. A pull request is coming soon to fix this issue.

piste-jp commented 5 years ago

Please check the int *(read_attribute)() method of the backend you are using. tape_get_cart_volume_lock_status() expects -EDEV_INVALID_FIELD_CDB when the volume lock page is not existed yet.

The tape_get_cart_volume_lock_status() treats -EDEV_INVALID_FIELD_CDB from the int *(read_attribute)() method as success and prints LTFS11336I.

manu0401 commented 5 years ago

Atsushi Abe notifications@github.com wrote:

Please check the int *(read_attribute)() method of the backend you are using. tape_get_cart_volume_lock_status() expects -EDEV_INVALID_FIELD_CDB when the volume lock page is not existed yet.

Please close this one, I discovered why the attribute was missing when porting ltotape from HPE LTS 3.4.0: I had a function call missing to create it in backend.

-- Emmanuel Dreyfus http://hcpnet.free.fr/pubz manu@netbsd.org

piste-jp commented 5 years ago

Close from originator's request.