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
    • 最新
    • 标签
主页 / user-469456

HCSF's questions

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
HCSF
Asked: 2020-02-16 04:10:25 +0800 CST

如何使用 systemd 在启动时设置 cpumask?

  • 0

我有以下服务:

[Unit]
Description=foo

[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/opt/script/bar.sh

[Install]
WantedBy=multi-user.target

并且bar.sh:

#!/bin/bash
echo 1 > /sys/bus/workqueue/devices/writeback/cpumask
cat /sys/bus/workqueue/devices/writeback/cpumask > /tmp/writeback

然后我重新启动后,cat /tmp/writeback看起来不错: 000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001

但/sys/bus/workqueue/devices/writeback/cpumask被覆盖回默认值:

ffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff

想法?

bash centos7 systemd
  • 1 个回答
  • 202 Views
Martin Hope
HCSF
Asked: 2019-12-19 05:39:11 +0800 CST

`numastat` 中的免费大页数不正确

  • 0
$ numastat -vm

Per-node system memory usage (in MBs):
                          Node 0           Total
                 --------------- ---------------
MemTotal                32464.24        32464.24
MemFree                 30993.97        30993.97
MemUsed                  1470.27         1470.27
Active                     47.68           47.68
Inactive                  158.69          158.69
Active(anon)               10.48           10.48
Inactive(anon)              8.99            8.99
Active(file)               37.21           37.21
Inactive(file)            149.70          149.70
Unevictable                 0.00            0.00
Mlocked                     0.00            0.00
Dirty                       0.00            0.00
Writeback                   0.00            0.00
FilePages                 196.26          196.26
Mapped                     13.79           13.79
AnonPages                   9.82            9.82
Shmem                       9.36            9.36
KernelStack                 3.86            3.86
PageTables                  1.91            1.91
NFS_Unstable                0.00            0.00
Bounce                      0.00            0.00
WritebackTmp                0.00            0.00
Slab                       41.54           41.54
SReclaimable               17.00           17.00
SUnreclaim                 24.54           24.54
AnonHugePages               0.00            0.00
HugePages_Total           256.00          256.00
HugePages_Free            254.00          254.00
HugePages_Surp              0.00            0.00
$ ll /mnt/huge2m/
total 2048
-rw-rw-rw- 1 as as 2097152 Dec 18 20:32 request.0
-rw-rw-rw- 1 as as 2097152 Dec 18 20:32 response.0

出于某种原因,即使有两个 2MB 的大页面(request.0 和 response.0 存在),也只有 1 个被计算在内?正如所numastat指出的,总共有 256MB 的大页面和 254MB 是免费的。

主意?

linux
  • 1 个回答
  • 159 Views
Martin Hope
HCSF
Asked: 2018-05-13 06:23:43 +0800 CST

Yum 在防火墙后面安装软件包

  • -1

我在一个数据中心有一个 CentOS 7 服务器(服务器 X),它有一个我不能做 yum 的防火墙:

# yum search htop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
 * base: mirrors.163.com
 * extras: mirrors.shu.edu.cn
 * updates: ftp.sjtu.edu.cn
Warning: No matches found for: htop
No matches found

而且数据中心没有为我提供代理服务器来安装任何东西。

但是,我可以通过 Internet + VPN 从家用计算机 ssh 到服务器 X。

我只是想知道是否有办法利用 ssh 连接到 yum 安装包(或任何其他 yum 安装包的方法)。

这篇文章建议人们只使用 RPM 或 DVD 安装。

我认为如果没有任何依赖关系,从 RPM 安装很简单,但处理依赖关系会很麻烦。

欢迎任何建议。

提前致谢!

更新 1:我什至无法 ping mirrorlist.centos.org 的 IP(虽然它是可 ping 的):

# ping 85.236.43.108
PING 85.236.43.108 (85.236.43.108) 56(84) bytes of data.
^C
--- 85.236.43.108 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

所以DNS解析不是根本原因。

Traceroute 表示流量被阻塞:

# traceroute 85.236.43.108
traceroute to 85.236.43.108 (85.236.43.108), 30 hops max, 60 byte packets
 1  gateway (172.18.22.254)  3.884 ms  4.100 ms  4.322 ms
 2  gateway (172.18.22.254)  3.200 ms !H * *

它不能出去,因为数据中心有防火墙。Server X 本身没有防火墙,也没有 iptable 来防止外出。

更新 2:下载 rpms 和 rsync-ing 然后安装失败

# yum localinstall /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm --disablerepo=*
Loaded plugins: fastestmirror
Examining /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm: audit-libs-2.8.1-3.el7.x86_64
Marking /tmp/audit-libs-2.8.1-3.el7.x86_64.rpm as an update to audit-libs-2.7.6-3.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package audit-libs.x86_64 0:2.7.6-3.el7 will be updated
--> Processing Dependency: audit-libs(x86-64) = 2.7.6-3.el7 for package: audit-2.7.6-3.el7.x86_64
Loading mirror speeds from cached hostfile
---> Package audit-libs.x86_64 0:2.8.1-3.el7 will be an update
--> Finished Dependency Resolution
Error: Package: audit-2.7.6-3.el7.x86_64 (@anaconda)
           Requires: audit-libs(x86-64) = 2.7.6-3.el7
           Removing: audit-libs-2.7.6-3.el7.x86_64 (@anaconda)
               audit-libs(x86-64) = 2.7.6-3.el7
           Updated By: audit-libs-2.8.1-3.el7.x86_64 (/audit-libs-2.8.1-3.el7.x86_64)
               audit-libs(x86-64) = 2.8.1-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
firewall
  • 1 个回答
  • 2242 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