AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[xfs](server)

Martin Hope
siemon
Asked: 2025-04-17 23:22:39 +0800 CST

尽管 fio 性能出色,但 XFS + 多路径 LUN 上的读/写速度极慢(Oracle Linux 9.5)

  • 6

环境:

  • 操作系统:Oracle Linux 9.5(systemd 252)
  • 文件系统:XFS
  • 存储:通过 multipathd 的 IBM SAN LUN(ALUA 配置)
  • 设备:/dev/mapper/mpath[a-d]1
  • 安装选项:rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota,_netdev
  • 系统没有内存压力,CPU 使用率为零(非生产预部署)

问题:像 cp、rsync 甚至直接 dd(使用 iflag=direct 或 oflag=direct)这样的简单文件操作,在 XFS 文件系统之间来回执行时,速度都极其缓慢(低至 2 MB/s),即使复制小文件(例如 50 MB)也是如此。然而,在使用 fio 测试时,我获得了极佳的吞吐量——无论是对已挂载的文件系统还是直接对设备(例如/dev/mapper/mpathc1) ,读取速度都高达 3 GB/s,写入速度高达 1.8 GB/s。

甚至cat file > /dev/null显示 3.2 MB/s,而相同文件的 fio 显示 2-3 GB/s。

我尝试过的方法:

  • 使用 iflag=direct/oflag=direct 禁用缓存
  • 在同步和异步挂载选项之间切换(无影响)
  • 测试了 I/O 统计和 cgroups(运行良好)
  • 已验证的 ALUA 和多路径优先级(适当平衡,无路径错误)
  • 使用 nice、ionice、systemd-run --scope 与 IOWeight、CPUWeight
  • 使用 strace 分析,显示正常的复制循环(读/写系统调用)
  • 将零设置为/proc/sys/vm/dirty_ratio和dirty_background_ratio
  • 确保multipath.conf配置正确(循环、no_path_retry 等)

值得注意的行为:

  • 对设备的所有读/写命令(例如,dd、cat、cp、rsync)都运行得非常慢。
  • fio 运行完美——基于文件和基于原始设备的测试。
  • 该问题似乎与 SAN 无关或与带宽限制无关。
  • I/O 统计数据(iostat、vmstat、iotop)显示这些缓慢操作期间的活动很少。
  • 文件系统无损坏——XFS 挂载正常,无任何日志或 dmesg 错误。系统全新。

问题:如何解释 fio 与 cp 或 rsync 等基本文件操作之间的巨大性能差异?

[root@oracle01 ~]# fio --name=read_test --filename=/u01/oradata/edm/testfile --rw=read --bs=64k --size=50M --iodepth=32 --numjobs=4 --time_based --runtime=10s --ioengine=libaio --group_reporting
{...}
Jobs: 4 (f=4): [R(4)][100.0%][r=42.3MiB/s][r=676 IOPS][eta 00m:00s]

[root@oracle01 ~]# fio --name=read_test --filename=/u01/oradata/edm/testfile --rw=read --bs=64k --size=50M --iodepth=32 --numjobs=4 --time_based --runtime=10s --ioengine=libaio --group_reporting --direct=1
{...}
Jobs: 4 (f=4): [R(4)][100.0%][r=3523MiB/s][r=56.4k IOPS][eta 00m:00s]

[root@oracle01 ~]# rsync -ah --progress OracleLinux-R9-U5-x86_64-dvd.iso  /u01/oradata/edm/tesst
sending incremental file list
OracleLinux-R9-U5-x86_64-dvd.iso
          7.18M   0%    1.56MB/s    2:11:12  ^C
xfs
  • 1 个回答
  • 36 Views
Martin Hope
Ealrann
Asked: 2021-09-23 11:46:55 +0800 CST

增加 NFS 服务器上的内存使用率

  • 0

我正在生成最终通过 NFS v4.2 在 10Gb 网络上复制到服务器的数据(100GB 文件)。这些文件存储在许多 HDD 上,采用 XFS 格式(每个目标驱动器一个副本)。

当复制任务正在运行时:

  • 客户端内存使用量很大(可能超过 64GB,它需要尽可能多的内存)。
  • 但是服务器上几乎没有使用内存。

我想减少客户端的内存使用量,因为它们会不断产生数据并且会减慢它们的速度。相反,服务器主要是未使用的。

我想由于服务器上的 HDD 速度很慢,客户端会缓冲尽可能多的数据以减少副本阻塞。我无法更改硬件设置。

有没有办法强制服务器缓存更多数据? 我宁愿优先使用服务器内存而不是客户端内存。

NFS 配置:

10.0.3.1:/          /mnt/field  nfs  nfsvers=4.2,noatime,nodiratime,_netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10 0 0

/etc/exports:

/mnt        10.0.0.0/16(rw,async,fsid=0,no_subtree_check,crossmnt)

服务器上的网卡配置:

MTU 9000
rinbuffer tx 512, rx 1024

客户端网卡配置:

MTU 9000
rinbuffer tx 1024, rx 512

编辑: 根据要求,/proc/meminfo:

客户端服务器 - - - -------------------------

在此处输入图像描述

此客户端上的内存使用情况的监视器:

在此处输入图像描述

网络使用:

在此处输入图像描述

注意:客户端使用大 tmpfs (100GB) 来计算。我认为这个 tmpfs 永远不会从可用内存计数中减去。

编辑2:

网络和内存使用之间的相关性在另一个客户端上更为明显(我应该从那个开始)。此客户端不使用任何 tmpfs。

在此处输入图像描述

在此处输入图像描述

linux nfs networking xfs
  • 2 个回答
  • 712 Views
Martin Hope
Ben
Asked: 2021-06-12 08:24:13 +0800 CST

断电后 xfs 超级块损坏

  • 0

像我之前的其他人一样,我的 xfs 驱动器上的 superblock 已损坏。我试过 xfs_repair 和 xfs_repair -L 来恢复驱动器,但都报告了相同的结果:

Phase 1 - find and verify superblock...
superblock read failed, offset 0, size 524288, ag 0, rval -1

fatal error -- Input/output error

{mkfs.xfs -Nf /dev/sdb1} 报告以下内容:

meta-data=/dev/sdb1              isize=512    agcount=4, agsize=244188544 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=976754176, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=476930, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

在关注了关于这个主题的各种帖子后,这些帖子都与我上面尝试过的内容相似,我有一种下沉的感觉,驱动器内容丢失了(感谢 EDF Energy)。有没有人有任何进一步的恢复建议?

编辑:SMART扫描结果...

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD40EFRX-68N32N0  1
Serial Number:    PBGJYR4S
LU WWN Device Id: 5 000cca 23dc7b57b
Firmware Version: MJAOA5F0
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Fri Jun 11 19:11:40 2021 BST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 248) Self-test routine in progress...
                                        80% of test remaining.
Total time to complete Offline
data collection:                (   24) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        (   1) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   136   136   054    Pre-fail  Offline      -       80
  3 Spin_Up_Time            0x0007   176   176   024    Pre-fail  Always       -       411 (Average 468)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       14
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   121   121   020    Pre-fail  Offline      -       34
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       6222
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       14
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       273
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       273
194 Temperature_Celsius     0x0002   142   142   000    Old_age   Always       -       42 (Min/Max 20/42)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   174   174   000    Old_age   Always       -       1272

SMART Error Log Version: 1
ATA Error Count: 1272 (device log contains only the most recent five errors)
        CR = Command Register [HEX]
        FR = Features Register [HEX]
        SC = Sector Count Register [HEX]
        SN = Sector Number Register [HEX]
        CL = Cylinder Low Register [HEX]
        CH = Cylinder High Register [HEX]
        DH = Device/Head Register [HEX]
        DC = Device Command Register [HEX]
        ER = Error register [HEX]
        ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 1272 occurred at disk power-on lifetime: 6220 hours (259 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 21 5f b7 c0 01  Error: ICRC, ABRT 33 sectors at LBA = 0x01c0b75f = 29407071

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 80 00 b7 c0 e0 08   1d+02:04:04.303  READ DMA EXT
  25 00 f8 00 b6 c0 e0 08   1d+02:04:04.303  READ DMA EXT
  25 00 08 f8 b5 c0 e0 08   1d+02:04:04.302  READ DMA EXT
  25 00 08 f0 b5 c0 e0 08   1d+02:04:04.302  READ DMA EXT
  25 00 08 e8 b5 c0 e0 08   1d+02:04:04.302  READ DMA EXT

Error 1271 occurred at disk power-on lifetime: 6220 hours (259 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 01 97 b5 c0 01  Error: ICRC, ABRT 1 sectors at LBA = 0x01c0b597 = 29406615

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 90 b5 c0 e0 08   1d+02:04:04.096  READ DMA EXT
  25 00 08 88 b5 c0 e0 08   1d+02:04:04.095  READ DMA EXT
  25 00 08 80 b5 c0 e0 08   1d+02:04:04.095  READ DMA EXT
  25 00 08 78 b5 c0 e0 08   1d+02:04:04.095  READ DMA EXT
  25 00 08 70 b5 c0 e0 08   1d+02:04:04.095  READ DMA EXT

Error 1270 occurred at disk power-on lifetime: 6220 hours (259 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 81 7f b5 c0 01  Error: ICRC, ABRT 129 sectors at LBA = 0x01c0b57f = 29406591

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 00 00 b4 c0 e0 08   1d+02:04:03.858  READ DMA EXT
  25 00 f8 08 0a 00 e0 08   1d+02:04:03.856  READ DMA EXT
  c8 00 08 f8 08 00 e0 08   1d+02:04:03.856  READ DMA
  c8 00 08 f0 08 00 e0 08   1d+02:04:03.856  READ DMA
  c8 00 08 e8 08 00 e0 08   1d+02:04:03.855  READ DMA

Error 1269 occurred at disk power-on lifetime: 6220 hours (259 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 01 c7 08 00 00  Error: ICRC, ABRT 1 sectors at LBA = 0x000008c7 = 2247

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 08 c0 08 00 e0 08   1d+02:04:03.648  READ DMA
  c8 00 08 b8 08 00 e0 08   1d+02:04:03.641  READ DMA
  27 00 00 00 00 00 e0 08   1d+02:04:03.640  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 08   1d+02:04:03.638  IDENTIFY DEVICE
  ef 03 42 00 00 00 a0 08   1d+02:04:03.636  SET FEATURES [Set transfer mode]

Error 1268 occurred at disk power-on lifetime: 6220 hours (259 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 01 bf 08 00 00  Error: ICRC, ABRT 1 sectors at LBA = 0x000008bf = 2239

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 08 b8 08 00 e0 08   1d+02:04:03.440  READ DMA
  c8 00 08 b0 08 00 e0 08   1d+02:04:03.440  READ DMA
  c8 00 08 a8 08 00 e0 08   1d+02:04:03.440  READ DMA
  c8 00 08 a0 08 00 e0 08   1d+02:04:03.440  READ DMA
  c8 00 08 98 08 00 e0 08   1d+02:04:03.440  READ DMA

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Vendor (0xb0)       Completed without error       00%     36443         -
# 2  Vendor (0x71)       Completed without error       00%     36443         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
xfs
  • 2 个回答
  • 714 Views
Martin Hope
HCSF
Asked: 2021-03-02 23:50:17 +0800 CST

即使指定了`fio`也不会超时?

  • 1
# fio --name=random-write --directory=/mnt/test/ --ioengine=posixaio --rw=randwrite -bs=4k --numjobs=1 --size=4g -iodepth=1 -runtime=600 --time_based --end_fsync=1
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.7
Starting 1 process
random-write: Laying out IO file (1 file / 4096MiB)
Jobs: 1 (f=1): [w(1)][100.0%][r=0KiB/s,w=0KiB/s][r=0,w=0 IOPS][eta 00m:00s]    

知道为什么它在我设置的 60 分钟而不是 600 秒后返回吗?

我检查了dmesg,没有错误:

[Mon Mar  1 20:53:36 2021] XFS (sda2): Mounting V5 Filesystem
[Mon Mar  1 20:53:37 2021] XFS (sda2): Starting recovery (logdev: internal)
[Mon Mar  1 20:53:45 2021] XFS (sda2): Ending recovery (logdev: internal)

我同时在同一个盒子上的另一个驱动器(而不是 SSD)上运行了相同的命令,它按时完成并返回。

提前致谢!

filesystems xfs centos7 hdd fio
  • 1 个回答
  • 213 Views
Martin Hope
HCSF
Asked: 2021-02-10 23:01:41 +0800 CST

10TB硬盘分区失败?

  • 2

在我再次尝试对 10TB 硬盘进行分区之前,parted看到了它:

# parted /dev/sdb
(parted) print list                                                       
Model: ATA ST10000NM0016-1T (scsi)
Disk /dev/sdb: 10.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  10.0TB  10.0TB  xfs          primary
....
....
....

然后,我只是尝试再次分区但失败了:

[root@localhost ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Error: end of file while reading /dev/sdb
Retry/Ignore/Cancel? Retry                                                
Error: end of file while reading /dev/sdb
Retry/Ignore/Cancel? Cancel                                               
(parted) q                                                                
Warning: Error fsyncing/closing /dev/sdb: Input/output error
Retry/Ignore? Retry                                                       
Warning: Error fsyncing/closing /dev/sdb: Input/output error
Retry/Ignore? Ignore                                                      

然后,驱动消失了。我试图重新启动,但仍然看不到驱动器。

这篇文章建议使用gdisk /dev/sdb. 但是,我认为它已经损坏到gdisk无法识别:

# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Problem opening /dev/sdb for reading! Error is 2.
The specified file does not exist!

lsbk的输出:

# lsblk 
NAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                    8:0    1 447.1G  0 disk 
├─sda1                 8:1    1     2G  0 part /boot
└─sda2                 8:2    1 445.1G  0 part 
  ├─centos-root      253:0    0    30G  0 lvm  /
  ├─centos-swap      253:1    0     4G  0 lvm  [SWAP]
  ├─centos-var       253:2    0    30G  0 lvm  /var
  ├─centos-coredumps 253:3    0    30G  0 lvm  /coredumps
  └─centos-latest    253:4    0 351.1G  0 lvm  /latest

ls -ltr /dev/sd*的输出:

brw-rw---- 1 root disk 8, 0 Feb 10 16:00 /dev/sda
brw-rw---- 1 root disk 8, 2 Feb 10 16:00 /dev/sda2
brw-rw---- 1 root disk 8, 1 Feb 10 16:00 /dev/sda1

lshw -class disk,parted -l也fdisk -l看不到驱动器。

我看到一些可疑的东西dmesg:

[Wed Feb 10 13:27:39 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:27:49 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:28:06 2021] ata13: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Wed Feb 10 13:28:11 2021] ata13.00: qc timeout (cmd 0xec)
[Wed Feb 10 13:28:11 2021] ata13.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Wed Feb 10 13:28:17 2021] ata13: link is slow to respond, please be patient (ready=0)
[Wed Feb 10 13:28:21 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:28:31 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:28:41 2021] ata13: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Wed Feb 10 13:28:51 2021] ata13.00: qc timeout (cmd 0xec)
[Wed Feb 10 13:28:51 2021] ata13.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Wed Feb 10 13:28:51 2021] ata13: limiting SATA link speed to 3.0 Gbps
[Wed Feb 10 13:28:52 2021] ata13: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Wed Feb 10 13:29:13 2021] ata13.00: qc timeout (cmd 0x47)
[Wed Feb 10 13:29:13 2021] ata13.00: READ LOG DMA EXT failed, trying unqueued
[Wed Feb 10 13:29:13 2021] ata13.00: failed to get NCQ Send/Recv Log Emask 0x40
[Wed Feb 10 13:29:13 2021] ata13.00: ATA-10: ST10000NM0016-1TT101, SNE0, max UDMA/133
[Wed Feb 10 13:29:13 2021] ata13.00: 19532873728 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[Wed Feb 10 13:29:13 2021] ata13.00: failed to set xfermode (err_mask=0x40)
[Wed Feb 10 13:29:13 2021] ata13.00: disabled
[Wed Feb 10 13:29:13 2021] ata13: hard resetting link
[Wed Feb 10 13:29:23 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:29:23 2021] ata13: hard resetting link
[Wed Feb 10 13:29:33 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:29:33 2021] ata13: hard resetting link
[Wed Feb 10 13:29:39 2021] ata13: link is slow to respond, please be patient (ready=0)
[Wed Feb 10 13:29:49 2021] ata13: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Wed Feb 10 13:29:49 2021] ata13: EH complete

==================================

更新#1

我看了这篇文章然后关机了acpi,另一篇文章提示电源问题所以我关机了tune-adm。然后,磁盘回来了,我就像上次一样运行,但这一次,没有parted /dev/sdb,但是当我继续时 ,它给了我。我重新启动机器并再次尝试:mklabel gptError: end of file while reading /dev/sdbmkpart primary xfs 0% 1%Error: /dev/sdb: unrecognised disk label

(parted) mkpart primary xfs 0% 1%                                         
(parted) mkpart primary xfs 1% 2%                                         
(parted) mkpart primary ext4 2% 3%                                        
(parted) mkpart primary ext4 3% 4%
(parted) mkpart primary btrfs 4% 5%                                       
(parted) mkpart primary btrfs 5% 6%                                       
(parted) mkpart primary xfs 6% 100%                                       
(parted) print                                                            
Model: ATA ST10000NM0016-1T (scsi)
Disk /dev/sdb: 10.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  100GB   100GB   xfs          primary
 2      100GB   200GB   100GB                primary
 3      200GB   300GB   100GB                primary
 4      300GB   400GB   100GB                primary
 5      400GB   500GB   100GB                primary
 6      500GB   600GB   100GB                primary
 7      600GB   10.0TB  9401GB               primary

(parted) q                                                                

有用。但这似乎很不稳定。我dmesg再次检查,发现类似但不同的故障:

[Thu Feb 11 00:58:31 2021] ata15.00: qc timeout (cmd 0xec)
[Thu Feb 11 00:58:31 2021] ata15.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Thu Feb 11 00:58:32 2021] ata15: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Thu Feb 11 00:58:42 2021] ata15.00: qc timeout (cmd 0xec)
[Thu Feb 11 00:58:42 2021] ata15.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Thu Feb 11 00:58:42 2021] ata15: limiting SATA link speed to 3.0 Gbps
[Thu Feb 11 00:58:44 2021] ata15: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Thu Feb 11 00:59:12 2021] ata15.00: ATA-10: ST10000NM0016-1TT101, SNE0, max UDMA/133
[Thu Feb 11 00:59:12 2021] ata15.00: 19532873728 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[Thu Feb 11 00:59:12 2021] ata15.00: configured for UDMA/133
[Thu Feb 11 00:59:12 2021] scsi 14:0:0:0: Direct-Access     ATA      ST10000NM0016-1T SNE0 PQ: 0 ANSI: 5
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] 19532873728 512-byte logical blocks: (10.0 TB/9.09 TiB)
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] 4096-byte physical blocks
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Write Protect is off
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[Thu Feb 11 00:59:19 2021]  sdb:
[Thu Feb 11 00:59:19 2021] sd 14:0:0:0: [sdb] Attached SCSI removable disk
[Thu Feb 11 00:59:37 2021] SGI XFS with ACLs, security attributes, no debug enabled

知道发生了什么吗?

谢谢。

hard-drive xfs centos7 fdisk parted
  • 2 个回答
  • 421 Views
Martin Hope
GoNiS
Asked: 2020-12-22 11:09:30 +0800 CST

如何强制重新读取 XFS 文件系统内容

  • 2

在我们的计算集群中,我们建立了一种简单但非常有效的方式来向计算节点提供数据。

存储系统提供给与 LVS 合并的 lun,在此之上,我们构建了一个大 (80 TiB) XFS 分区。所有节点都连接到存储舱,并且可以毫无问题地识别 LVS 和 XFS。一个节点以读/写 (RW) 模式挂载 XFS,其他节点以只读 (RO) 模式挂载。

现在,问题是每当通过 RW 节点写入新内容时,我必须在其他节点中重新挂载 XFS,以便在 RO 节点中看到新文件。这个操作很简单:umount后面跟着一个mount.

umount /data
mount /data

然而,这个解决方案不是很好,因为这个 RO 节点可能正在读取数据并且可能无法重新安装或导致超时。我想知道是否还有腐败。

那么,现在有人可以强制 XFS(和操作系统,在本例中为 Centos 7)重新读取文件表而不重新挂载吗?

filesystems xfs centos7
  • 3 个回答
  • 772 Views
Martin Hope
Marco Shaw
Asked: 2020-12-19 07:30:03 +0800 CST

不需要分区表?

  • 0

我惊讶地发现我的两个环境有不同的设置。一个具有 DOS 分区样式,而另一个似乎没有定义任何类型的表。

例如,我对 Oracle 位于原始磁盘上的概念有点熟悉,这里也一样吗?XFS 可以简单地放在没有分区表的原始磁盘上吗?

例如,此磁盘具有完全工作的 XFS FS。在过去的几年里,我已经能够调整它的大小,等等。

# fdisk -l /dev/sdc

Disk /dev/sdc: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders, total 1258291200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x08020000

Disk /dev/sdc doesn't contain a valid partition table
xfs
  • 1 个回答
  • 76 Views
Martin Hope
runr
Asked: 2020-08-28 03:22:06 +0800 CST

如何干净地杀死卡住的 docker 服务?

  • 1

使用具有 3.10 内核的 Centos7,docker 19.03.12。

最终,其中一个 docker 映像已满,并将整个/var/挂载写入 100%,导致 docker 服务和正在运行的容器都崩溃。

现在还有 2 个僵尸进程我无法杀死(使用kill -9or killall:

ps axjf | grep docker
    1 30215 30215 30215 ?           -1 Ds       0   0:00 [docker-entrypoi]
    1 32063 32063 32063 ?           -1 Zsl      0   0:00 [dockerd] <defunct>

同时,/var/log/messages我得到:

kernel: XFS (dm-8): Failing async write on buffer block 0xb78170. Retrying async write.
kernel: XFS (dm-8): metadata I/O error: block 0xb78170 ("xfs_buf_iodone_callback_error") error 28 numblks 8

似乎某些 IO 仍在尝试写入一些数据。这似乎在无限循环中重复,我不知道如何阻止它。

du -sh并在检查文件ls -al时快速挂起。/var/lib/docker

此外,service docker stop/start还会挂起;top报告非常高的加载/等待时间(大约234 核机器)。

我的问题:在不重新启动机器的情况下,干净地停止xfs写入、杀死僵尸进程并重新启动服务的最佳方法是什么?

centos xfs docker
  • 1 个回答
  • 2815 Views
Martin Hope
King David
Asked: 2020-08-13 01:02:50 +0800 CST

RHEL 7.2 上的 Docker 安装和文件系统要求

  • -1

我们有旧RHEL机器version 7.2

我们准备在这台服务器上安装 docker 服务

问题是服务器的文件系统是使用ftype=0参数创建的,而 docker 需要ftype=1

一种选择当然是使用 mkfs 格式化磁盘并使用ftype=1

但是我们想保留原来的操作系统而不是格式化磁盘

第二种选择是执行帖子中定义的步骤 - https://superuser.com/questions/1321926/recreating-an-xfs-file-system-with-ftype-1/1321963#1321963

但是这个步骤是有风险的,需要关闭服务器

尽管我们正在寻找第三种替代方案,以便在 rhel 7.2 版上实现 docker 安装ftype=0

例如,有趣的方向可能是通过向服务器添加一个新磁盘并创建XFS文件系统,使用ftype=1,但我们不确定如何在附加磁盘上定义 docker 安装(因为这个磁盘实际上没有操作系统)。

我们很乐意开箱即用地获得任何其他想法。

redhat filesystems xfs docker docker-machine
  • 2 个回答
  • 260 Views
Martin Hope
Nicolas De Jay
Asked: 2020-07-15 16:33:42 +0800 CST

在 2 个 ADAPT(类似 RAID6)卷上确认 XFS 文件系统和 LVM 卷条带化的参数

  • 3

我们正在为文件服务器设置 ADAPT0(类似 RAID-60)配置。

我们有六个磁盘池。每个由 14 个磁盘组成,并使用 ADAPT 进行设置。根据戴尔的官方白皮书,ADAPT 与 RAID 6 类似,但分配的是备用容量。在第 13 页上,指示每个磁盘池的块大小为 512 KiB,条带宽度为 4 MiB(超过 8 个磁盘)。

我的理解是,对于每 14 个磁盘池,保留 2 个磁盘容量作为备用磁盘,剩余 12 个磁盘(2.4 个磁盘容量)的 20% 用于奇偶校验,80%(9.6 个磁盘)用于存储。但是,块大小为 512 KiB,条带宽度仍为 4MiB,因为我们只在一个连续块中写入 8 个磁盘。

为了实现 ADAPT0(类似 RAID-60)配置,我们随后创建了一个逻辑卷,该卷使用 LVM 在两个磁盘池上进行条带化。我们的意图是最终拥有 3 个条带卷,每个卷在两个磁盘池上进行条带化。我们使用了与硬件 RAID (512 KiB) 相匹配的条带大小:

$ vgcreate vg-gw /dev/sda /dev/sdb
$ lvcreate -y --type striped -L 10T -i 2 -I 512k -n vol vg-gw

接下来,在条带化逻辑卷上设置 XFS 文件系统。根据XFS.org和其他一些来源的指南,我们将条带单元su与 LVM 和 RAID 条带大小 (512k) 进行匹配,并将条带宽度设置sw为 16,因为我们有 16 个“数据磁盘”。

$ mkfs.xfs -f -d su=512k,sw=16 -l su=256k /dev/mapper/vg--gw-vol
$ mkdir -p /vol/vol
$ mount -o rw -t xfs /dev/mapper/vg--gw-vol /vol/vol

我们对 4KiB 块大小的顺序 I/O 性能进行了基准测试/dev/sda,/dev/sdb并/dev/mapped/vg--gw-vol使用

fio --name=test --ioengine=posixaio --rw=rw --bs=4k --numjobs=1 --size=256g --iodepth=1 --runtime=300 --time_based --end_fsync=1

我们惊讶地获得了类似的表现:

       Volumes         Throughput   Latency
---------------------  ----------  ----------
/dev/sda                198MiB/s    9.50 usec
/dev/sdb                188MiB/s   10.11 usec
/dev/mapped/vg--gw-vol  209MiB/s    9.06 usec

如果我们使用 I/O 监控工具bwm-ng,我们可以看到两者的 I/O/dev/sda以及/dev/sdb写入时的I/O /dev/mapped/vg--gw-vol。

我们是否正确配置?进一步来说:

(1) 将 LVM 条带大小与硬件 RAID (512 KiB) 的大小对齐是否正确?

(2) 对齐 XFS 条带单元和宽度是否正确(512 KiB 条带大小和 16 个数据磁盘),或者我们应该“抽象”底层卷(4 MiB 条带大小和 2 个数据磁盘)?

(3) 更令人困惑的是这里块设备的自我报告输出:

$ grep "" /sys/block/sda/queue/*_size
/sys/block/sda/queue/hw_sector_size:512
/sys/block/sda/queue/logical_block_size:512
/sys/block/sda/queue/max_segment_size:65536
/sys/block/sda/queue/minimum_io_size:4096
/sys/block/sda/queue/optimal_io_size:1048576
/sys/block/sda/queue/physical_block_size:4096

谢谢!

performance lvm filesystems raid xfs
  • 1 个回答
  • 901 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve