I have this script, here is the relevant part:
but the mount command fails because it says the device does not exist. That admsnap command creates a snapshot on our SAN and attaches it to /dev/$DEV. I think what is happening is the SAN does not have enough time to create the snapshot before the script goes on to mount it.
If I put in several mount commands, ie:
then eventually one of the mounts will take. Is there any way I can just tell mount to wait a bit longer to see if /dev/$DEV becomes available?
/usr/admsnap/admsnap activate -s $SESSION -o /dev/$DEV
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
but the mount command fails because it says the device does not exist. That admsnap command creates a snapshot on our SAN and attaches it to /dev/$DEV. I think what is happening is the SAN does not have enough time to create the snapshot before the script goes on to mount it.
If I put in several mount commands, ie:
/usr/admsnap/admsnap activate -s $SESSION -o /dev/$DEV
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
mount -t ext3 /dev/${DEV}1 /export/snaps/$SNAP -o ro,acl,user_xattr
then eventually one of the mounts will take. Is there any way I can just tell mount to wait a bit longer to see if /dev/$DEV becomes available?