Score:9

Finding which process is reading from disk constantly on FreeBSD

ph flag

EDIT: This ended up being a scrub process. Run zpool status -v and read the scan status for your pool clearly.

I have a TrueNAS server running FreeBSD and this morning at 12 AM the disks started to be read from constantly. I thought this was some snapshot task, so I disabled my snapshots and restarted the server, but every time I restart the server it continues to read from my storage pool. I have stopped all running jails as well and the disks still show IO (the screenshots below are with jails running, but they look the same with jails stopped).

enter image description here

I can't figure out which process is causing this. I tried using top -m io, but this shows no R/W activity.

enter image description here

According to this resource, top -m io doesn't work on FreeBSD so I can't find out which process is reading from my disks:

top io mode doesn't properly display stats

I have tried checking if there are any running snapshot tasks using ps -aux | grep rsync, but nothing shows except my grep command.

Here's some resources I've checked:

Is it possible to get the top command working? I just want to know what process is reading from my disks and kill it.

Romeo Ninov avatar
in flag
Have you try with `htop`?
Bilbo Baggins avatar
ph flag
`htop` does not show RBYTES on FreeBSD, but this ended up being a scrub process. Thanks anyway!
Score:7
hu flag

Running…

top -a -m io

…should do the trick! If there’s no process associated with a heavy I/O - it’s kernel and you can’t really do anything about it. I mean no way to query.

It could be ZFS performs some integrity checks / scrubbing, so it might be a good lead. Take a look here:

https://docs.oracle.com/cd/E36784_01/html/E36835/gammt.html

Bilbo Baggins avatar
ph flag
I feel so dumb now. It is the scrub process. I ran "zpool status -v" and see that for my storage pool "scrub in progress since Sun Aug 27 00:00:02 8.06T scanned...", so just have to let it finish. *facepalm*
El Marinero  avatar
hu flag
Dude you’re OK! Take it easy and just let it go. Seriously! :)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.