51°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Problems when unmounting filesystems in linux

    April 29, 2006

    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.

    Sat, Apr 29, 2006 4:05pm -07:00
Posted in /articles

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv