Re: Cannot do FITRIM

2012-08-31 Thread Spelic

On 08/30/12 18:51, Michael Christie wrote:

On Aug 30, 2012, at 11:49 AM, Michael Christie micha...@cs.wisc.edu wrote:


On Aug 30, 2012, at 11:18 AM, Spelic spe...@shiftmail.org wrote:


Hello all
I am trying to fstrim a filesystem on an iSCSI disk through open-iscsi. The 
target is on LIO .

I am receiving:
fstrim: /: FITRIM ioctl failed: Operation not supported

At LIO side there is nothing in dmesg, so I am supposing it's a open-iscsi 
problem (lack of feature?)

The iscsi layer does not do anything special to support trim/discard. We just 
pass whatever info we have to upper layers and passes commands down to the 
target/disks.

Does your disk support trim/discard? Are you doing passthrough to a disk that 
support trim/discard or is lio emulating it?


When you run fstrim what errors do you see in /var/log/messages? Do you see 
something about a ILLEGAL_REQUEST maybe?




Mike, thank you for your reply

The only thing I see in dmesg is this:

[ 1166.338584] TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x85, 
sending CHECK_CONDITION.


and it is at LIO side.
I see it twice, but I don't think it's at the time I attempt the fstrim, 
I think it's at node boot time (iSCSI boot)


Nothing at initiator side.

I confirm I can do fstrim if I map the device on the node which acts as 
target. This device is an LVM Thin device and it definitely supports 
trim, and one can even see the occupied space decreasing after a 
successful fstrim.


LIO maps it as a backstores--iblock .

Can this be a LIO problem / lack of feature?

Thank you
S.

--
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: Cannot do FITRIM

2012-08-31 Thread Michael Christie

On Aug 31, 2012, at 9:55 AM, Spelic spe...@shiftmail.org wrote:

 On 08/30/12 18:51, Michael Christie wrote:
 On Aug 30, 2012, at 11:49 AM, Michael Christie micha...@cs.wisc.edu wrote:
 
 On Aug 30, 2012, at 11:18 AM, Spelic spe...@shiftmail.org wrote:
 
 Hello all
 I am trying to fstrim a filesystem on an iSCSI disk through open-iscsi. 
 The target is on LIO .
 
 I am receiving:
 fstrim: /: FITRIM ioctl failed: Operation not supported
 
 At LIO side there is nothing in dmesg, so I am supposing it's a open-iscsi 
 problem (lack of feature?)
 The iscsi layer does not do anything special to support trim/discard. We 
 just pass whatever info we have to upper layers and passes commands down to 
 the target/disks.
 
 Does your disk support trim/discard? Are you doing passthrough to a disk 
 that support trim/discard or is lio emulating it?
 
 When you run fstrim what errors do you see in /var/log/messages? Do you see 
 something about a ILLEGAL_REQUEST maybe?
 
 
 
 Mike, thank you for your reply
 
 The only thing I see in dmesg is this:
 
[ 1166.338584] TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x85, sending 
 CHECK_CONDITION.
 
 and it is at LIO side.
 I see it twice, but I don't think it's at the time I attempt the fstrim, I 
 think it's at node boot time (iSCSI boot)
 
 Nothing at initiator side.
 
 I confirm I can do fstrim if I map the device on the node which acts as 
 target. This device is an LVM Thin device and it definitely supports trim, 
 and one can even see the occupied space decreasing after a successful fstrim.
 
 LIO maps it as a backstores--iblock .
 
 Can this be a LIO problem / lack of feature?
 

I don't think LIO supports what you are trying to do. I do not think that it 
just automatically detects if a lvm device supports discards and then exports 
that. If you were using a passthrough scsi device that supports it then I think 
it would just work.  On the initiator side for the iscsi disk do:

cat /sys/class/scsi_disk/A:B:C:D/provisioning_mode
cat /sys/class/scsi_disk/A:B:C:D/provisioning

If provisioning is disabled then the target is not reporting that it supports 
it when the scsi layer sets up the disk.


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: Cannot do FITRIM

2012-08-31 Thread Spelic

On 08/31/12 17:40, Michael Christie wrote:

On Aug 31, 2012, at 9:55 AM, Spelic spe...@shiftmail.org wrote:

I don't think LIO supports what you are trying to do. I do not think that it 
just automatically detects if a lvm device supports discards and then exports 
that. If you were using a passthrough scsi device that supports it then I think 
it would just work.  On the initiator side for the iscsi disk do:

cat /sys/class/scsi_disk/A:B:C:D/provisioning_mode
cat /sys/class/scsi_disk/A:B:C:D/provisioning

If provisioning is disabled then the target is not reporting that it supports 
it when the scsi layer sets up the disk.


cat /sys/class/scsi_disk/2\:0\:0\:0/provisioning_mode
full

cat /sys/class/scsi_disk/2\:0\:0\:0/provisioning
cat: /sys/class/scsi_disk/2:0:0:0/provisioning: No such file or directory

cat /sys/class/scsi_disk/2\:0\:0\:0/thin_provisioning
0


full instead of disabled... does it change anything?

Anyway, big problem!  So this is a lack of feature in LIO, correct?

Can you suggest any workaround, or do you know if SCST or any other 
targets have that?


Thanks so much
S.

--
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Cannot do FITRIM

2012-08-30 Thread Spelic

Hello all
I am trying to fstrim a filesystem on an iSCSI disk through open-iscsi. 
The target is on LIO .


I am receiving:
fstrim: /: FITRIM ioctl failed: Operation not supported

At LIO side there is nothing in dmesg, so I am supposing it's a 
open-iscsi problem (lack of feature?)


What can you tell me?

Thank you
S.

--
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: Cannot do FITRIM

2012-08-30 Thread Michael Christie

On Aug 30, 2012, at 11:18 AM, Spelic spe...@shiftmail.org wrote:

 Hello all
 I am trying to fstrim a filesystem on an iSCSI disk through open-iscsi. The 
 target is on LIO .
 
 I am receiving:
 fstrim: /: FITRIM ioctl failed: Operation not supported
 
 At LIO side there is nothing in dmesg, so I am supposing it's a open-iscsi 
 problem (lack of feature?)

The iscsi layer does not do anything special to support trim/discard. We just 
pass whatever info we have to upper layers and passes commands down to the 
target/disks.

Does your disk support trim/discard? Are you doing passthrough to a disk that 
support trim/discard or is lio emulating it?

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: Cannot do FITRIM

2012-08-30 Thread Michael Christie

On Aug 30, 2012, at 11:49 AM, Michael Christie micha...@cs.wisc.edu wrote:

 
 On Aug 30, 2012, at 11:18 AM, Spelic spe...@shiftmail.org wrote:
 
 Hello all
 I am trying to fstrim a filesystem on an iSCSI disk through open-iscsi. The 
 target is on LIO .
 
 I am receiving:
 fstrim: /: FITRIM ioctl failed: Operation not supported
 
 At LIO side there is nothing in dmesg, so I am supposing it's a open-iscsi 
 problem (lack of feature?)
 
 The iscsi layer does not do anything special to support trim/discard. We just 
 pass whatever info we have to upper layers and passes commands down to the 
 target/disks.
 
 Does your disk support trim/discard? Are you doing passthrough to a disk that 
 support trim/discard or is lio emulating it?


When you run fstrim what errors do you see in /var/log/messages? Do you see 
something about a ILLEGAL_REQUEST maybe?

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.