[Question] sg_persist failed when using qemu-pr-helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

When using qemu-pr-helper,"sg_persist" in guest return Aborted Command after iscsiadm logout & login.

My confusion:
Is this problem caused by bugs of libvirt/qemu-pr-helper?
Or iscsiadm logout & login should be forbidden when using qemu-pr-helper?
Or There is something wrong with my config.

Steps to Reproduce:
1. setup multipath env
  1) set /etc/iscsi/initiatorname.iscsi
  2) iscsiadm discovery & login
  3) start multipathd

2. add the following xml to guest
    <disk type='block' device='lun'>
            <driver name='qemu' type='raw' cache='none' io='native'/>
            <source dev='/dev/mapper/XXXXXXXXXXXXXXXXX'>
            	**<reservations managed='yes'/>**
            </source>
            <target dev='sdc' bus='scsi'/>
    </disk>

3. start the guest
   1) "sg_persist -v -i -n -k -d  /dev/sdc" works well in the guest
   2) here /dev/sdc(guest)  -> /dev/sdht(host)

4. iscsiadm logout & login on host
   1) iscsiadm  -m node -u  (host)
   2) iscsiadm -m node -l   (host)
   3) here /dev/sdc(guest)  -(change)-> /dev/sdfo(host)

5. exec "sg_persist -v -i -n -k -d  /dev/sdc" in the guest
   1) command return:
         Persistent Reservation In cmd: 5e 00 00 00 00 00 00 20 00 00
         persistent reservation in:
         Fixed format, current; Sense key: Aborted Command
         Additional sense: Logical unit communication failure
         PR in (Read keys): Aborted command sense key, other than protection related (asc=0x10)
   2) strace qemu-pr-helper show:
         openat(AT_FDCWD, "/dev/sdht", O_RDONLY) = -1 ENOENT (No such file or directory)

Additional info:
1. strace qemu-pr-helper show:
       openat(AT_FDCWD, "/dev/sdht", O_RDONLY) = -1 ENOENT (No such file or directory)
2. This problem may be related to mnt(namespace). I try to set mnt of qemu-pr-helper as pid 1,  sg_persist works well after logout & login.





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux