Linux Boot auto Mount storage

Source: Internet
Author: User

Today, a developer of the system told me that they had tested the system and restarted the server and found that they could not find the storage.

Alas, needless to say. Surely there is no automatic loading of the storage chant. A technical consultant, one day 4-5k pay people even this operation will not ah? Endure the ...

Log on to the server, to see the next, it is true that there is no automatic loading, df-h can only display the local hard disk partition, Fdisk-l still can see the storage space, this indicates that the server connection storage is a wood problem.

Enter History | grep mount, view all Mount Records, and the last one is: Mount/dev/emcpowerb1/oracle/oradata. Copy it, paste it to the command line, return to the man and say what to do. Ha ha

But this next restart will still have a problem, or a complete solution. There are two ways to solve this problem:

1: Put the mount command into the/etc/rc.d/rc.local, vi/etc/rc.d/rc.local, and then plug the Mount/dev/emcpowerb1/oracle/oradata into the command. Save it and quit.

2: Modify the/etc/fstab document

First Vi/etc/fstab,

label=//ext3 Defaults 1 1
Label=/boot/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 proc Defaults 0 0
Label=swap-sda2 swap swap defaults 0 0

This is the content of the Fstab, add the disk information to be mounted inside it:

label=//ext3 Defaults 1 1
Label=/boot/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 proc Defaults 0 0
Label=swap-sda2 swap swap defaults 0 0

/dev/emcpowerb1/oracle/oradata ext3 defaults 0 0

Well, save the exit, and then restart the server to take effect. Ho Ho

/etc/fstab the inside each column probably means:

The 1th column is the file system or storage device that needs to be mounted, the 2nd column is the mount point, and the 3rd column specifies the type of file system or partition; 4th column mount option, detailed reference man Mount. command, defaults no problem, unless you have special needs; the 5th column dump option, set whether to let the backup program dump the file system, 0 is ignored, 1 is a backup, the 6th column is the FSCK option, tells the FSCK program in what order to check the file system, 0 is ignored;

Anyway:

Edit/etc/fstab
For example, if you want to install/DEV/SDA1 on the boot,/mnt can add a line in/etc/fstab
/DEV/SDA1/MNT ext3 defaults 0 1
It's OK to save it.

Linux Boot auto Mount storage

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.