• Cr

    linux shell

    通过一个 shell 脚本获取了一个 token 变量。然后echo “header: $token http://xxx.corp.com” ,发现被 token 截断了。

    终于发现 token 变量最后有一个\n\r导致。

  • dify部署在内网时的代理配置

    dify 版本 v1.5.0

    添加以下配置到你的 Squid 配置文件中,以允许访问 Dify 的 Marketplace:

    acl allowed_domains dstdomain .marketplace.dify.ai
    
    cache_peer proxy.corp.com parent 8080 0 no-query no-digest name=company_proxy
    cache_peer_access company_proxy allow allowed_domains
    cache_peer_access company_proxy deny all
    never_direct allow all
    
  • Smart Metric

    SMART 关键属性详解(监控硬盘健康的金指标) 硬盘健康监控的核心在于属性阈值(Threshold)与原始值(Raw Value)的对比。以下是生产环境中必须重点监控的 SMART 属性:

    SMART 关键属性详解(监控硬盘健康的金指标) 硬盘健康监控的核心在于属性阈值(Threshold)与原始值(Raw Value)的对比。以下是生产环境中必须重点监控的 SMART 属性:

    1. 致命级属性(立即故障预警)
    属性名	ID	关键表现	处置动作
    Reallocated_Sector_Ct	5	Raw > 0 (坏道重映射)	立即更换(即使值=1)
    Current_Pending_Sector	197	Raw > 0 (待修复扇区)	立即备份更换
    End-to-End_Error	184	Raw > 0 (数据完整性错误)	即刻下线(静默损坏风险)
    Offline_Uncorrectable	198	Raw > 0 (无法修复扇区)	紧急替换
    Reported_Uncorrect	187	Raw > 0 (无法纠正的读错误)	停止读写并更换
    🔥 特征:一旦出现非零值,无论 normalized value 如何,硬盘已不可信。
    
    
    2. 高危级属性(故障前兆)
    属性名	ID	风险阈值	运维意义
    Raw_Read_Error_Rate	1	Raw值持续上升 (原始读错误率)	磁头/介质退化早期信号
    UDMA_CRC_Error_Count	199	Raw > 10 (接口传输错误)	检查线缆/RAID卡,超50即换盘
    Seek_Error_Rate	7	Normalized < 阈值 (寻道错误)	机械定位精度下降
    Power-Off_Retract_Count	192	Raw > 500/年 (异常断电次数)	磁头急停加速老化
    High_Fly_Writes	189	Raw > 0 (磁头悬浮过高写入)	物理撞击/震动导致数据写偏
    ⚠️ 特征:Raw 值异常增加或 Normalized 值跌破阈值,预示3个月内可能故障。
    
    3. 寿命指标(老化评估)
    属性名	ID	企业盘报废标准	说明
    Power_On_Hours	9	> 40,000小时	超5年即进入故障高发期
    Load_Cycle_Count	193	> 300,000次	磁头伸缩设计寿命上限
    Temperature_Celsius	190/194	长期 > 45℃	高温加速电路老化
    G-Sense_Error_Rate	191	Raw > 1,000	物理震动损伤累积
    📉 特征:数值越高,MTBF(平均无故障时间)呈指数级下降。
    
  • Check Pid Cgroup

    # cat /proc/<PID>/cgroup
    1:name=systemd:/user.slice/user-1000.slice/session-2.scope
    3:cpu,cpuacct:/user.slice
    5:memory:/docker/容器ID
    
    # ps --cgroup -p <PID>
    PID CGROUP
    1234 5:memory:/docker/nginx,3:cpu:/docker/nginx
    
  • Yaml Merge Multiple Maps

    ---
    - &CENTER { x: 1, y: 2 }
    - &LEFT { x: 0, y: 2 }
    - &BIG { r: 10 }
    - &SMALL { r: 1 }
    
    # All the following maps are equal:
    
    - # Explicit keys
      x: 1
      y: 2
      r: 10
      label: center/big
    
    - # Merge one map
      << : *CENTER
      r: 10
      label: center/big
    
    - # Merge multiple maps
      << : [ *CENTER, *BIG ]
      label: center/big
    
    - # Override
      << : [ *BIG, *LEFT, *SMALL ]
      x: 1
      label: center/big
    

    https://yaml.org/type/merge.html

    related issues

    https://github.com/eemeli/yaml/issues/310

  • 新观念

    看到一个新观念,会觉得很有意思。

    像“未来简史“里面说,普通人知道自己难免一死,所以愿意冒险做一些危险的尝试,但长生的人会更怕冒险,万一出了意外,代价会特别大。

    这个观点,可以安慰自己这种普通人。。

  • 昨天梦到电子书的屏被压碎了。想到是7天无理由退货(其实压碎也不能退了,谁让是梦里呢)的最后几分钟了。赶紧拿出手机想退货。

    可是APP改版了,我怎么也找不到订单在哪里,那种梦里面着急的感觉啊,你能体会到吗?

    然后醒了,想到刚刚的梦,想到电子书还好好的。一下子开心轻松了。

  • Smartctl Output Analyze

    输出如下:

    # smartctl -aj /dev/bus/0 -d megaraid,10
    {
      "json_format_version": [
        1,
        0
      ],
      "smartctl": {
        "version": [
          7,
          2
        ],
        "svn_revision": "5155",
        "platform_info": "x86_64-linux-5.14.0-162.23.1.el9_1.x86_64",
        "build_info": "(local build)",
        "argv": [
          "smartctl",
          "-aj",
          "/dev/bus/0",
          "-d",
          "megaraid,10"
        ],
        "messages": [
          {
            "string": "Warning: This result is based on an Attribute check.",
            "severity": "warning"
          }
        ],
        "exit_status": 68
      },
      "device": {
        "name": "/dev/bus/0",
        "info_name": "/dev/bus/0 [megaraid_disk_10] [SAT]",
        "type": "sat+megaraid,10",
        "protocol": "ATA"
      },
      "model_name": "HUH721010ALE600",
      "serial_number": "JEJPJDPN",
      "wwn": {
        "naa": 5,
        "oui": 3274,
        "id": 10333059174
      },
      "firmware_version": "T3C0",
      "user_capacity": {
        "blocks": 19532873728,
        "bytes": 10000831348736
      },
      "logical_block_size": 512,
      "physical_block_size": 4096,
      "rotation_rate": 7200,
      "form_factor": {
        "ata_value": 2,
        "name": "3.5 inches"
      },
      "trim": {
        "supported": false
      },
      "in_smartctl_database": false,
      "ata_version": {
        "string": "ACS-2, ATA8-ACS T13/1699-D revision 4",
        "major_value": 1020,
        "minor_value": 41
      },
      "sata_version": {
        "string": "SATA 3.2",
        "value": 255
      },
      "interface_speed": {
        "max": {
          "sata_value": 14,
          "string": "6.0 Gb/s",
          "units_per_second": 60,
          "bits_per_unit": 100000000
        },
        "current": {
          "sata_value": 3,
          "string": "6.0 Gb/s",
          "units_per_second": 60,
          "bits_per_unit": 100000000
        }
      },
      "local_time": {
        "time_t": 1750070060,
        "asctime": "Mon Jun 16 18:34:20 2025 CST"
      },
      "smart_status": {
        "passed": true
      },
      "ata_smart_data": {
        "offline_data_collection": {
          "status": {
            "value": 130,
            "string": "was completed without error",
            "passed": true
          },
          "completion_seconds": 93
        },
        "self_test": {
          "status": {
            "value": 0,
            "string": "completed without error",
            "passed": true
          },
          "polling_minutes": {
            "short": 2,
            "extended": 1250
          }
        },
        "capabilities": {
          "values": [
            91,
            3
          ],
          "exec_offline_immediate_supported": true,
          "offline_is_aborted_upon_new_cmd": false,
          "offline_surface_scan_supported": true,
          "self_tests_supported": true,
          "conveyance_self_test_supported": false,
          "selective_self_test_supported": true,
          "attribute_autosave_enabled": true,
          "error_logging_supported": true,
          "gp_logging_supported": true
        }
      },
      "ata_sct_capabilities": {
        "value": 61,
        "error_recovery_control_supported": true,
        "feature_control_supported": true,
        "data_table_supported": true
      },
      "ata_smart_attributes": {
        "revision": 16,
        "table": [
          {
            "id": 1,
            "name": "Raw_Read_Error_Rate",
            "value": 100,
            "worst": 79,
            "thresh": 16,
            "when_failed": "",
            "flags": {
              "value": 11,
              "string": "PO-R-- ",
              "prefailure": true,
              "updated_online": true,
              "performance": false,
              "error_rate": true,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 2,
            "name": "Throughput_Performance",
            "value": 134,
            "worst": 100,
            "thresh": 54,
            "when_failed": "",
            "flags": {
              "value": 5,
              "string": "P-S--- ",
              "prefailure": true,
              "updated_online": false,
              "performance": true,
              "error_rate": false,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 96,
              "string": "96"
            }
          },
          {
            "id": 3,
            "name": "Spin_Up_Time",
            "value": 155,
            "worst": 100,
            "thresh": 24,
            "when_failed": "",
            "flags": {
              "value": 7,
              "string": "POS--- ",
              "prefailure": true,
              "updated_online": true,
              "performance": true,
              "error_rate": false,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 34386280890,
              "string": "442 (Average 405)"
            }
          },
          {
            "id": 4,
            "name": "Start_Stop_Count",
            "value": 100,
            "worst": 100,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 18,
              "string": "-O--C- ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": false
            },
            "raw": {
              "value": 27,
              "string": "27"
            }
          },
          {
            "id": 5,
            "name": "Reallocated_Sector_Ct",
            "value": 100,
            "worst": 100,
            "thresh": 5,
            "when_failed": "",
            "flags": {
              "value": 51,
              "string": "PO--CK ",
              "prefailure": true,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": true
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 7,
            "name": "Seek_Error_Rate",
            "value": 100,
            "worst": 100,
            "thresh": 67,
            "when_failed": "",
            "flags": {
              "value": 11,
              "string": "PO-R-- ",
              "prefailure": true,
              "updated_online": true,
              "performance": false,
              "error_rate": true,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 8,
            "name": "Seek_Time_Performance",
            "value": 128,
            "worst": 100,
            "thresh": 20,
            "when_failed": "",
            "flags": {
              "value": 5,
              "string": "P-S--- ",
              "prefailure": true,
              "updated_online": false,
              "performance": true,
              "error_rate": false,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 18,
              "string": "18"
            }
          },
          {
            "id": 9,
            "name": "Power_On_Hours",
            "value": 93,
            "worst": 93,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 18,
              "string": "-O--C- ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": false
            },
            "raw": {
              "value": 54075,
              "string": "54075"
            }
          },
          {
            "id": 10,
            "name": "Spin_Retry_Count",
            "value": 100,
            "worst": 100,
            "thresh": 60,
            "when_failed": "",
            "flags": {
              "value": 19,
              "string": "PO--C- ",
              "prefailure": true,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": false
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 12,
            "name": "Power_Cycle_Count",
            "value": 100,
            "worst": 100,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 50,
              "string": "-O--CK ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": true
            },
            "raw": {
              "value": 23,
              "string": "23"
            }
          },
          {
            "id": 22,
            "name": "Unknown_Attribute",
            "value": 100,
            "worst": 100,
            "thresh": 25,
            "when_failed": "",
            "flags": {
              "value": 35,
              "string": "PO---K ",
              "prefailure": true,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": false,
              "auto_keep": true
            },
            "raw": {
              "value": 100,
              "string": "100"
            }
          },
          {
            "id": 192,
            "name": "Power-Off_Retract_Count",
            "value": 99,
            "worst": 99,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 50,
              "string": "-O--CK ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": true
            },
            "raw": {
              "value": 2119,
              "string": "2119"
            }
          },
          {
            "id": 193,
            "name": "Load_Cycle_Count",
            "value": 99,
            "worst": 99,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 18,
              "string": "-O--C- ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": false
            },
            "raw": {
              "value": 2119,
              "string": "2119"
            }
          },
          {
            "id": 194,
            "name": "Temperature_Celsius",
            "value": 240,
            "worst": 166,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 2,
              "string": "-O---- ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 154620264473,
              "string": "25 (Min/Max 22/36)"
            }
          },
          {
            "id": 196,
            "name": "Reallocated_Event_Count",
            "value": 100,
            "worst": 100,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 50,
              "string": "-O--CK ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": true,
              "auto_keep": true
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 197,
            "name": "Current_Pending_Sector",
            "value": 100,
            "worst": 100,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 34,
              "string": "-O---K ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": false,
              "event_count": false,
              "auto_keep": true
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 198,
            "name": "Offline_Uncorrectable",
            "value": 100,
            "worst": 100,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 8,
              "string": "---R-- ",
              "prefailure": false,
              "updated_online": false,
              "performance": false,
              "error_rate": true,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          },
          {
            "id": 199,
            "name": "UDMA_CRC_Error_Count",
            "value": 200,
            "worst": 200,
            "thresh": 0,
            "when_failed": "",
            "flags": {
              "value": 10,
              "string": "-O-R-- ",
              "prefailure": false,
              "updated_online": true,
              "performance": false,
              "error_rate": true,
              "event_count": false,
              "auto_keep": false
            },
            "raw": {
              "value": 0,
              "string": "0"
            }
          }
        ]
      },
      "power_on_time": {
        "hours": 54075
      },
      "power_cycle_count": 23,
      "temperature": {
        "current": 25
      },
      "ata_smart_error_log": {
        "summary": {
          "revision": 1,
          "count": 170,
          "logged_count": 5,
          "table": [
            {
              "error_number": 170,
              "lifetime_hours": 51289,
              "completion_registers": {
                "error": 64,
                "status": 67,
                "count": 0,
                "lba": 0,
                "device": 0
              },
              "error_description": "Error: UNC at LBA = 0x00000000 = 0",
              "previous_commands": [
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 8,
                    "lba": 6835712,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184204448,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 8,
                    "count": 64,
                    "lba": 4583992,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184197528,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 0,
                    "count": 208,
                    "lba": 5204480,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184197527,
                  "command_name": "WRITE FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 0,
                    "count": 200,
                    "lba": 5203968,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184197527,
                  "command_name": "WRITE FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 0,
                    "count": 192,
                    "lba": 5203456,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184197527,
                  "command_name": "WRITE FPDMA QUEUED"
                }
              ]
            },
            {
              "error_number": 169,
              "lifetime_hours": 51289,
              "completion_registers": {
                "error": 64,
                "status": 67,
                "count": 0,
                "lba": 0,
                "device": 0
              },
              "error_description": "Error: UNC at LBA = 0x00000000 = 0",
              "previous_commands": [
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 0,
                    "lba": 6834688,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184197219,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 16,
                    "count": 168,
                    "lba": 8960,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184190292,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 16,
                    "count": 160,
                    "lba": 8992,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184190292,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 8,
                    "count": 152,
                    "lba": 9176,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184190292,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 24,
                    "count": 144,
                    "lba": 9136,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184190292,
                  "command_name": "READ FPDMA QUEUED"
                }
              ]
            },
            {
              "error_number": 168,
              "lifetime_hours": 51289,
              "completion_registers": {
                "error": 64,
                "status": 67,
                "count": 0,
                "lba": 0,
                "device": 0
              },
              "error_description": "Error: UNC at LBA = 0x00000000 = 0",
              "previous_commands": [
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 0,
                    "lba": 6834176,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184189985,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 8,
                    "count": 120,
                    "lba": 8395496,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184189538,
                  "command_name": "WRITE FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 8,
                    "count": 112,
                    "lba": 8413448,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184189538,
                  "command_name": "WRITE FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 8,
                    "count": 104,
                    "lba": 8529864,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184189538,
                  "command_name": "WRITE FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 97,
                    "features": 8,
                    "count": 96,
                    "lba": 4206856,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2184189538,
                  "command_name": "WRITE FPDMA QUEUED"
                }
              ]
            },
            {
              "error_number": 167,
              "lifetime_hours": 51289,
              "completion_registers": {
                "error": 64,
                "status": 67,
                "count": 0,
                "lba": 0,
                "device": 0
              },
              "error_description": "Error: UNC at LBA = 0x00000000 = 0",
              "previous_commands": [
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 248,
                    "lba": 15501824,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183755972,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 240,
                    "lba": 9019904,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183748858,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 232,
                    "lba": 9019392,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183748858,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 224,
                    "lba": 9018880,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183748858,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 216,
                    "lba": 9018368,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183748858,
                  "command_name": "READ FPDMA QUEUED"
                }
              ]
            },
            {
              "error_number": 166,
              "lifetime_hours": 51289,
              "completion_registers": {
                "error": 64,
                "status": 67,
                "count": 0,
                "lba": 0,
                "device": 0
              },
              "error_description": "Error: UNC at LBA = 0x00000000 = 0",
              "previous_commands": [
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 168,
                    "lba": 15501824,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183748397,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 32,
                    "count": 136,
                    "lba": 7669728,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183741474,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 224,
                    "count": 64,
                    "lba": 8783872,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183741474,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 80,
                    "count": 136,
                    "lba": 4948536,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183741473,
                  "command_name": "READ FPDMA QUEUED"
                },
                {
                  "registers": {
                    "command": 96,
                    "features": 0,
                    "count": 64,
                    "lba": 7647680,
                    "device": 64,
                    "device_control": 0
                  },
                  "powerup_milliseconds": 2183741462,
                  "command_name": "READ FPDMA QUEUED"
                }
              ]
            }
          ]
        }
      },
      "ata_smart_self_test_log": {
        "standard": {
          "revision": 1,
          "table": [
            {
              "type": {
                "value": 2,
                "string": "Extended offline"
              },
              "status": {
                "value": 0,
                "string": "Completed without error",
                "passed": true
              },
              "lifetime_hours": 18
            },
            {
              "type": {
                "value": 1,
                "string": "Short offline"
              },
              "status": {
                "value": 0,
                "string": "Completed without error",
                "passed": true
              },
              "lifetime_hours": 2
            }
          ],
          "count": 2,
          "error_count_total": 0,
          "error_count_outdated": 0
        }
      },
      "ata_smart_selective_self_test_log": {
        "revision": 1,
        "table": [
          {
            "lba_min": 0,
            "lba_max": 0,
            "status": {
              "value": 0,
              "string": "Not_testing"
            }
          },
          {
            "lba_min": 0,
            "lba_max": 0,
            "status": {
              "value": 0,
              "string": "Not_testing"
            }
          },
          {
            "lba_min": 0,
            "lba_max": 0,
            "status": {
              "value": 0,
              "string": "Not_testing"
            }
          },
          {
            "lba_min": 0,
            "lba_max": 0,
            "status": {
              "value": 0,
              "string": "Not_testing"
            }
          },
          {
            "lba_min": 0,
            "lba_max": 0,
            "status": {
              "value": 0,
              "string": "Not_testing"
            }
          }
        ],
        "flags": {
          "value": 0,
          "remainder_scan_enabled": false
        },
        "power_up_scan_resume_minutes": 0
      }
    }
    

    分析如下

    我们首先看一下硬盘的基本信息:
    型号:HUH721010ALE600
    序列号:JEJPJDPN
    容量:10,000,831,348,736 字节(约10TB)
    接口:SATA 3.2, 6.0 Gb/s
    转速:7200 RPM
    使用时间:54075 小时(约6.17年)
    通电次数:23次
    
    关键点分析:
    
    SMART状态:passed: true,表示SMART总体状态通过。
    关键属性:
    Reallocated_Sector_Ct (ID 5): 原始值=0,表示没有重映射扇区。
    Current_Pending_Sector (ID 197): 原始值=0,表示没有等待重映射的扇区。
    Offline_Uncorrectable (ID 198): 原始值=0,表示没有离线无法修复的扇区。
    UDMA_CRC_Error_Count (ID 199): 原始值=0,表示没有接口通信错误。
    以上都是非常关键的健康指标,目前都为0,是良好的状态。
    其他属性:
    Raw_Read_Error_Rate (ID 1): 原始值为0,正常。
    Spin_Up_Time (ID 3): 原始值较大,但显示字符串为"442 (Average 405)",说明自检的旋转时间在正常范围。
    Start_Stop_Count (ID 4): 27次,通电次数23次,说明有几次可能是意外断电?但次数不多,且属性值100(最好100)正常。
    Power_Cycle_Count (ID 12): 23次,与通电次数一致。
    Power_Off_Retract_Count (ID 192): 2119次,这个属性表示磁头因意外断电而缩回的次数。通常这个值应该和通电次数接近,但这里通电次数只有23次,而磁头缩回次数达到2119次,这可能意味着硬盘经常意外断电(比如突然断电),或者是因为RAID卡频繁进行重置?需要关注。
    Load_Cycle_Count (ID 193): 2119次,这个值通常表示磁头加载/卸载次数,对于台式机硬盘,设计值通常为30万到60万次,所以2119次不算高,但需要结合其他情况看。
    Temperature_Celsius (ID 194): 当前温度为25°C,最高36°C,最低22°C,温度控制良好。
    错误日志:
    在ata_smart_error_log中,我们看到有5条错误记录(error_number从166到170),这些错误都发生在大约51289小时前(注意当前是54075小时,也就是大约2790小时前,约116天前)。
    所有错误都是“UNC”(Uncorrectable Error)错误,发生在LBA 0(可能是日志记录问题,实际LBA可能不同)的读取操作中,错误发生时执行的命令都是FPDMA QUEUED(即NCQ读写)。
    这些错误发生在51289小时,而当前已经54075小时,说明是过去发生的错误,而且没有新的错误发生。但是,为什么会有5次读取错误?这可能是因为当时有介质错误或者传输问题,但后续可能已经通过重试成功,或者没有再次发生。
    自检日志:
    最后一次自检是扩展自检(Extended offline)在18小时(从开始使用算起)完成且无错误,短自检在2小时时完成无错误。但注意,这些自检是很久之前做的(因为使用时间已经5万多小时),所以建议近期再做一次自检。
    注意事项:
    硬盘已经使用了超过5.4万小时,虽然关键属性都正常,但需要注意备份重要数据,因为任何硬盘在这个使用时间后风险都会增加。
    错误日志中记录的错误虽然发生在过去,但也说明硬盘曾经出现过读取错误,这可能是一个早期警告。建议关注后续是否有新的错误出现。
    另外,关于192属性(Power-Off_Retract_Count)和193属性(Load_Cycle_Count)都是2119次,而通电次数只有23次,这个比例很奇怪。通常,每次通电可能会有多次磁头加载/卸载,但2000多次相对于23次通电,平均每次通电要发生90多次,这有些偏高。可能的原因是硬盘经常进入节能模式(磁头缩回),或者是RAID卡频繁重置导致。虽然这个值本身并不代表故障,但频繁的磁头加载/卸载会消耗硬盘的机械寿命。
    结论:
    这块硬盘目前从SMART数据上看是健康的,但是使用时间已经很长(6年多),并且过去发生过读取错误,磁头缩回次数相对通电次数偏高。建议:
    - 运行一次完整的SMART自检(长测试)以确认当前状态。
    - 密切关注硬盘的SMART数据变化,特别是重映射扇区和待处理扇区的数量。
    - 确保重要数据已经备份,因为机械硬盘在长时间使用后故障率会上升。
    - 如果可能,检查电源或RAID卡设置,以减少意外断电或硬盘重置的情况。
    
    注意:由于该硬盘不在smartctl数据库(in_smartctl_database: false),一些属性(如ID 22)是未知属性,但我们分析的关键属性都是已知且正常的。
    
  • Disk State In Storcli

    总结一下,在storcli64 /c0 show all的磁盘列表中,常见的物理磁盘状态有:

    Onln: 在线(通常指已配置在虚拟磁盘中且正常工作)
    UGood: 未配置但良好
    JBOD: 配置为直通磁盘
    GHS: 全局热备
    DHS: 专用热备
    UBad: 未配置但故障
    Offln: 离线(故障)
    Msng: 缺失
    Rbld: 重建中
    Pdgd: 预测故障(即将失效)
    Frn: 外来磁盘(带有其他控制器的配置)
    
  • 马来西亚-流水帐

    6.1 凌晨1点飞吉隆坡,上午7点到达。

    和曾可他们联系了好一会,怎么都找不到对方,发现不在一个航站楼。。

    打车到酒店,寄存下行李(发现自己英语啥也听不懂),走去双子塔吃饭,一家网红餐厅,还不错。

    然后打车去Best榴莲,吃了一个拼盘,然后又买了两个整个的。味道不错。价格比后面的沙巴以及国内便宜很多。

    回酒店睡觉。晚8点,去夜市吃个海鲜。

    吃完去双子塔看夜景,拍照。

    6.2 上午飞亚庇,入住后,打车去网红餐厅,但关门了。就去了边上一家。吃完去订了后天的环滩岛。

    然后去游泳池,泡一会,一边打游戏,一边等日落。

    晚上去金潮海鲜吃饭,皮皮虾很大,也很贵。

    6.3 上午无事,中午去另一家网红餐厅吃饭,结果还是关门。隔壁有家排着长队,感觉不错,进去吃了。味道一般。

    下午海钓。船上晚餐。

    然后去天桥下榴莲街。小摊不行,都骗人的。榴莲仔还行,就是价格和味道都不如吉隆坡。

    6.4 没起来,环滩岛没去成。曾可他们去了。

    我们中午吃了第一天想去的网红餐厅,然后按摩,再去咖啡店。

    等曾可他们回来,去吃了最后一顿海鲜,敬文。价格美丽,味道也不错。

    旁边有个榴莲摊,味道和价格都比榴莲仔略好一点。吃了两个。

  • 1
  • 2