Am Fri, 5 Jun 2009 16:47:15 -0700 schrieb Ted Rodriguez-Bell <[email protected]>: > Now I think we could work around this by changing the device to > read-only before mounting, so you'd do something like this: > blockdev --setro /dev/dasdXX # Lock the device > if mount /dev/dasdXX /mount/point ; then > if [[ ! -f /mount/point/IN_USE ]]; then > SAFE_TO_MOUNT=yes > else > SAFE_TO_MOUNT='no, lock file exists' > fi > else > SAFE_TO_MOUNT='no, could not mount filesystem' > fi > blockdev --setrw /dev/dasdXX > I've tested "blockdev --setro" and it *is* local; changing it on one > machine doesn't change the filesystem on the other. > > But is there some other reason to think this might be unsafe? Would > Novell support be a better forum than this one? Using a lock file on the filesystem looks racy to me. Did you consider using the reserve/release feature for dasds for this? In case of unexpected crash, you could break the lock and recover the filesystem once you're sure the system that was holding the lock has died indeed.
so long, Carsten ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
