Linux Jobs 7

Source: Internet
Author: User

1, create a 10G partition, and the format of the Ext4 file system;

(1) The block size is required to 2048, the reserved space percentage is 2, the volume label is MyData, the default Mount property contains ACLs;

(2) Mount to the/data/mydata directory, require the mount to prohibit the program to run automatically, and do not update the file access time stamp;

1, create the partition;

Use the FDISK command to create a partition on disk/dev/sdb, as follows:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/87/36/wKiom1fXpwvSDnjSAAFYnce2uPQ167.png "title=" 1.png " alt= "Wkiom1fxpwvsdnjsaafynce2upq167.png"/>


2, formatted partition;

Use the MKE2FS command to format the/DEV/SDB1 as a Ext4 file system:

MKE2FS Command Options Description:

-T: Specifies the file system;

-B: Specifies the disk block size, in bytes;

-M: Specifies the percentage of space that is reserved for administrative personnel, which can be used to specify a percentage of the reserved space, by default 5%, to prevent the management operation (MV, CP, etc.) from being exhausted;

-L: Specify the volume label;

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/87/37/wKiom1fXujbgSIkVAACmUfWZD6k345.png "title=" 2.png " alt= "Wkiom1fxujbgsikvaacmufwzd6k345.png"/>


When formatting a partition in CentOS7, the ACL mount option is already included by default and can be viewed by the tune2fs-l command, as follows:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/87/37/wKiom1fXvVuyOX81AAGE0duk4RI706.png "title=" 3.png " alt= "Wkiom1fxvvuyox81aage0duk4ri706.png"/>

If not, you can modify the default mount properties by using the TUNE2FS command option, as follows:

Tune2fs-o {Feature|^feature}

FEATURE: Enable default properties

^feature: Disabling Default properties

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/35/wKioL1fXvvewbSjvAADwvuc3U6k896.png "title=" 4.png " alt= "Wkiol1fxvvewbsjvaadwvuc3u6k896.png"/>


3. Mount File System

To mount the file system using the Mount command, the process is as follows:

1). Create a file system mount directory, which is the mount point;

2). Mount using the Mount command and use-O to enable or disable file system options;

Mount File System Option Description:

NOEXEC: Do not allow files on the file system to run as a process, even if the file has Execute permission;

Noatime: Does not update its access timestamp when accessing a file or directory to reduce disk I/O;

3). Verification;

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/38/wKiom1fXzRGiG9neAAA8KxGUw5A528.png "title=" 5.png " alt= "Wkiom1fxzrgig9neaaa8kxguw5a528.png"/>


2, create a swap partition of size 1G, and create a good file system, and enable it;

3. Write a script

(1), obtain and list all disk devices on the current system;

(2), display the space usage information about each partition on each disk device;

4. Summarize the different levels of RAID and its combination mode and performance;

5, the creation of a size of 10G RAID1, requires a free disk, and chunk size of 128k;

6, the creation of a size of 4G RAID5 device, chunk size of 256k, format Ext4 file system, required to automatically mount to the/backup directory, and do not update the access timestamp, and support ACL function;

7. Write a script

(1) Accept more than one file path as a parameter;

(2) show the number of rows owned by each file;

(3) A summary of the total number of documents for several statistics of their lines;

8. Write a script

(1) Pass more than two strings as user name;

(2) Create these users, and the password with the user name;

(3) A summary of the total creation of a number of users;

9, write a script, create a new 20 users, visitor1-visitor20; calculate the sum of their IDs;

10. Write a script that counts the sum of the number of lines starting with # in/etc/rc.d/rc.sysinit,/etc/rc.d/init.d/functions, and/etc/fstab files, and the total number of blank lines;

11. Write a script that shows the user name, UID, and the UID of all the default shell users on the current system.

12. Write a script that displays the user name of all the users on the current system with additional groups, and how many such users are in total;

13. Create a volume group of at least two physical volumes with a size of 20G, requiring a PE size of 8M, and creating a logical volume of 5G in the volume group MYLV1, formatted as EXT4 file system, boot automatically mounts to/users directory, support ACL;

14, the new user magedu, the home directory is/users/magedu, and then su switch to this user, copy multiple files to the home directory;

15, expand MYLV1 to 9G, ensure that the original data is fully available after the expansion;

16, reduce MYLV1 to 7G, to ensure that the original data is fully available after the completion of the reduction;

17, the MYLV1 to create a snapshot, and through the backup data, the requirement to retain the original genera group and other information;


This article from "Silver Kay Blog" blog, declined reprint!

Linux Jobs 7

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.