I tried to move some files to my NAS (ShareCenter DNS-320), but something shows up, when using file managers:
Input/Output error
or when using rsync on mounted cifs/smb share
rsync: close failed on "/mnt/nas1/_am-unordered/.long-file-name.mkv.PI2rPM": Input/output error (5)
rsync error: error in file IO (code 11) at receiver.c(856) [receiver=3.1.0]
# mount | grep mnt/nas1
//192.168.x.y/backup on /mnt/nas1 type cifs (rw,relatime,vers=1.0,cache=strict,username=admin,domain=BACKUP,uid=1000,forceuid,gid=0,noforcegid,addr=192.168.x.y,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)
I assume that there are bad sectors inside the NAS, I need to run fsck
to check if there are broken disk inside my RAID-0 NAS.
I have installed fun_plug
using this tutorial, now I could ssh into the NAS successfully. Normally I would use fsck -yvckfC -E fragcheck /dev/sdX
to check bad sectors on single unmounted disk.
The question is, how to run badblocks and insert it to the bad block list on mounted RAID0 partition? since the ssh service are running on mounted partition on the NAS:
# umount /mnt/HD/HD_a2/
umount: /mnt/HD/HD_a2: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
# lsof /mnt/HD/HD_a2/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sh 1963 root 1w REG 9,1 5191 12 /mnt/HD/HD_a2/ffp.log
sh 1963 root 2w REG 9,1 5191 12 /mnt/HD/HD_a2/ffp.log
sh 1963 root 10r REG 9,1 1942 246939802 /mnt/HD/HD_a2/fun_plug
rc 1986 root txt REG 9,1 587316 141426950 /mnt/HD/HD_a2/ffp/bin/bash
rc 1986 root mem REG 9,1 28892 139854377 /mnt/HD/HD_a2/ffp/lib/ld-uClibc-0.9.33-git.so
rc 1986 root mem REG 9,1 260898 139853932 /mnt/HD/HD_a2/ffp/lib/libreadline.so.6.2
**snip**
sshd 5519 root mem REG 9,1 60546 139854375 /mnt/HD/HD_a2/ffp/lib/libgcc_s.so.1
sshd 5519 root mem REG 9,1 359940 139854378 /mnt/HD/HD_a2/ffp/lib/libuClibc-0.9.33-git.so
Current NAS' RAID configuration are:
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md1 : active raid0 sda2[0] sdb2[1]
7808789888 blocks 64k chunks
md0 : active raid1 sdb1[1] sda1[0]
524224 blocks [2/2] [UU]
unused devices: <none>