mercoledì, maggio 13, 2015

HOW-TO remove a SCSI reservation

root@myserver:~# sg_persist --in --no-inquiry --read-reservation --device=/dev/sda
  PR generation=0x207, Reservation follows:
    Key=0x32ef7466734d
    scope: LU_SCOPE,  type: Write Exclusive, registrants only

root@myserver:~# sg_persist --out --no-inquiry --register --param-sark=0x32ef7466734d --device=/dev/sda

root@myserver:~# sg_persist --out --no-inquiry --clear --param-rk=0x32ef7466734d --device=/dev/sda

root@myserver:~# sg_persist --in --no-inquiry --read-reservation --device=/dev/sda
  PR generation=0x209, there is NO reservation held

the command "sg_persist" is available in the "sg3-utils" package (debian: sg3-utils, redhat: sg3_utils).

Thanks so much to http://itdoc.hitachi.co.jp/manuals/3000/30009140H0e/D1400194.HTM that a few minutes ago really saved the day ! :-)

Nessun commento: