Automatically mount storage when Linux is started

Source: Internet
Author: User
Automatically mount storage-Linux Enterprise Application-Linux server application information after Linux is started. The following is a detailed description. Df-h can only display the partition of the local hard disk, and fdisk-l can still see the storage space, which indicates that there is a problem connecting the server to the storage.

Enter history | grep mount to view all mount records. The last one is mount/dev/emcpowerb1/oracle/oradata.

Copy it, paste it to the command line, and press enter to tell the buddy what to do.

However, there will still be problems during the next restart, so we should solve them completely. There are two solutions:

1: Put the mount command in/etc/rc. d/rc. go to the local directory, vi/etc/rc. d/rc. run the mount/dev/emcpowerb1/oracle/oradata command. Save and exit.

2: Modify the/etc/fstab document

First vi/etc/fstab

LABEL = // ext3 defaults 1 1
LABEL =/boot ext3 defaults 1 2
Tmpfs/dev/shm tmpfs defaults 0 0
Devpts/dev/pts devpts gid = 5, mode = 620 0 0
Sysfs/sys sysfs defaults 0 0
Proc/proc defaults 0 0
LABEL = SWAP-sda2 swap defaults 0 0

This is the content of fstab. Add the information of the disk to be mounted to it:

LABEL = // ext3 defaults 1 1
LABEL =/boot ext3 defaults 1 2
Tmpfs/dev/shm tmpfs defaults 0 0
Devpts/dev/pts devpts gid = 5, mode = 620 0 0
Sysfs/sys sysfs defaults 0 0
Proc/proc defaults 0 0
LABEL = SWAP-sda2 swap defaults 0 0
/Dev/emcpowerb1/oracle/oradata ext3 defaults 0 0

Well, save and exit. It will take effect after the server is restarted.

In/etc/fstab, each column indicates:

1st columns are the file system or storage devices to be mounted; 2nd columns are the mount points; 3rd columns specify the file system or partition type;

Column 4th is the mount option. For details, refer to the man mount. Command. defaults will be fine unless you have special requirements;

Column 5th lists the dump option and sets whether to allow the backup program to dump the backup file system. If the value is 0, the file system is ignored. If the value is 1, the file system is backed up;

Columns 6th as The fsck option, telling the fsck program in what order to check the file system, 0 is ignored;
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.