diff --git a/tbsetup/mkgroup.in b/tbsetup/mkgroup.in index 858f021de21be0fe7fec1d3a6be5f66142e5a882..f10a49fcd49d314531d5836cdfd63daf1a4a6364 100644 --- a/tbsetup/mkgroup.in +++ b/tbsetup/mkgroup.in @@ -228,12 +228,15 @@ if ($WITHZFS) { } # - # There is some lag before the automounter can mount the new - # volume. Lets delay until we can access the project directory. + # There is some lag before the automounter can mount the new volumes. + # Lets delay until we can access the project/group directories. # if (emutil::waitForMount($projdir) < 0) { fatal("Could not access new project directory: $projdir"); } + if (emutil::waitForMount("$GRPROOT/$pid") < 0) { + fatal("Could not access new group directory: $GRPROOT/$pid"); + } } if (!$isnonlocal) { diff --git a/tbsetup/mkproj.in b/tbsetup/mkproj.in index a3dd8ca9eaf3618d108ae9e650cfb5f8f88543a0..5b0e8a724b9db536dccc1d23adbe3472f074dcae 100755 --- a/tbsetup/mkproj.in +++ b/tbsetup/mkproj.in @@ -345,6 +345,9 @@ if (! -e "$PROJROOT/$pid") { fatal("Could not access directory $PROJROOT/$pid"); } } + else { + fatal("Could not access directory $PROJROOT/$pid"); + } } foreach my $dir (@DIRLIST) { if (! -e "$PROJROOT/$pid/$dir") { @@ -353,7 +356,15 @@ foreach my $dir (@DIRLIST) { } if (! -e "$GRPROOT/$pid") { - fatal("Could not access directory $GRPROOT/$pid"); + if ($WITHZFS) { + # Wait for mountd to finish + if (emutil::waitForMount("$GRPROOT/$pid") < 0) { + fatal("Could not access directory $GRPROOT/$pid"); + } + } + else { + fatal("Could not access directory $GRPROOT/$pid"); + } } if ($SCRATCHROOT && ! -e "$SCRATCHROOT/$pid") {