Linux Learning-disk partitioning + boot auto mount

Source: Internet
Author: User

Looking at the bird Brother Linux private dishes, found a lot of interesting things, really brief encounter.

Situation: Create a new filesystem hanging in the/srv/myproject directory, and let it automatically mount to the directory, the directory for Project group sharing, no other people have any permissions, capacity 5G

Goal: Understand file system build, automatic mount, permission assignment

The process is as follows:

1. Create a partition using FDISK/DEV/SDA, create a new partition according to the English prompts, and save the last W

2. Restart

3. Format: Mkfs-t Ext3/dev/sda6 Sda6 is the new partition.

4. Set up a mount point: mkdir/srv/myproject

5. Edit the Automatically mounted profile: Vi/etc/fstab

New line:/dev/sda6/srv/myproject ext3 defaults 1 2

One, two or three items do not explain, four is a string set of things

    • Auto: The system mounts automatically, Fstab is this option by default
    • DEFAULTS:RW, suid, Dev, exec, auto, Nouser, and async.
    • Noauto boot does not mount automatically
    • Nouser only super users can mount
    • RO mount by read-only permission
    • RW mount by Read writable permission
    • User can mount
    • Please note that the optical drive and floppy drive can only be mounted when the media is installed, so it is Noauto

Five items indicate dump backup settings, 1 o'clock will allow dump program backup, 0 when the backup operation is ignored

The six items are the fsck disk check setting, which is a numeric value that represents the order, 0 o'clock never check,/the root directory is always 1, the other partitions start from 2, the smaller the first check, the same simultaneously check

6. Test an automatic mount: mount-a use DF to see

7. Set permissions: Chgrp project/srv/myproject; chmod 2770/srv/myproject

Linux Learning-disk partitioning + boot auto mount

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.