Re: Stability of FILEIO as backing store?

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

 




---- From: michael.christie@xxxxxxxxxx -- Sent: 2021-02-26 - 04:41 ----

> On 2/25/21 3:36 PM, Forza wrote:
>> Hi,
>> 
>> I have a weird issue with using a file as backing store with a Win2016 server as initiator. 
>> 
>> Very often if I reboot the Linux server the disk image becomes corrupt so that Windows cannot even detect the gpt partition table on it. It can happen even if I shut down the Windows machine before I reboot the Linux server.
>> 
>> Initially I thought I would be write cache. But I've disabled that with no benefit to this problem. 
>> 
> 
> How are you disabling the write cache? What tools do you use? Is
> it targetcli or are you doing this manually via configfs?

I am using targetcli, using the documentation http://linux-iscsi.org/Doc/LIO%20Admin%20Manual.pdf
I created the backstore/fileio with write_back=false but this might not have disabled cache sinze I see in the saveconfig.json that it is still set to true. So I guess this can still be an issue =( 


> 
> What is the output of
> 
> cat /sys/kernel/config/target/core/fileio_$N/$name/info

Status: ACTIVATED  Max Queue Depth: 128  SectorSize: 512  HwMaxSectors: 16384
        TCM FILEIO ID: 0        File: /media/iscsi-tgt/dx_media_3.img  Size: 429496729600  Mode: Buffered-WCE Async: 0


> cat /sys/kernel/config/target/core/fileio_$N/$name/attrib/write_cache

This does not exist. The curent files are:

# grep . *
alua_support:1
block_size:512
emulate_3pc:1
emulate_caw:1
emulate_dpo:1
emulate_fua_read:1
emulate_fua_write:1
emulate_model_alias:1
emulate_pr:1
emulate_rest_reord:0
emulate_tas:1
emulate_tpu:0
emulate_tpws:0
emulate_ua_intlck_ctrl:0
emulate_write_cache:1
enforce_pr_isids:1
force_pr_aptpl:0
hw_block_size:512
hw_max_sectors:16384
hw_pi_prot_type:0
hw_queue_depth:128
is_nonrot:0
max_unmap_block_desc_count:1
max_unmap_lba_count:8192
max_write_same_len:4096
optimal_sectors:16384
pgr_support:1
pi_prot_format:0
pi_prot_type:0
pi_prot_verify:0
queue_depth:128
unmap_granularity:1
unmap_granularity_alignment:0
unmap_zeroes_data:0


> 
> ?
> 
> If you do a sync manually after shutting down windows does it help?

No. 

> 
> Are you accessing this from multiple windows machines at the same time?

Only one client.


> What target driver are you using?
I am using FILEIO target. 


Here is the output of saveconfig.json. Originally I have two exports (dxdep2 dxmedia2) but added two more to test different settings (block size and aio). 

{
  "fabric_modules": [],
  "storage_objects": [
    {
      "aio": false,
      "alua_tpgs": [
        {
          "alua_access_state": 0,
          "alua_access_status": 0,
          "alua_access_type": 3,
          "alua_support_active_nonoptimized": 1,
          "alua_support_active_optimized": 1,
          "alua_support_offline": 1,
          "alua_support_standby": 1,
          "alua_support_transitioning": 1,
          "alua_support_unavailable": 1,
          "alua_write_metadata": 0,
          "implicit_trans_secs": 0,
          "name": "default_tg_pt_gp",
          "nonop_delay_msecs": 100,
          "preferred": 0,
          "tg_pt_gp_id": 0,
          "trans_delay_msecs": 0
        }
      ],
      "attributes": {
        "alua_support": 1,
        "block_size": 512,
        "emulate_3pc": 1,
        "emulate_caw": 1,
        "emulate_dpo": 1,
        "emulate_fua_read": 1,
        "emulate_fua_write": 1,
        "emulate_model_alias": 1,
        "emulate_pr": 1,
        "emulate_rest_reord": 0,
        "emulate_tas": 1,
        "emulate_tpu": 0,
        "emulate_tpws": 0,
        "emulate_ua_intlck_ctrl": 0,
        "emulate_write_cache": 1,
        "enforce_pr_isids": 1,
        "force_pr_aptpl": 0,
        "is_nonrot": 0,
        "max_unmap_block_desc_count": 1,
        "max_unmap_lba_count": 8192,
        "max_write_same_len": 4096,
        "optimal_sectors": 16384,
        "pgr_support": 1,
        "pi_prot_format": 0,
        "pi_prot_type": 0,
        "pi_prot_verify": 0,
        "queue_depth": 128,
        "unmap_granularity": 1,
        "unmap_granularity_alignment": 0,
        "unmap_zeroes_data": 0
      },
      "dev": "/media/iscsi-tgt/dx_media_3.img",
      "name": "dxmedia3",
      "plugin": "fileio",
      "size": 429496729600,
      "write_back": true,
      "wwn": "a53bd5cc-85d7-47dc-a4d2-9682e9a7b82a"
    },
    {
      "aio": false,
      "alua_tpgs": [
        {
          "alua_access_state": 0,
          "alua_access_status": 0,
          "alua_access_type": 3,
          "alua_support_active_nonoptimized": 1,
          "alua_support_active_optimized": 1,
          "alua_support_offline": 1,
          "alua_support_standby": 1,
          "alua_support_transitioning": 1,
          "alua_support_unavailable": 1,
          "alua_write_metadata": 0,
          "implicit_trans_secs": 0,
          "name": "default_tg_pt_gp",
          "nonop_delay_msecs": 100,
          "preferred": 0,
          "tg_pt_gp_id": 0,
          "trans_delay_msecs": 0
        }
      ],
      "attributes": {
        "alua_support": 1,
        "block_size": 512,
        "emulate_3pc": 1,
        "emulate_caw": 1,
        "emulate_dpo": 1,
        "emulate_fua_read": 1,
        "emulate_fua_write": 1,
        "emulate_model_alias": 1,
        "emulate_pr": 1,
        "emulate_rest_reord": 0,
        "emulate_tas": 1,
        "emulate_tpu": 0,
        "emulate_tpws": 0,
        "emulate_ua_intlck_ctrl": 0,
        "emulate_write_cache": 1,
        "enforce_pr_isids": 1,
        "force_pr_aptpl": 0,
        "is_nonrot": 0,
        "max_unmap_block_desc_count": 1,
        "max_unmap_lba_count": 8192,
        "max_write_same_len": 4096,
        "optimal_sectors": 16384,
        "pgr_support": 1,
        "pi_prot_format": 0,
        "pi_prot_type": 0,
        "pi_prot_verify": 0,
        "queue_depth": 128,
        "unmap_granularity": 1,
        "unmap_granularity_alignment": 0,
        "unmap_zeroes_data": 0
      },
      "dev": "/media/iscsi-tgt/dx_dep_3.img",
      "name": "dxdep3",
      "plugin": "fileio",
      "size": 966367641600,
      "write_back": true,
      "wwn": "253f2cc0-209c-4a93-b110-9dc45e52229e"
    },
    {
      "aio": true,
      "alua_tpgs": [
        {
          "alua_access_state": 0,
          "alua_access_status": 0,
          "alua_access_type": 3,
          "alua_support_active_nonoptimized": 1,
          "alua_support_active_optimized": 1,
          "alua_support_offline": 1,
          "alua_support_standby": 1,
          "alua_support_transitioning": 1,
          "alua_support_unavailable": 1,
          "alua_write_metadata": 0,
          "implicit_trans_secs": 0,
          "name": "default_tg_pt_gp",
          "nonop_delay_msecs": 100,
          "preferred": 0,
          "tg_pt_gp_id": 0,
          "trans_delay_msecs": 0
        }
      ],
      "attributes": {
        "alua_support": 1,
        "block_size": 4096,
        "emulate_3pc": 1,
        "emulate_caw": 1,
        "emulate_dpo": 1,
        "emulate_fua_read": 1,
        "emulate_fua_write": 1,
        "emulate_model_alias": 1,
        "emulate_pr": 1,
        "emulate_rest_reord": 0,
        "emulate_tas": 1,
        "emulate_tpu": 0,
        "emulate_tpws": 0,
        "emulate_ua_intlck_ctrl": 0,
        "emulate_write_cache": 1,
        "enforce_pr_isids": 1,
        "force_pr_aptpl": 0,
        "is_nonrot": 0,
        "max_unmap_block_desc_count": 1,
        "max_unmap_lba_count": 8192,
        "max_write_same_len": 4096,
        "optimal_sectors": 2048,
        "pgr_support": 1,
        "pi_prot_format": 0,
        "pi_prot_type": 0,
        "pi_prot_verify": 0,
        "queue_depth": 128,
        "unmap_granularity": 1,
        "unmap_granularity_alignment": 0,
        "unmap_zeroes_data": 0
      },
      "dev": "/media/iscsi-tgt/dx_media_2.img",
      "name": "dxmedia2",
      "plugin": "fileio",
      "size": 858993459200,
      "write_back": true,
      "wwn": "da09b66d-5b23-4540-ab4a-f00b03af294f"
    },
    {
      "aio": true,
      "alua_tpgs": [
        {
          "alua_access_state": 0,
          "alua_access_status": 0,
          "alua_access_type": 3,
          "alua_support_active_nonoptimized": 1,
          "alua_support_active_optimized": 1,
          "alua_support_offline": 1,
          "alua_support_standby": 1,
          "alua_support_transitioning": 1,
          "alua_support_unavailable": 1,
          "alua_write_metadata": 0,
          "implicit_trans_secs": 0,
          "name": "default_tg_pt_gp",
          "nonop_delay_msecs": 100,
          "preferred": 0,
          "tg_pt_gp_id": 0,
          "trans_delay_msecs": 0
        }
      ],
      "attributes": {
        "alua_support": 1,
        "block_size": 4096,
        "emulate_3pc": 1,
        "emulate_caw": 1,
        "emulate_dpo": 1,
        "emulate_fua_read": 1,
        "emulate_fua_write": 1,
        "emulate_model_alias": 1,
        "emulate_pr": 1,
        "emulate_rest_reord": 0,
        "emulate_tas": 1,
        "emulate_tpu": 0,
        "emulate_tpws": 0,
        "emulate_ua_intlck_ctrl": 0,
        "emulate_write_cache": 1,
        "enforce_pr_isids": 1,
        "force_pr_aptpl": 0,
        "is_nonrot": 0,
        "max_unmap_block_desc_count": 1,
        "max_unmap_lba_count": 8192,
        "max_write_same_len": 4096,
        "optimal_sectors": 2048,
        "pgr_support": 1,
        "pi_prot_format": 0,
        "pi_prot_type": 0,
        "pi_prot_verify": 0,
        "queue_depth": 128,
        "unmap_granularity": 1,
        "unmap_granularity_alignment": 0,
        "unmap_zeroes_data": 0
      },
      "dev": "/media/iscsi-tgt/dx_dep_2.img",
      "name": "dxdep2",
      "plugin": "fileio",
      "size": 858993459200,
      "write_back": true,
      "wwn": "924a476a-482f-414e-8011-83909d8b3b6e"
    }
  ],
  "targets": [
    {
      "fabric": "iscsi",
      "tpgs": [
        {
          "attributes": {
            "authentication": 0,
            "cache_dynamic_acls": 1,
            "default_cmdsn_depth": 64,
            "default_erl": 0,
            "demo_mode_discovery": 1,
            "demo_mode_write_protect": 1,
            "fabric_prot_type": 0,
            "generate_node_acls": 0,
            "login_keys_workaround": 1,
            "login_timeout": 15,
            "netif_timeout": 2,
            "prod_mode_write_protect": 0,
            "t10_pi": 0,
            "tpg_enabled_sendtargets": 1
          },
          "chap_password": "{redacted}",
          "chap_userid": "iqn.1991-05.com.microsoft:{redacted}",
          "enable": true,
          "luns": [
            {
              "alias": "0cc1743f36",
              "alua_tg_pt_gp_name": "default_tg_pt_gp",
              "index": 1,
              "storage_object": "/backstores/fileio/dxmedia3"
            },
            {
              "alias": "3d56464288",
              "alua_tg_pt_gp_name": "default_tg_pt_gp",
              "index": 0,
              "storage_object": "/backstores/fileio/dxdep3"
            },
            {
              "alias": "5f63b78f76",
              "alua_tg_pt_gp_name": "default_tg_pt_gp",
              "index": 3,
              "storage_object": "/backstores/fileio/dxmedia2"
            },
            {
              "alias": "aa08fefd1d",
              "alua_tg_pt_gp_name": "default_tg_pt_gp",
              "index": 2,
              "storage_object": "/backstores/fileio/dxdep2"
            }
          ],
          "node_acls": [
            {
              "attributes": {
                "dataout_timeout": 5,
                "dataout_timeout_retries": 5,
                "default_erl": 0,
                "nopin_response_timeout": 30,
                "nopin_timeout": 15,
                "random_datain_pdu_offsets": 0,
                "random_datain_seq_offsets": 0,
                "random_r2t_offsets": 0
              },
              "chap_mutual_password": "{redacted}",
              "chap_mutual_userid": "{redacted}",
              "chap_password": "{redacted}",
              "chap_userid": "iqn.1991-05.com.microsoft:{redacted}",
              "mapped_luns": [
                {
                  "alias": "a2cce5a7e4",
                  "index": 1,
                  "tpg_lun": 1,
                  "write_protect": false
                },
                {
                  "alias": "5e0c5884fa",
                  "index": 0,
                  "tpg_lun": 0,
                  "write_protect": false
                },
                {
                  "alias": "3fb61f1c01",
                  "index": 3,
                  "tpg_lun": 3,
                  "write_protect": false
                },
                {
                  "alias": "ff50cee375",
                  "index": 2,
                  "tpg_lun": 2,
                  "write_protect": false
                }
              ],
              "node_wwn": "iqn.1991-05.com.microsoft:{redacted}"
            }
          ],
          "parameters": {
            "AuthMethod": "CHAP,None",
            "DataDigest": "CRC32C",
            "DataPDUInOrder": "Yes",
            "DataSequenceInOrder": "Yes",
            "DefaultTime2Retain": "20",
            "DefaultTime2Wait": "4",
            "ErrorRecoveryLevel": "2",
            "FirstBurstLength": "65536",
            "HeaderDigest": "CRC32C",
            "IFMarkInt": "Reject",
            "IFMarker": "No",
            "ImmediateData": "Yes",
            "InitialR2T": "Yes",
            "MaxBurstLength": "262144",
            "MaxConnections": "2",
            "MaxOutstandingR2T": "1",
            "MaxRecvDataSegmentLength": "8192",
            "MaxXmitDataSegmentLength": "262144",
            "OFMarkInt": "Reject",
            "OFMarker": "No",
            "TargetAlias": "LIO Target"
          },
          "portals": [
            {
              "ip_address": "{redacted}",
              "iser": false,
              "offload": false,
              "port": 3260
            }
          ],
          "tag": 1
        }
      ],
      "wwn": "iqn.2020-02.{redacted}:san01"
    }
  ]
}


Thanks! 

/Forza





[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux