Linux for large-capacity disk partitioning

Source: Internet
Author: User

1. Use the fdisk-l command to view the disks that can be partitioned

2. Partitioning using the parted command

Parted/dev/sdb

3. Create a partitioned table

Mklabel

Disk type Select GPT, warning Select Yes to erase disk original information

4. Use the Print command to view the current partition status

5. Create a partition using the Mkpart command

Partition name Optional

File system on request

The start end is on demand, and ignore ignores the warning,,, where the end point can use a percentage, such as 100%, to represent the remaining space used

Attention

When dividing the first partition, it is best to use partition alignment, otherwise there will be a warning, the alignment method (may lose a few m capacity)

View Current Disk parameters

Use the formula (Optimal_io_size+alignment_offset)/physical_block_size to calculate the start of the first partition

It is: (1835008+0)/512 = 3584

The parted parameter, the first starting position, can be 3584s

Also, be aware that,,, partitions are partitioned as far as possible,,, such as 3584s-32% 32%-50% 50%-100%,,, system automatically aligns

6. Use the Q command to exit

==================

Mount the partition.

Write UUID to/etc/fstab

$ ' | Xargs Echo >>/etc/fstab

Modify Vi/etc/fstab

Modify in the format

Mount with Mount-a

viewing partitions using Mount

[[Email protected] ~]#mount-a[[Email protected] ~]#MountSysfs on/sys type SYSFS (rw,nosuid,nodev,noexec,relatime,seclabel) proc on/proc Type proc (rw,nosuid,nodev,noexec,relatime) Devtmpfs on/dev Type Devtmpfs (rw,nosuid,seclabel,size=131910692k,nr_inodes=32977673,mode=755) Securityfs on/sys/kernel/Security Type SECURITYFS (rw,nosuid,nodev,noexec,relatime) Tmpfs on/dev/SHM type TMPFS (Rw,nosuid,nodev,seclabel) devpts on/dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000) Tmpfs on/run type TMPFS (rw,nosuid,nodev,seclabel,mode=755) Tmpfs on/sys/fs/cgroup type TMPFS (ro,nosuid,nodev,noexec,seclabel,mode=755) Cgroup on/SYS/FS/CGROUP/SYSTEMD type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd /systemd-cgroups-agent,name=systemd) Pstore on/sys/fs/pstore type Pstore (rw,nosuid,nodev,noexec,relatime) Efivarfs on/sys/firmware/efi/efivars type Efivarfs (rw,nosuid,nodev,noexec,relatime) Cgroup on/sys/fs/cgroup/devices Type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,devices) Cgroup on/sys/fs/cgroup/Freezer type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,freezer) Cgroup on/sys/fs/cgroup/PIDs type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,pids) Cgroup on/sys/fs/cgroup/cpuset type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuset) Cgroup on/sys/fs/cgroup/Cpu,cpuacct type Cgroup (RW,NOSUID,NODEV,NOEXEC,RELATIME,SECLABEL,CPUACCT,CPU) Cgroup on/sys/fs/cgroup/Net_cls,net_prio type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,net_prio,net_cls) Cgroup on/sys/fs/cgroup/Memory Type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,memory) Cgroup on/sys/fs/cgroup/Blkio type Cgroup (Rw,nosuid,nodev,noexec,relatime,seclabel,blkio) Cgroup on/sys/fs/cgroup/hugetlb type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,hugetlb) Cgroup on/sys/fs/cgroup/perf_event type Cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,perf_event) Configfs on/sys/kernel/config type Configfs (rw,relatime)/dev/mapper/centos-root On/type XFS (rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=512, Noquota) Selinuxfs on/sys/fs/selinux type SELINUXFS (rw,relatime) systemd-1 on/proc/sys/fs/binfmt_misc type AutoFS (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ ino=15691) Debugfs on/sys/kernel/Debug Type Debugfs (rw,relatime) Mqueue on/dev/mqueue type Mqueue (Rw,relatime,seclabel) Hugetlbfs on/dev/hugepages type HUGETLBFS (Rw,relatime,seclabel)/dev/sda2 on/boot type XFS (rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=512, Noquota)/DEV/SDA1 on/boot/efi type VFAT (Rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt, errors=remount-ro)/dev/mapper/centos-home on/home type XFS (rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=512, Noquota) Tmpfs on/run/user/0 type TMPFS (rw,nosuid,nodev,relatime,seclabel,size=26384664k,mode=700)/DEV/SDB1 on/u01 type XFS (rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=3584, Noquota)/DEV/SDB2 on/u02 type XFS (rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=3584, Noquota)/DEV/SDB3 on/u03 type XFS (Rw,relatime,seclabel,attr2,inode64,logbsize=256k,sunit=512,swidth=3584,noquota)

View the last 3, which is the Mount success

Linux for large-capacity disk partitioning

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.