All,
I have a few disks that are used and came from a nexenta ha cluster. Those disks had some sort of a scsi reservation on them and it refuses to be part of a pool.
The system lists it as available disk . But on these disks I cannot even get the reservation info .
sg_persist --in -k -d /dev/da2
SEAGATE ST3840FM0003 0007
Peripheral device type: disk
PR in (Read keys): Reservation conflict
sg_persist failed: Reservation conflict
Any other tools I can use to wipe these ?
diskinfo -v /dev/da2
/dev/da2
512 # sectorsize
3840755982336 # mediasize in bytes (3.5T)
7501476528 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
466945 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
SEAGATE ST3840FM0003 # Disk descr.
Z8911CYD0000822150Z3 # Disk ident.
mpr0 # Attachment
id1,enc@n500304801d5b18fd/type@0/slot@3/elmdesc@Slot02 # Physical path
Yes # TRIM/UNMAP support
0 # Rotation rate in RPM
Not_Zoned # Zone Mode
yes i did came across the blog before. none of those command works .
All gives simila errors below . Seems like locked well below the hal! . Do you think it is somehow locked via h/w at the controller level?
PR in (Read keys): Reservation conflict
sg_persist failed: Reservation conflict
The key is that the blog doesn’t show exact values, because they are different for every disk. To clear keys or a reservation, you need to run the command from the same system that created it. Since you don’t have access to that system, you create a new key and reservation on the current system, and then clear all the keys and reservations (which you are allowed to do because the current system holds a reservation).
Start with:
sg_persist --in -k -d /dev/da2
sg_persist --in -r -d /dev/da2
The results from the first command tell you what keys are registered, and the second tells you the reservation type. The values for your disk will be different from the blog. The reservation types:
1: Write Exclusive
3: Exclusive Access
5: Write Exclusive, registrants only
6: Exclusive Access, registrants only
7: Write Exclusive, all registrants
8: Exclusive Access, all registrants
Next, register (and verify) your own key:
sg_persist --out --register --param-sark=0xDEADBEEF /dev/da2
sg_persist --in -k -d /dev/da2
Next, create your own reservation:
sg_persist --out --reserve --param-rk=0xDEADBEEF --prout-type=$prout_type /dev/da2
Make the correct replacement for $prout_type. Last, clear all the reservations:
sg_persist --out --clear --param-rk=0xDEADBEEF /dev/da2
1 Like
thank you for teh detailed info.
But like i mentioned before on the first post , even the commands to read the registration key and type does not work
root@varicdc1tnas01[/mnt/arc/certs/minio]# sg_persist --in -k -d /dev/da2
SEAGATE ST3840FM0003 0007
Peripheral device type: disk
PR in (Read keys): Reservation conflict
sg_persist failed: Reservation conflict
root@varicdc1tnas01[/mnt/arc/certs/minio]# sg_persist --in -r -d /dev/da2
SEAGATE ST3840FM0003 0007
Peripheral device type: disk
PR in (Read reservation): Reservation conflict
sg_persist failed: Reservation conflict
You could try those commands in read-only mode (add -y
before the -d
), or just try to register, reserve, and clear without seeing what’s there already.
If those fail, start pulling out some of the other sg3_utils commands that return disk information and see what you get. You should also try these commands when the problem disk is the only disk connected, other than your boot disk, and you should not boot into a OS like TrueNAS, which has limited access to utilities…a live Linux boot would probably be best.
tried a few like ubuntu , debian and systemrescue iso etc. none of them can touch them drives with any of the sg3 commands even in readonly mode.
I think I am just gonna throw away them drives at this point .
Thank you for all the suggestions though.