Announcement

Collapse
No announcement yet.

ISB Flash drive recognition and NFS boot time

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ISB Flash drive recognition and NFS boot time

    Downloaded 17.04 and installed.

    2 problems so far:

    1. When I plug a usb flash drive in, the system does not register the flash drive and I have no way of accessing it.

    2. During boot, the system takes long time to mount the nfs drives on the local network if the other computer(s) are not turned. The boot messages display a line about starting the files and a countup timer. The timer counts to 1 min 38sec (usually).

    Is there any way to modify this time? Since the computers are local (in the same room), the default time seems rather excessive. I could understand if they were located elsewhere. Seems there must be a means of modifying that time.

    #2
    1. What's the output of dmesg when you plug in the drive?

    2. You can usually fix this with mount options. Here's my NFS mount from /etc/fstab:

    Code:
    server:/   /shared  nfs4 auto,bg,soft,intr,timeo=50,retrans=5,actimeo=10,retry=5,users,rsize=131072,wsize=131072,noatime,nodiratime,x-systemd.automount 0 0

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      1. What's the output of dmesg when you plug in the drive?

      2. You can usually fix this with mount options. Here's my NFS mount from /etc/fstab:

      Code:
      server:/   /shared  nfs4 auto,bg,soft,intr,timeo=50,retrans=5,actimeo=10,retry=5,users,rsize=131072,wsize=131072,noatime,nodiratime,x-systemd.automount 0 0
      Thanks - sorry to take so long to reply. Been having to install Kubuntu a few times. Had run dual boot with win10, then decided that I wanted to use the vbox version exclusively and deleted and formatted to ext4 the win10 partition. Then had trouble due to the '/' partition being to small and no room to write so Kubuntu displayed an error msg and wouldn't boot. So I booted the Kubuntu Live and used gparted to resize the '/' and '/home' partitions to make the '/' partition larger. I learned the hard way (for the second time!) that that was not a wise thing to do. Couldn't boot anything anymore. Re-installed windows 8.1 pro for which I had the DVDs and used windows to delete and format the 2 partitions to ntfs. Then reinstalled 17.04. Then decided I wanted the win10 back native and was told multiple times by 3rd party support that I could not longer get a free download of win10.

      OK, but I just wanted my original free 10 download honored. After an hour on google, I found that it was possible. MS supplies win10 iso images for download for people like myself that have to re-install win10. Downloaded the win10 iso, used unetbootin on 17.04 to create a USB bootable for win10 (cannot do with a DVD unless it is dual layer - made me think I should pull out the dual layer DVD player and install). Used the usb flashdrive and installed win10 and it automagically activated. But the win10 installation did some bad things to 17.04 and it would dump me to an emergency konsole in the 17.04 boot.

      So I had to re-install 17.04 (maybe I didn't HAVE to, but it was quicker to do from a usb flashdrive install than spend a lot of time investigating the error mesg that stopped the 17.04 boot).

      To make long story shorter, I am now back with dual boot Kubuntu and win10 with refind the default boot manager. I experimented with the computer startup program and found a way to make it totally ignore the windows boot manager.

      I changed my fstab, copying your mount options there for all of the nfs mounts. Kubuntu now boots immediately. Fantastic!!!

      It was a real learning experience. Now if I can only remember what I learned if it happens again in 4 or 5 or 6 or ... years.

      Comment


        #4
        After experimenting with the mount options and reading the options for NFS4 and their effects, I have settled on the following mount options for NFS4. Thanks for sharing yours.

        nfs rw,users,exec,auto,fg,soft,retrans=5,rsize=131072, wsize=131072 0 0

        These are a combination of what I had previously and your options.

        I have a sneaky suspicion that the missing fg option in my previous option list caused the looooong boot time since hg is the default, but I cannot definitely state that. I changed nfs4 to nfs since the doc state that nfs4 type is now deprecated. The intr option is ignored in kernels after 2.6.xx so I just removed that. I removed the x-systemd.automount since it kept the nfs directories mounted even when I wanted them unmounted and would immediately remount if I unmounted them. In my setup, if I turn off the other computer without unmounting the nfs directories, the computer that is still on will hang and totally freeze until I turn the other computer back on. Then it unfreezes and works fine. This effect doesn't happen if the other computer is off when I boot one of them since then the nfs directories cannot be mounted and I would get an error message from Dolphin if I happened to click on one of them. So I have to unmount the nfs directories whenever I am going to turn off one of the computers to keep the other computer from hanging and freezing. This is not really a problem since have a script file that I run before turning off either computer that unmounts all nfs directories on both computers.
        Last edited by geezer; May 11, 2017, 09:26 AM.

        Comment


          #5
          Why not just use autofs to mount the shares? I've done it that way for years; shares don't mount until you access them and stay mounted for five minutes after last access then unmount.

          One down side; reboots can hang for a minute if the share is still mounted when you reboot otherwise it's a great way to mount NFS shares
          we see things not as they are, but as we are.
          -- anais nin

          Comment


            #6
            Originally posted by wizard10000 View Post
            Why not just use autofs to mount the shares? I've done it that way for years; shares don't mount until you access them and stay mounted for five minutes after last access then unmount.

            One down side; reboots can hang for a minute if the share is still mounted when you reboot otherwise it's a great way to mount NFS shares
            Why? Because I've never heard of it before. Thank You very much for bringing it to my attention. I just read a paragraph about it and it sound like something I could really use. Thank You.

            Comment


              #7
              Originally posted by geezer View Post
              After experimenting with the mount options and reading the options for NFS4 and their effects, I have settled on the following mount options for NFS4. Thanks for sharing yours.

              nfs rw,users,exec,auto,fg,soft,retrans=5,rsize=131072, wsize=131072 0 0

              These are a combination of what I had previously and your options.

              I have a sneaky suspicion that the missing fg option in my previous option list caused the looooong boot time since hg is the default, but I cannot definitely state that. I changed nfs4 to nfs since the doc state that nfs4 type is now deprecated. The intr option is ignored in kernels after 2.6.xx so I just removed that. I removed the x-systemd.automount since it kept the nfs directories mounted even when I wanted them unmounted and would immediately remount if I unmounted them. In my setup, if I turn off the other computer without unmounting the nfs directories, the computer that is still on will hang and totally freeze until I turn the other computer back on. Then it unfreezes and works fine. This effect doesn't happen if the other computer is off when I boot one of them since then the nfs directories cannot be mounted and I would get an error message from Dolphin if I happened to click on one of them. So I have to unmount the nfs directories whenever I am going to turn off one of the computers to keep the other computer from hanging and freezing. This is not really a problem since have a script file that I run before turning off either computer that unmounts all nfs directories on both computers.
              Thanks for the update and info - I have adjusted my fstab to reflect current usage. My understanding is that "soft" should prevent the locking up of the client.

              It would be interesting to see the logs.

              Please Read Me

              Comment


                #8
                Originally posted by geezer View Post
                Why? Because I've never heard of it before. Thank You very much for bringing it to my attention. I just read a paragraph about it and it sound like something I could really use. Thank You.
                Sorry if I sounded a little condescending, I really didn't mean to

                Anyway, autofs is pretty cool. /etc/auto.master is where autofs is configured - here's mine:

                Code:
                #
                # Sample auto.master file
                # This is an automounter map and it has the following format
                # key [ -mount-options-separated-by-comma ] location
                # For details of the format look at autofs(5).
                #
                #/misc	/etc/auto.misc
                #
                # NOTE: mounts done from a hosts map will be mounted with the
                #	"nosuid" and "nodev" options unless the "suid" and "dev"
                #	options are explicitly given.
                #
                #/net	-hosts
                
                /nfsmount /etc/auto.nfs	--ghost
                
                #
                # Include /etc/auto.master.d/*.autofs
                #
                +dir:/etc/auto.master.d
                #
                # Include central master map if it can be found using
                # nsswitch sources.
                #
                # Note that if there are entries for /net or /misc (as
                # above) in the included master map any keys that are the
                # same will not be seen as the first read key seen takes
                # precedence.
                #
                +auto.master
                /nfsmount is the name of the mount point I created and it must exist; autofs will create subdirectories on its own.

                Also, here's the auto.nfs that's referenced in auto.master - I use the same files for both machines and just comment out the lines I don't need The leftmost entry is the name of the directory autofs will create under the mount point listed above.

                Code:
                #laptop-home		-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.101:/home/wizard
                #laptop-etc		-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.101:/etc
                #laptop-external		-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.101:/mnt/external
                server-home		-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.102:/home/wizard
                server-etc		-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.102:/etc
                server-external	-fstype=nfs,rw,nosuid,soft,rsize=16384,wsize=16384,intr,noatime	192.168.1.102:/mnt/external
                Enjoy!
                Last edited by wizard10000; May 12, 2017, 04:55 AM.
                we see things not as they are, but as we are.
                -- anais nin

                Comment


                  #9
                  OK - more experience. It turns out that if I boot one computer with the other computer off, the booting computer still doesn't like that at all and starts a countdown timer starting at 1 min 38 sec. The seconds seems to be variable. I read something about one of the protocols (TCP I think?) uses a fixed time that can be set on the mount options, the other protocol UDP ? uses a time derived from the frequency at which files are accessed. I probably have the 2 protocols mixed up and maybe even wrong - memory is the first to go with age. I'm not even too sure that time can be set with the mount options since one man page mentioned something about 2 minutes(?) being the default and since I have never used the mount option, I seriously wonder how the boot program arrived at 1 min 38 secs?

                  I put the mount option x-systemd.automount back in the mount options and it appears to be the magic invocation to skip the countdown timer. Why is still deep mystery to me.

                  It seems to work very much like what autofs is described as above.

                  If one computer is off, Dolphin still lists the nfs directories on the off computer as mounted and available. If I then click on one of the nfs directories, Dolphin freezes and I wasn't able to wait long enough to see if it comes back - so it takes longer than 2 minutes if it does. Everything else works fine. I have to terminate Dolphin and re-invoke and it works again unless I click on one of the nfs directories. Of course I can also boot the other computer and after KDE boots, Dolphin again works. Interesting that it has to be after KDE boots. So KDE appears to be essential somehow.

                  So the x-systemd.automount option has the same benefits as the autofs program (maybe it is used by the mount option and so is the same thing) and the added benefit for me of less configuration files to maintain Well maybe the same number since I would not have to maintain the export directory and the lines in fstab, but I have been doing those so long now that I understand them. I have the same problem with creating the autofs configuration files as I had initially with the fstab lines for exporting directories. Technical people seem to be pretty bad/unimaginative in writing manuals. The description of the autofs configuration files and the fstab entries for exporting directories both suffer from this lack of imagination. The autofs man pages list the server entry as the very imaginative name 'server'. Does the name indicate the server entry or the name of the server for the directory to mount stuff, or did the writer just assume that using the same name as the function would be self explanatory and thus clearer. Would I get the same effect using a name other than server? If I use another 'name', would autofs barf all over the error because it needs to look for 'server". The man pages for 'export' suffered the same unimaginative descriptions and were very confusing until I had read through about 4 or 5 different web sites to understand exporting directories. I still suffer with a directory "export" at the root level because of this.

                  I could probably change that to "laptop" on the desktop and "desktop" on the laptop, except I am now acclimated to "export" and inertia keeps it there on both computers.

                  As problems go that is not so bad, so I am really not complaining.

                  Comment


                    #10
                    I'd be the first to tell you that a lot of geeks can't write a manual correctly

                    Yup - dolphin will hang if you try to open a resource that's not available; the kill and restart is the method I've used as well.

                    With autofs the only directory name that's carved in stone is the mount point in auto.master - that directory must exist. I personally use a directory called /nfsmount but you can call it anything you like as long as the directory exists and is correctly referenced in auto.master.

                    autofs will create subdirectories you specify under the mount point all by itself; the subdirectory names I listed above in auto.nfs are my personal preference, not anything that's carved in stone.

                    As you mentioned dolphin will also mount NFS shares all by itself; the advantage to autofs is that I can access the shares in shell scripts or other command-line tools (my backup scripts make pretty extensive use of NFS shares). If you don't need that functionality, just export the directories you need and mount them with dolphin; no need for an fstab entry.

                    Hope this helps -
                    we see things not as they are, but as we are.
                    -- anais nin

                    Comment


                      #11
                      Originally posted by wizard10000 View Post
                      deleted portion of quote

                      If you don't need that functionality, just export the directories you need and mount them with dolphin; no need for an fstab entry.

                      Hope this helps -
                      Now that I find helpful and interesting. Every reference I read (which is far from all references) always referenced the exporting and listing in fstab. I never before noticed that din't need the fstab entries.

                      That makes me wonder if I commented out the fstab entries, whether that alone would eliminate the timer countdown. I assume I would still need in fstab the directories that are exported, but can leave out the directories being imported.

                      Comment


                        #12
                        Originally posted by geezer View Post
                        That makes me wonder if I commented out the fstab entries, whether that alone would eliminate the timer countdown. I assume I would still need in fstab the directories that are exported, but can leave out the directories being imported.
                        It certainly would eliminate the timer countdown. I am not sure if kioslave will mount shares in dolphin with just an nfs:// if the shares aren't mounted (or mountable) first.

                        If you're going to use dolphin to mount NFS shares I'd add 'noauto' to the mount options for your NFS shares in fstab. That will kill the timer problem and dolphin should be able to mount the shares on its own. Also, you only need imports in fstab; exports are handled by /etc/exports.

                        Have fun
                        Last edited by wizard10000; May 16, 2017, 04:47 AM.
                        we see things not as they are, but as we are.
                        -- anais nin

                        Comment

                        Working...
                        X