Notification texts go here Contact Us Buy Now!

Restart fstab using cron

In this tutorial I am going to show you how to Restart fstab using crontab .

Restart fstab using crontab

My Scenario:-  I am running MYSQL database server in Linux recent days MYSQL backup scheduler is not running properly. I analyzed the log and i found there is problem with volume mount point. Remote volume often went offline.

Solution:-  I tried to list the volume using the below command.
[root@Techlanda.com~]#mount -l 

My remote volume not listed in the list. I had a solution for that mount -a every time open the terminal by typing the command mount -a to mount. Volume is really waste of time. So i decided to automate the task using crontab.

Note:- This is work around. I will fix this issue during non production window.

This is the command to mount all stuff from /etc/fstab.
[root@Techlanda.com~]#mount -a 

Here is scheduler to restart the mount point volume.

Step#1:- Open the crontab to fstab scheduler
[root@Techproxy ~]# crontab -e
Step#2:- fstab mount script
28 12 * * * /bin/mount -a
#Scheduler will run at every day 12:28 PM IST
After adding the line press ESC and type :wq! to save :q! to abort changes.

I hope you  this information is useful for you. Please forgive any typos or incomplete sentences.

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.