I'm reconfiguring my RAID 5 array in one of my servers (called malachite), and having some problems doing so.
What I'm trying to do is to completely delete the current RAID 5 array, and rebuild it with different sized partitions on the same disks.
I can't unmount the raid array directly, because linux reports back to me:
# umount /raid
umount: /raid: device is busy
So I'm trying to trace this back to see why it's busy. I'm guessing it's because this folder is mounted with nfs to my other server (called onyx). However, I also can't unmount that folder because it is also busy. There is a neat command which tells you what processes are accessing a certain file. I found it here.
# fuser -v -m /RAIDmalachite
will list all processes using the /RAIDmalachite folder. After doing this, I saw that indeed, Samba is using that folder.
Once I took care of that, I still couldn't unmount the drive on malachite. This is probably because nfs is still exporting it. Note that the kernel nfs server doesn't count as a process, so it won't show up by running the above command. It is necessary to stop nfs with:
# /etc/init.d/nfs stop
Now I can unmount the drive:
# umount /raid
At this point, I can now go back into Webmin and delete the RAID array, and then remove all the partitions on the drives.
After creating my new raid array, I can watch the status of it rebuilding in real time from the command line:
# watch -n 1 cat /proc/mdstat
What is even better is that I can format, and start copying files back to the array even before it has completely been rebuilt. The files just won't be redundant until after it finishes reubilding. Looks like it will take about 2 hours to rebuild the 650gb array.