Original Message:
Sent: 7/18/2024 10:25:00 PM
From: sher cheeta
Subject: RE: unable to change active partition in lto8
Okay here is the thing How exactly ITDT's change partition work ??
how it changes the partition???
------------------------------
sher cheeta
------------------------------
Original Message:
Sent: Thu July 18, 2024 01:42 PM
From: Kevin Butt
Subject: unable to change active partition in lto8
It will not help change the partition. It will just confirm that the mounted tape is partitioned.
------------------------------
Kevin Butt
IBM, Tape Development Ecosystem
Tape SCSI Architect, T10 Representative
Original Message:
Sent: Thu July 18, 2024 02:10 AM
From: sher cheeta
Subject: unable to change active partition in lto8
but how this Volume statistics log page , will help me to change the partition of tape?
------------------------------
sher cheeta
Original Message:
Sent: Thu July 18, 2024 12:56 AM
From: Kevin Butt
Subject: unable to change active partition in lto8
@sher cheeta I will defer to Mayra about device driver comments. I speak at the SCSI layer. However, I can tell you that the Volume Statistics Log Page, log page 17h, has some counters that can help you confirm the sizes of the partitions on tape. These counters are in log parameter 0202h, Approximate native capacity of partition(s). If you know how to query those, then you can double check the partitioning. There are a lot of interesting statistics in there. See the LTO SCSI Reference at https://www.ibm.com/support/pages/node/6490249
------------------------------
Kevin Butt
IBM, Tape Development Ecosystem
Tape SCSI Architect, T10 Representative
Original Message:
Sent: Wed July 17, 2024 10:20 PM
From: sher cheeta
Subject: unable to change active partition in lto8
I have just found out if i am trying to check the number of partition it is also showing 0 but the tape is definitely partitioned, then why it is showing 0
Here is the code snippet which i have used to check the partitions
This code as well executed without throwing any compile or run time error and showed 0
DWORD getTapePartitions(HANDLE hTape) { TAPE_GET_MEDIA_PARAMETERS mediaParams = { 0 }; DWORD bytesReturned; if (!DeviceIoControl(hTape, IOCTL_TAPE_GET_MEDIA_PARAMS, NULL, 0, &mediaParams, sizeof(mediaParams), &bytesReturned, NULL)) { DWORD error = GetLastError(); printErrorMessage(error); throw std::runtime_error("Error getting tape media parameters."); } else { std::cout << "Partition Count: " << mediaParams.PartitionCount << std::endl; return mediaParams.PartitionCount; }}
------------------------------
sher cheeta
Original Message:
Sent: Tue July 16, 2024 10:23 PM
From: sher cheeta
Subject: unable to change active partition in lto8
Again the thing is that then how ITDT is able to change the partition, if i am not able to change the partition, on the same machine , with same Tape connected with same configuration everything is same .
Then why that function is not working while i am manually doing it but ITDT can do the same without any issue??
How exactly ITDT's change partition works then?
------------------------------
sher cheeta
Original Message:
Sent: Tue July 16, 2024 02:20 PM
From: MAYRA PADILLA DUARTE
Subject: unable to change active partition in lto8
ITDT can work with Microsoft native driver or IBMTape driver.
The ioctl-set-active-partition and ioctl-query-active-partition only works with IBMTape driver
------------------------------
MAYRA PADILLA DUARTE
Original Message:
Sent: Tue July 16, 2024 01:27 AM
From: sher cheeta
Subject: unable to change active partition in lto8
Hello
Let me explain you the whole scenario i am not able to change the active partition on windows and as you suggested, that Windows IBM Tape driver: https://www.ibm.com/docs/en/ts4300-tape-library?topic=deviceiocontrol-ioctl-set-active-partition
first of all this is also not working and secondly if i am not able to change the partition then How ITDT(IBM Tape Diagnostic tool) is able to change the partition on same on and same drivers because i have not installed any other thing.
------------------------------
sher cheeta
Original Message:
Sent: Mon July 15, 2024 12:17 PM
From: MAYRA PADILLA DUARTE
Subject: unable to change active partition in lto8
@sher cheeta if you are using Windows IBM Tape driver: https://www.ibm.com/docs/en/ts4300-tape-library?topic=deviceiocontrol-ioctl-set-active-partition
------------------------------
MAYRA PADILLA DUARTE
Original Message:
Sent: Sun July 14, 2024 10:21 PM
From: sher cheeta
Subject: unable to change active partition in lto8
@Kevin Butt but i am using windows OS and from where should i get sys/Atape.h header file ?
------------------------------
sher cheeta
Original Message:
Sent: Fri July 12, 2024 12:50 PM
From: Kevin Butt
Subject: unable to change active partition in lto8
@sher cheeta To change partition use SET_ACTIVE_PARTITION (see https://www.ibm.com/docs/en/ts4300-tape-library?topic=overview-set-active-partition
------------------------------
Kevin Butt
IBM, Tape Development Ecosystem
Tape SCSI Architect, T10 Representative
Original Message:
Sent: Thu July 11, 2024 06:18 AM
From: sher cheeta
Subject: unable to change active partition in lto8
I am using ts2280 IBM Ultrium LTO 8 and i have created two partition i.e. Partition 0 and Partition 1 both are 3T.B each with wrap wise partitioning and i am using this code in order to switch between those partitions
i am using SetTapePosition function to change the active partition of a LTO tape drive but unable to do so it compiled without any error but didn't change the partition as well, On the other hand i and able to set the dwOffsetLow and it is working completely fine but the partition is not changing.
DWORD bytesReturned;
DWORD partition = 2;
TAPE_SET_POSITION tapePosition{};
tapePosition.Method = TAPE_LOGICAL_POSITION;
tapePosition.Partition = partition;
tapePosition.Offset.LowPart = 0;
tapePosition.Offset.HighPart = 0;
tapePosition.Immediate = FALSE;
if (!DeviceIoControl(hTape, IOCTL_TAPE_SET_POSITION, &tapePosition, sizeof(tapePosition), NULL, 0, &bytesReturned, NULL)) {
return GetLastError();
}
only able to set the offsetlowPart but unable to change the partition.
kindly let me know how to resolve this issue.
and i have already included the header files
------------------------------
sher cheeta
------------------------------