Applicable Products
- All NAS models running QTS or QuTS hero
Scenario
- You start a RAID scrubbing (data consistency check) task from the NAS GUI.
- In an SSH session, running
ps -ef does not show any obvious process named scrub or similar. - You want to detect via script whether RAID scrubbing is currently running, but cannot identify a dedicated user-space process.
Procedure
For advanced users: This article involves SSH access and command-line operations. Incorrect commands or changes to system files may cause service disruptions or system instability. Proceed only if you are familiar with these operations and have recent backups of important data.
Step 1: Enable SSH
- Log in to QTS or QuTS hero with an administrator account.
- Go to Control Panel > Network & File Services > Telnet / SSH.
- Select Allow SSH connection.
- Set the port number (default: 22).
- Click Apply.
Step 2: Connect to the NAS using SSH
Use PuTTY (Windows) or Terminal (macOS/Linux) to connect to the NAS:
ssh admin@<NAS_IP>
Step 3: Check and monitor the RAID scrubbing process
QTS (md-RAID)
On QTS systems that use Linux software RAID (md-RAID), you can check the RAID scrubbing status by reading /proc/mdstat.
Run the following command:
cat /proc/mdstat
If RAID scrubbing is in progress, you will see a line similar to the following for the affected RAID group:
md1 : active raid5 sda3[0] sdb3[1] sdc3[2]
[==>........] check = 15.3% (12345678/98765432) finish=120.0min speed=123456K/sec
You can also check and monitor the scrubbing process using the following command:
ps -ef | grep resync | grep -v grep
If RAID scrubbing is in progress, you will see a process line similar to this:
21984 admin DWN [md1_resync]
Key points:
- The percentage and estimated time in
/proc/mdstat show the current progress. - The
md1_resync kernel thread indicates that a RAID resync or scrubbing process is in progress. - If no such operation is listed, RAID scrubbing is not currently running.
QuTS hero (ZFS)
On QuTS hero systems that use ZFS, you can check the scrub status of a storage pool using zpool status.
Run the following command:
zpool status <pool_name>
If a scrub is in progress, you will see output similar to:
pool: pool1
state: ONLINE
scan: scrub in progress since Mon Feb 12 10:00:00 2026
15.3% done, 1h20m to go
config:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
...
If no scrub is running, the output will show the time of the last completed scrub or a message such as:
scan: scrub repaired 0B in 01:23:45 with 0 errors on Mon Feb 12 09:00:00 2026
You can use this information in scripts to detect whether a scrub is currently running and to monitor its progress.
Further Reading
适用产品
- All NAS models running QTS or QuTS hero
场景
- 您从 NAS 图形用户界面启动 RAID 校验(数据一致性检查)任务。
- 在 SSH 会话中,运行
ps -ef时没有显示任何明显名为scrub或类似的进程。 - 您希望通过脚本检测 RAID 校验是否正在运行,但无法识别专用的用户空间进程。
步骤
对于优异用户:本文涉及 SSH 访问和命令行操作。不正确的命令或对系统文件的更改可能导致服务中断或系统不稳定。仅在熟悉这些操作并有重要数据的全新备份时继续。
步骤 1:启用 SSH
- 使用管理员账户登录 QTS 或 QuTS hero。
- 进入控制台 > 网络和文件服务 > Telnet / SSH。
- 选择允许 SSH 连接。
- 设置端口号(默认:22)。
- 点击应用。
步骤 2:使用 SSH 连接到 NAS
使用 PuTTY(Windows)或终端(macOS/Linux)连接到 NAS:
ssh admin@<nas_ip>
步骤 3:检查和监控 RAID 校验进程
QTS(md-RAID)
在使用 Linux 软件 RAID(md-RAID)的 QTS 系统上,您可以通过读取/proc/mdstat来检查 RAID 校验状态。
运行以下命令:
cat /proc/mdstat
如果 RAID 校验正在进行中,您将看到受影响的 RAID 组类似于以下的行:
md1 : active raid5 sda3[0] sdb3[1] sdc3[2]
[==>........] 检查 = 15.3% (12345678/98765432) 完成 =120.0 分钟 速度 =123456K/ 秒
您还可以使用以下命令检查和监控擦除过程:
ps -ef | grep resync | grep -v grep
如果 RAID 擦除正在进行中,您将看到类似这样的进程行:
21984 admin DWN [md1_resync]
关键点:
/proc/mdstat中的百分比和预计时间显示当前进度。md1_resync内核线程表示 RAID 重新同步或擦除过程正在进行中。- 如果没有列出这样的操作,RAID 擦除当前未运行。
QuTS hero (ZFS)
在使用 ZFS 的 QuTS hero 系统上,您可以使用zpool status检查存储池的擦除状态。
运行以下命令:
zpool status <pool_name>
如果擦除正在进行中,您将看到类似的输出:
pool: pool1
state: ONLINE
scan: scrub in progress since Mon Feb 12 10:00:00 2026
15.3% done, 1h20m to go
config:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
...
如果没有擦除正在运行,输出将显示上次完成擦除的时间或类似的消息:
scan: scrub repaired 0B in 01:23:45 with 0 errors on Mon Feb 12 09:00:00 2026
您可以在脚本中使用此信息来检测擦除是否正在运行并监控其进度。
进一步阅读