Mounting a LINUX disk array

Source: Internet
Author: User
Article Title: LINUX disk array mounting. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. For details about how to attach a file, write the command in detail to the parameters involved below.

The array is c0d1p1. If there are two, c0d1p2 is arranged downward.

Mount command mount-t ext3/dev/cciss/c0d1p1/mount point

2. How do I configure automatic mounting upon startup? In the FSTAB file, how do I set it?

In the FSTAB file, what is the file type of the disk array? What is a mount point?

FSTAB

/Dev/cciss/c0d1p1 mount point

Ext3 default 0 0


Haha!

If you can find the graphic tool, mount and pull it with the graphic tool!

Appendix mount command details

Currently, there are two methods to mount a file system. One is to mount the file, and the other is to automatically mount the file through the/etc/fstab file;

1. mount disk partitions (or storage devices)

The usage of mount is actually simple. Let's talk about some common ones;

Command Format for mounting a file system:

[Root @ localhost beinan] # mount [-t file system] [-o option] Device directory

Note:

-T through this parameter, we can specify the type of the file system. In general, you do not have to specify it and can also recognize it.-t is followed by ext3, ext2, reiserfs, vfat, ntfs, etc, vfat is the parameter used by the fat32 and fat16 partition file systems. If you forget the file system, you can add auto after-t;

-O: The primary options include permissions, users, disk quotas, and language encoding. However, most of the language encoding options are used in vfat and ntfs file systems. Because there are too many options, let's take a look at man mount;

A device is a storage device, such as/dev/hda1,/dev/sda1, and cdrom... for the storage devices in your system, you can use fdisk-l or/etc/fstab or dmesg. In general, the optical drive device is/dev/cdrom; the hard drive device is/dev/fd0; the hard drive and the mobile hard drive are subject to the output of fdisk-l;

1) Attach the optical drive and drive;

Example:

[Root @ localhost beinan] # mount/dev/cdrom

[Root @ localhost beinan] # mount/dev/fd0

The first line is the mount optical drive. As for the mount path, you can view it through/etc/fstab. Likewise, this is true for the drive/dev/fd0 device; for example, in/etc/fstab


/Dev/hdc/media/cdrecorder auto users, exec, noauto, managed 0 0

We can be certain that the CD is mounted to the/media/cdrecorder directory;

However, we can also specify the location where the cdrom is mounted, for example,/mnt/cdrom, so we can also mount the optical drive;

[Root @ localhost beinan] # mkdir/mnt/cdrom

[Root @ localhost beinan] # mount/dev/cdrom/mnt/cdrom

Create a directory and run the mount command. Then, the cdrom will be mounted to/mnt/cdrom. Then, we can view the information and files on the CD in/mnt/cdrom; you can create this directory as needed. What directory is used is not the most important. It is important that you know what you are doing. For example, we can also create a dvdrom directory and mount it with mount/dev/cdrom/mnt/dvdrom;

Sometimes our devices are COMBO and support for dvd cd and burning. We 'd better check the optical drive devices in two ways: View/etc/fstab, the second is to use ls-l for viewing. For example, we can view a line similar to the following in/etc/fstab;

/Dev/hdc/media/cdrecorder auto users, exec, noauto, managed 0 0

Through this, we can know that hdc is a cdrom device and a cdrecorder device. to verify our statement, use ls-l to list files;

[Root @ localhost beinan] # ls-lh/dev/dvd *

Lrwxrwxrwx 1 root 3 2005-09-13/dev/dvd-> hdc

[Root @ localhost beinan] # ls-lh/dev/cdrom

Lrwxrwxrwx 1 root 3 2005-09-13/dev/cdrom-> hdc

[Root @ localhost beinan] # ls-lh/dev/cdwriter

Lrwxrwxrwx 1 root 3 2005-09-13/dev/cdwriter-> hdc

Isn't it clear? The file names of DVDs, cdrom, and cdwriter are all linked to the hdc device. Therefore, the root cause of the optical drive is/dev/hdc. Therefore, we can also mount the optical drive;

[Root @ localhost beinan] # mkdir/mnt/cdrom
[Root @ localhost beinan] # mount/dev/hdc/mnt/cdrom

2) file systems that Mount hard disks and mobile hard disks;

A partition can only be used after a file system is created. As we have mentioned earlier, ext2, ext3, reiserfs, fat32, msdos, and ntfs are widely used in Linux;

[1] mounting a Linux File System;

For ext2, ext3, and reiserfs, you do not need to specify the file system encoding. In fact, mount does not have this function. For these Linux file systems, if encoding problems occur, they are generally specified through export LANG; therefore, it is relatively simple to mount these file systems;

First, we need to create a directory to mount the file system. As we mentioned earlier, a partition with a file system must have a mount point to be mounted to the system; this mount point is a directory. For example, we learned through fdisk-l that hda5 is a Linux partition and created a file system, such as the reiserfs file system;

[Root @ localhost beinan] # fdisk-l/dev/hda

Disk/dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/hda1*1 765 6144831 7 HPFS/NTFS
/Dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/Dev/hda3 2806 9729 55617030 5 Extended
/Dev/hda5 2806 3825 8193118 + 83 Linux
/Dev/hda6 3826 5100 10241406 83 Linux
/Dev/hda7 5101 5198 787153 + 82 Linux swap/Solaris
/Dev/hda8 5199 6657 11719386 83 Linux
/Dev/hda9 6658 7751 8787523 + 83 Linux
/Dev/hda10 7752 9729 15888253 + 83 Linux

We first use fdisk-l to check the partition information: We want to mount the/dev/hda5 partition. For example, the hda5 partition creates the reiserfs file system;

[Root @ localhost beinan] # mkdir/mnt/hda5/Note: Create a mount directory first;
[Root @ localhost beinan] # chmod 777/mnt/hda5/Note: Set the/mnt/hda5 permission to be writable and executable by any user, so that all users can write;
[Root @ localhost beinan] # mount-t reiserfs/dev/hda5/mnt/hda5 Note: Use-t reiserfs to specify/dev/hda5 as the reiserfs file system, and mount it to the/mnt/hda5 directory;
[Root @ localhost beinan] # mount-t auto/dev/hda5/mnt/hda5 Note: if we do not know the reiserfs File System on hda5, we can use-t auto to determine the system and then mount it to/mnt/hda5;
[Root @ localhost beinan] # mount/dev/hda5/mnt/hda5 Note: directly mount/dev/hda5 to/mnt/hda5 without adding any parameters; the system automatically determines the partition file system;

Is it mounted? We can check it through df-lh;

[1] [2] Next page

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.