login
Header Space

 
 

how to check if a given block device is in use?

September 8, 2008 - 8:37am
Submitted by Anonymous on September 8, 2008 - 8:37am.
Linux

How can I check if a given block device is in use (i.e., mounted, used as swap, used as a software RAID device etc.)?

One could technicaly check /proc/swaps, /proc/mdstat, /etc/mtab, etc., but that's just checking in lots of places. And it doesn't cover everything (i.e. LVM, dm-crypt etc.).

Is there a generic way to check if a given block device is in use?

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <quote> <pre> <hr> <br> <p> <img> <blockquote> <font> <tt> <table> <tr> <i>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

speck-geostationary