diff --git a/tapeserver/castor/tape/tapeserver/file/File.cpp b/tapeserver/castor/tape/tapeserver/file/File.cpp index c3282f1fce8c2e97591e6d04584b4a4658f694e6..a8839e4ddea7d2b816c6154ec49e9856c25d0633 100644 --- a/tapeserver/castor/tape/tapeserver/file/File.cpp +++ b/tapeserver/castor/tape/tapeserver/file/File.cpp @@ -39,9 +39,15 @@ namespace castor { const unsigned short max_unix_hostname_length = 256; //255 + 1 terminating character - LabelSession::LabelSession(tapeserver::drive::DriveInterface & drive, const std::string &vid) { + LabelSession::LabelSession(tapeserver::drive::DriveInterface & drive, + const std::string &vid, const bool lbp) { VOL1 vol1; - vol1.fill(vid, SCSI::logicBlockProtectionMethod::DoNotUse); + if (lbp) { + // we only support crc32c LBP method + vol1.fill(vid, SCSI::logicBlockProtectionMethod::CRC32C); + } else { + vol1.fill(vid, SCSI::logicBlockProtectionMethod::DoNotUse); + } drive.writeBlock(&vol1, sizeof(vol1)); HDR1PRELABEL prelabel; prelabel.fill(vid);