Updated code with qittas idea of parsing /proc/mounts and listing /sys/block