How to Mount and Unmount Filesystem in Linux

In daily server maintenance, we may need to add another disks to our server. This tutorial will walk you through how to mount and unmount filesystem in Linux.

The directories where filesystems are mounted on are called mount points, you can access files in mount points by entering to that directory.

Mount Filesystem

If you want to mount disk /dev/sdb on /backup directory, just run the following command:

# mount /dev/sdb /backup

Mount command automatically detects the file system on disk. But in some cases, you need specify the file system type manually.

# mount -t ext4 /dev/sdb /backup

If you want to mount filesystems on system boot, edit /etc/fstab and append the following line at the end of file, change /dev/sdb with your own disk.

/dev/sdb /backup ext4 defaults 0 0

Now, run mount -a to mount all disks defined in /etc/fstab file.

Unmount Filesystem

You can use umount command to unmount filesystems, just run umount command with disk name or mount point name to unmount currently mounted disk.

# umount /backup
# umount /dev/sdb

How to Change Awstats Update Frequency on Plesk Panel

Awstats is a powerful statistics tool and it is a built-in component on plesk panel, you can active awstats by choosing it at website settings. By default, plesk update awstats everyday, you have to wait for 24 hours before awstats generate the graphic results. In this tutorial, I will show you how to update awstats hourly in two steps.

Log onto the Plesk control panel and navigate to “Tools & Settings”–>”Scheduled Tasks”, add a task by clicking “Add Task” button.

Choose “Run a command” for Task Type option.

Fill in the “Command” blank with /usr/local/psa/admin/sbin/statistics

The command above will update all websites, it may consumes a lot of server resources. You can assign a website in the command, please replace with your own domain.

/usr/local/psa/admin/sbin/statistics --calculate-one

Then set the frequency, description, notification, and make sure the “Active” option is selected on the top.

Here is a screenshot.

Now, awstats will be updated hourly.

There is a tutorial online suggesting move file ‘awstats’ in /etc/cron.daily/ to /etc/cron.hourly/, I’ve tried but it didn’t work. I asked Plesk Support on twitter and they suggest me to set up a cron job to implement this task.

How to Add Firewall Service to Vultr Instance

Vultr announced firewall service and it’s time to stop system built-in firewall. I will walk you through how to add firewall service to your vultr instances step by step in this tutorial.

Before the details, I am showing you the steps. First, add a firewall group. Second, add firewall rules to the firewall group. Third, link instances to this firewall group.

Add a firewall group

Navigate to Servers–>Firewall, click Add Firewall Group, then fill in the blank by entering a firewall description.

Add vultr firewall group

Add firewall description

Add rules

Vultr firewall service supports ICMP, TCP, UDP and GRE protocols. ICMP protocol is used for ping service, if you allow others to ping your vultr instances, please add a rule to accept ICMP packets. TCP and UDP protocols are two commonly used protocols. Here is a list of protocols and ports that you may want to accept packets from:

  • HTTP: TCP 80
  • HTTPS: TCP 443
  • SSH: TCP 22
  • FTP: TCP 21 20
  • MySQL: TCP 3306

You can filter the packets by source, accetps packets from anywhere. If you want to allow SSH connection from a specific IP and reject other sources, you choose Custom and fill in the blank next to source by entering an IP address and sub-net mask. For example, if you accept SSH access from, then fill the blank with

There is a cross sign and trash bin on the right. Adding a rule by clicking cross sign, while removing a rule by clicking trash bin sign.

Add firewall rules

Link to instances

Congrats, you are almost done, only one step left. Choose the instance you want to link and click the cross sign on the right. Wait for less than 120 seconds, and the firewall has been actived for the instance.

If you want to unlink instances, by click the unlink sign on the right of each linked instances. It also takes less than 120 seconds to take effect.

unlink vultr instances