7

How to determine whether a linux filesystem belongs to a running system or not

view full story
linux-howto

http://unix.stackexchange.com – I need to write a program that receives a block device as input, like /dev/sda1, and has to perform a set of operations depending on if the filesystem inside are currently up or not. We'll assume the input will always has a correct linux directory tree, the only I need to know is if there's a particular directory structure or file/s that can reliably determine whether the system inside is down or up. Thanks! (HowTos)