Alastair Neil
2009-Apr-21 16:34 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
A very basic question. I have in recent releases of opensolaris found that a script I use to create large number of account home directories has been failing because the script attempts to create and modify the directories after the zfs create only to find that there is no directory. This is in spite of checking the return code from the zfs command. I can add a loop to wait until the directory exits but that will probably add to the already prodigious time to create 8000 accounts. The options passwd to the create are e.g.: zfs create -o mountpount=/home/u1/a/j/ajn -o quota=9G -o refquota=3G u1/ajn the parent directories in the mountpoint are all created prior to the script running. Any suggestions welcome Regards, Alastair -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090421/61687ad1/attachment.html>
Alastair Neil
2009-Apr-27 18:17 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
On Tue, Apr 21, 2009 at 12:34 PM, Alastair Neil <ajneil at gmail.com> wrote:> A very basic question. I have in recent releases of opensolaris found that > a script I use to create large number of account home directories has been > failing because the script attempts to create and modify the directories > after the zfs create only to find that there is no directory. This is in > spite of checking the return code from the zfs command. I can add a loop to > wait until the directory exits but that will probably add to the already > prodigious time to create 8000 accounts. > > The options passwd to the create are e.g.: > > zfs create -o mountpount=/home/u1/a/j/ajn -o quota=9G -o refquota=3G u1/ajn > > the parent directories in the mountpoint are all created prior to the > script running. > > > Any suggestions welcome > > Regards, Alastair > > No one responded to this. Is this off topic or too elementary? A pointerto the relevant documentation would be helpful, I did not find anything germane in the man page. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090427/a8826689/attachment.html>
Robert Milkowski
2009-Apr-27 19:41 UTC
Re: can zfs create return with no error code before the mount takes place?
Hello Alastair, Monday, April 27, 2009, 7:17:51 PM, you wrote: > On Tue, Apr 21, 2009 at 12:34 PM, Alastair Neil <ajneil@gmail.com> wrote: A very basic question. I have in recent releases of opensolaris found that a script I use to create large number of account home directories has been failing because the script attempts to create and modify the directories after the zfs create only to find that there is no directory. This is in spite of checking the return code from the zfs command. I can add a loop to wait until the directory exits but that will probably add to the already prodigious time to create 8000 accounts. The options passwd to the create are e.g.: zfs create -o mountpount=/home/u1/a/j/ajn -o quota=9G -o refquota=3G u1/ajn the parent directories in the mountpoint are all created prior to the script running. Any suggestions welcome Regards, Alastair No one responded to this. Is this off topic or too elementary? A pointer to the relevant documentation would be helpful, I did not find anything germane in the man page. When your script fails for a particular file system if you check it manually has it been created and mounted? -- Best regards, Robert Milkowski http://milek.blogspot.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Alastair Neil
2009-Apr-27 21:18 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
Yes generally the filesystem gets created just that the mount seems not to take place. On Mon, Apr 27, 2009 at 3:41 PM, Robert Milkowski <milek at task.gda.pl> wrote:> Hello Alastair, > > > Monday, April 27, 2009, 7:17:51 PM, you wrote: > > > > > > > > On Tue, Apr 21, 2009 at 12:34 PM, Alastair Neil <ajneil at gmail.com> wrote: > > > A very basic question. I have in recent releases of opensolaris found that > a script I use to create large number of account home directories has been > failing because the script attempts to create and modify the directories > after the zfs create only to find that there is no directory. This is in > spite of checking the return code from the zfs command. I can add a loop to > wait until the directory exits but that will probably add to the already > prodigious time to create 8000 accounts. > > > The options passwd to the create are e.g.: > > > zfs create -o mountpount=/home/u1/a/j/ajn -o quota=9G -o refquota=3G u1/ajn > > > the parent directories in the mountpoint are all created prior to the > script running. > > > > Any suggestions welcome > > > Regards, Alastair > > > No one responded to this. Is this off topic or too elementary? A pointer > to the relevant documentation would be helpful, I did not find anything > germane in the man page. > > > > > > > When your script fails for a particular file system if you check it > manually has it been created and mounted? > > > > -- > > Best regards, > > Robert Milkowski > > http://milek.blogspot.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090427/5403c300/attachment.html>
Robert Milkowski
2009-Apr-27 22:54 UTC
Re: can zfs create return with no error code before the mount takes place?
Hello Alastair, Monday, April 27, 2009, 10:18:50 PM, you wrote: > Yes generally the filesystem gets created just that the mount seems not to take place. Seems or did you confirm it with mount or df command? Do you mount it manually then? -- Best regards, Robert Milkowski http://milek.blogspot.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Alastair Neil
2009-Apr-28 15:37 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
On Mon, Apr 27, 2009 at 6:54 PM, Robert Milkowski <milek at task.gda.pl> wrote:> > Hello Alastair, > > Monday, April 27, 2009, 10:18:50 PM, you wrote: > > Seems or did you confirm it with mount or df command? > > Do you mount it manually then? > > http://milek.blogspot.com >This is a sample of one of the failures. Clearly the filesystem gets created and the subsequent mount fails because of a copy of files from the skeleton directory to the expected home directory that basically creates a file in place of where the system expects a mountpoint directory.> sstephe3,11210,400,facstaff,Stephen V Stephenson > > mkdir: Failed to make directory "/web/u1/s/s/sstephe3/public_html"; No > such file or directory > > mkdir: Failed to make directory "/web/u1/s/s/sstephe3/htaccess"; No such > file or directory > > cp: /home/u1/s/s/sstephe3 not found > > chown: /web/u1/s/s/sstephe3: No such file or directory > > chmod: WARNING: /home/u1/s/s/sstephe3: Execute permission required for > set-ID on execution > > chmod: WARNING: can''t access /home/u1/s/s/sstephe3/.profile > > chmod: WARNING: can''t access /home/u1/s/s/sstephe3/* > > ln: cannot create /nfs4/home/u1/s/s/sstephe3/web: Not a directory > > ln: cannot create /nfs4/home/u1/s/s/sstephe3: File exists > > chmod: WARNING: can''t access /nfs4/web/u1/s/s/sstephe3 > > chmod: WARNING: can''t access /web/u1/s/s/sstephe3 > > ln: cannot create /nfs4/home/u1/s/s/sstephe3: File exists > > cannot mount ''u1/sstephe3'': Not a directory > > filesystem successfully created, but not mountedNow this does not happen every time but happens with increasing frequency as the number of created filesystems increases. I cannot confirm readily as I have blown away the pools, but I think I end up with only about 4500 filesystems out of 8200 or so that should be created once the script ends. Another datum that may be relevant is that the block devices in the pools are actually iscsi volumes served from several linux openfiler systems over a private gige network using jumbo frames. I just updated the system to snv_111a so at some point I''ll recreate the pools and try again, however we are in the middle of a building move so I might not get to it until later in the week. I really appreciate any pointers. Regards, Alastair -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090428/8b39d988/attachment.html>
Alastair Neil
2009-May-15 18:53 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
On Thu, May 7, 2009 at 11:24 AM, Alastair Neil <ajneil at gmail.com> wrote:> > > On Tue, Apr 28, 2009 at 2:41 PM, Richard Elling <richard.elling at gmail.com>wrote: > >> Alastair Neil wrote: >> >>> >>> >>> On Tue, Apr 28, 2009 at 12:44 PM, Richard Elling < >>> richard.elling at gmail.com <mailto:richard.elling at gmail.com>> wrote: >>> >>> >>> >>> Alastair Neil wrote: >>> >>> >>> >>> On Mon, Apr 27, 2009 at 6:54 PM, Robert Milkowski >>> <milek at task.gda.pl <mailto:milek at task.gda.pl> >>> <mailto:milek at task.gda.pl <mailto:milek at task.gda.pl>>> wrote: >>> > >>> > Hello Alastair, >>> > >>> > Monday, April 27, 2009, 10:18:50 PM, you wrote: >>> > >>> > Seems or did you confirm it with mount or df command? >>> > >>> > Do you mount it manually then? >>> > >>> > >>> http://milek.blogspot.com >>> > >>> >>> This is a sample of one of the failures. Clearly the >>> filesystem gets created and the subsequent mount fails >>> because of a copy of files from the skeleton directory to the >>> expected home directory that basically creates a file in place >>> of where the system expects a mountpoint directory. >>> >>> >>> In the script that copies the files, test for the directory and >>> wait in a loop. >>> You shouldn''t have to wait more than a second or two. >>> -- richard >>> >>> >>> I could do that but 1 second on each zfs create adds almost 4.5 hours to >>> the time required to run the script. >>> >> >> Use a subshell and put it in the background. >> -- richard > > > > Finally got clear of our building move and have had time to try this. I > have done as you expected so hopefully this will run without issues. I''ll > let you know how it goes. >A follow up. With the post "zfs create" stuff split into a background subshell I can get the script to run correctly. I needed to add a check to see if the file system is mounted: zfs_is_mounted () {> ${ZFS} get -H mounted ${1} | ${GREP} "mounted.yes" 2>&1 > /dev/null > return $? > } >if there is a more elegant way of checking this then please let me know. The crux here is the abysmal scaling of zfs. When the script starts it can create a new filesystem every 3 seconds. after a day of running and with 6200 filesystem created it now takes more than 30 seconds to create each filesystem. I shudder to think what the performace will be once I actually share these filesystems. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090515/931f4151/attachment.html>
Bob Friesenhahn
2009-May-15 23:08 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
On Fri, 15 May 2009, Alastair Neil wrote:> > The crux here is the abysmal scaling of zfs. When the script starts it can > create a new filesystem every 3 seconds. after a day of running and with > 6200 filesystem created it now takes more than 30 seconds to create each > filesystem. I shudder to think what the performace will be once I actually > share these filesystems.This does indeed sound like terrible scaling performance. How much faster is it if you use Solaris UFS? Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Alastair Neil
2009-May-15 23:23 UTC
[zfs-discuss] can zfs create return with no error code before the mount takes place?
On Fri, May 15, 2009 at 7:08 PM, Bob Friesenhahn < bfriesen at simple.dallas.tx.us> wrote:> On Fri, 15 May 2009, Alastair Neil wrote: > >> >> The crux here is the abysmal scaling of zfs. When the script starts it >> can >> create a new filesystem every 3 seconds. after a day of running and with >> 6200 filesystem created it now takes more than 30 seconds to create each >> filesystem. I shudder to think what the performace will be once I >> actually >> share these filesystems. >> > > This does indeed sound like terrible scaling performance. How much faster > is it if you use Solaris UFS? > > Bob > --Good question I have not tried it with UFS. I''ll try it and see.> > Bob Friesenhahn > bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090515/6c7f3262/attachment.html>