Help with /etc/fstab file for automatic mounting during boot

Hello All,

I have been following this documentation to get these drives to automatically mount during boot.
https://www.novell.com/support/kb/doc.php?id=7000932
I am using SUSE Linux Enterprise Server 11(x86_64)
Version = 11
Patch Level = 3

However, I can only get the drives to mount if I enter the "Sudo mount -a " command into the terminal.

This is the current format of the line I am working on in the /etc/fstab file.

//IP/charts /media/nss/MEDIA/charts cifs auto,user=xxxxxx,password=xxxxxxx 0 0

I also tried adding _netdev and this did not work.

//IP/charts /media/nss/MEDIA/charts cifs [COLOR="#FF0000"]_netdev[/COLOR],auto,user=xxxxxx,password=xxxxxxx 0 0

Please advise.
Thank you.

  • Victoria

Hi
Sounds like the network is not up in time…

Add a cronjob for root;

@reboot /usr/bin/mount -a

Or create an init script to run after the network is up to add the mount points.

[QUOTE]Add a cronjob for root;
Code:

@reboot /usr/bin/mount -a

[/QUOTE]

Hello,
Sorry I am a bit new to linux.
Where should I be adding this code?

Thanks for your help.

Hi
As root user in a terminal run;

crontab -e

press i (to insert) then add the line indicated, then press esc : w q
that will write the change and quit the crontab vi type editor, to
check all is good, run;

crontab -l

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5AyYqv installed on Wed Apr 27 17:05:34 2016)
# (Cronie version 4.2)
@reboot	/usr/bin/mount -a

Then try your reboot and see if the remote shares mount.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.20-11-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

vlee93 Wrote in message:
[color=blue]

I have been following this documentation to get these drives to
automatically mount during boot.
https://www.novell.com/support/kb/doc.php?id=7000932
I am using SUSE Linux Enterprise Server 11(x86_64)
Version = 11
Patch Level = 3

However, I can only get the drives to mount if I enter the "Sudo mount
-a " command into the terminal.

This is the current format of the line I am working on in the /etc/fstab
file.

Code:

//IP/charts /media/nss/MEDIA/charts cifs auto,user=xxxxxx,password=xxxxxxx 0 0

I also tried adding _netdev and this did not work.

Code:

//IP/charts /media/nss/MEDIA/charts cifs _netdev,auto,user=xxxxxx,password=xxxxxxx 0 0

Please advise.[/color]

Given your reference to “/media/nss/MEDIA/charts” is the server
you’re trying this on running Novell Open Enterprise Server (OES)
11? Please post the output from “cat /etc/*release”.

HTH.

Simon Flood
SUSE Knowledge Partner

----Android NewsGroup Reader----
http://usenet.sinaapp.com/

[QUOTE=malcolmlewis;32394]Hi
As root user in a terminal run;

crontab -e

press i (to insert) then add the line indicated, then press esc : w q
that will write the change and quit the crontab vi type editor, to
check all is good, run;

crontab -l

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5AyYqv installed on Wed Apr 27 17:05:34 2016)
# (Cronie version 4.2)
@reboot	/usr/bin/mount -a

Then try your reboot and see if the remote shares mount.
[/QUOTE]

Hello again,
Thank you for the clear instructions. However, after a reboot they did not mount. :frowning:
I’m not sure where to go from here. It just seems like they don’t want to stay mounted after a reboot!

[QUOTE=smflood;32396]vlee93 Wrote in message:
[color=blue]

I have been following this documentation to get these drives to
automatically mount during boot.
https://www.novell.com/support/kb/doc.php?id=7000932
I am using SUSE Linux Enterprise Server 11(x86_64)
Version = 11
Patch Level = 3

However, I can only get the drives to mount if I enter the "Sudo mount
-a " command into the terminal.

This is the current format of the line I am working on in the /etc/fstab
file.

Code:

//IP/charts /media/nss/MEDIA/charts cifs auto,user=xxxxxx,password=xxxxxxx 0 0

I also tried adding _netdev and this did not work.

Code:

//IP/charts /media/nss/MEDIA/charts cifs _netdev,auto,user=xxxxxx,password=xxxxxxx 0 0

Please advise.[/color]

Given your reference to “/media/nss/MEDIA/charts” is the server
you’re trying this on running Novell Open Enterprise Server (OES)
11? Please post the output from “cat /etc/*release”.
[/QUOTE]

Hello,

Yes it is Novell Open Enterprise Server 11

[CODE]# cat /etc/*release
LSB_VERSION=“core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64”
Novell Open Enterprise Server 11 (x86_64)
VERSION = 11.2
PATCHLEVEL = 2
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

[/CODE]

On 28/04/16 16:24, vlee93 wrote:
[color=blue]

Yes it is Novell Open Enterprise Server 11

Code:

 # cat /etc/*release

LSB_VERSION=“core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64”
Novell Open Enterprise Server 11 (x86_64)
VERSION = 11.2
PATCHLEVEL = 2
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

--------------------[/color]

So you want to mount //IP/charts to the sub-directory charts of the
mounted NSS volume MEDIA (/media/nss/MEDIA/charts)?

I suspect that during server startup the mount via /etc/fstab is
attempted before the NSS volume has mounted.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Perhaps you can point me in the right direction of the other suggestion about the init script?

[QUOTE=smflood;32402]On 28/04/16 16:24, vlee93 wrote:
[color=blue]

Yes it is Novell Open Enterprise Server 11

Code:

 # cat /etc/*release

LSB_VERSION=“core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64”
Novell Open Enterprise Server 11 (x86_64)
VERSION = 11.2
PATCHLEVEL = 2
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

--------------------[/color]

So you want to mount //IP/charts to the sub-directory charts of the
mounted NSS volume MEDIA (/media/nss/MEDIA/charts)?

I suspect that during server startup the mount via /etc/fstab is
attempted before the NSS volume has mounted.
[/QUOTE]

Yes. It gets mounted when I do it manually using sudo mount -a but during a reboot it does not work automatically.

Hi Victoria,

I guess the question is: When working through the /etc/fstab file, is /media/nss/MEDIA already available when the fstab entry for /media/nss/MEDIA/charts is processed.

Either /media/nss/MEDIA is the result of some later startup of a subsystem, or it even may be as simple as a question of ordering in /etc/fstab.

As a work-around you could place an according mount statement (a simple “mount /media/nss/MEDIA/charts”) into /etc/init.d/after.local, which is run after all services for a runlevel have been started.

Regards,
Jens

Hello everyone,

This issue was fixed after adding a sudo mount-a command into the init.d file.
Thank you for all your help.