1

I am currently mounting my server using the following command.

mount ip.ip.ip.ip:/home/backups /mnt/backups/

Every time the server reboots I have to add it again manually.

How can I Permanently add it?

0

2 Answers 2

5

Solution

Add the following entry to your etc/fstab file:

# device       mountpoint     fs-type     options      dump fsckorder
   ...
   ip.ip.ip.ip:/home  /mnt    nfs          rw            0    0
   ...

Reference

The Linux Documentation Project - 4.2. Getting NFS File Systems to Be Mounted at Boot Time

0
-2

Steps to mount a disk permanently.
Doing this will mount your disk during boot time.

  1. Attach your disk manually once.
  2. Goto /proc/mounts and /etc/mtab and look for your mount entry.
  3. Copy the entry that you want to be mounted on boot.
  4. Paste it at the end of /etc/fstab. /etc/fstab Contains entries that are mounted during boot.

You can even manually add your entry in /etc/fstab, but copying it from /proc/mounts or /etc/mtab makes sure that you not make any error or mistake in listing your mount point

more helpful links link 1 link 2

3
  • Strictly speaking, you don't know that this user is using a system where your solution actually works (I believe it pre-supposes a Linux system). Your answer could benefit from more descriptive links, especially the second of the two.
    – Kusalananda
    Jun 28, 2022 at 18:06
  • It applies to all linux systems and it is tested and working in ubuntu and centos Jun 29, 2022 at 5:24
  • Exactly, and the user in the question may possibly be using some other system. Since they don't say that they are using Linux at all, they could just as well be using OpenBSD, Solaris, AIX, macOS or some other Unix. You really ought to check the target of that second link too, as it points to the current question (which may not be useful).
    – Kusalananda
    Jun 29, 2022 at 6:06

Not the answer you're looking for? Browse other questions tagged .