Linux under Disk partitioning

Source: Internet
Author: User

Create a partition---format---"Mount using

1. Create a partition

[[email protected] ~]# fdisk-l view partition of disk

[Email protected] ~]# Fdisk/dev/sdb

Command (M for help): M get assistance to view specific commands that can be used

Command (M for help): n New Partition

Command Action

E Extended

P primary partition (1-4)

P #主分区

Partition number (1-4): 1 primary partition numbers

First cylinder (1-10443, default 1):

Using Default value 1

Last cylinder, +cylinders or +size{k,m,g} (1-10443, default 10443): +10g #指定分区的大小

Command (M for help): P output

Command (M for help): W exits and saves

The partition table has been altered!

Calling IOCTL () to re-read partition table.

Syncing disks.

2. Formatting

[[email protected] ~]# MKFS.EXT4/DEV/SDB1 format SDB1 this partition

MKE2FS 1.41.12 (17-may-2010)

Filesystem label=

OS Type:linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

655776 inodes, 2622603 blocks

131130 blocks (5.00%) reserved for the Super user reserves 5% of the space for Superuser, and when the disk usage rate is 100%, the root user can still enter the system.

First Data block=0

Maximum filesystem blocks=2688548864

Bayi block Groups

32768 blocks per group, 32768 fragments per group

8096 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing Inode Tables:done

Creating Journal (32768 blocks): Done

Writing superblocks and filesystem accounting Information:done

This filesystem would be automatically checked every mounts or

Whichever comes first. Use Tune2fs-c or-i to override.

3. New Mount Directory

Mkdir/music New Mount Directory

4. Mount the Use

Mount/dev/sdb1/music mounting using the new partition

5. Automatic Boot implementation

echo "Mount/dev/sdb1/music" >>/etc/rc.local

The purpose of the/etc/rc.local file is that the system will automatically execute the commands in this file.


How many partitions are divided when the system is installed.

/as large as possible

Twice times the swap memory

/home

/boot 200M sufficient


This article is from the "unplug the Operational Space" blog, please be sure to keep this source http://zhangdj.blog.51cto.com/9210512/1878245

Linux under Disk partitioning

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.