当前位置:首页 > 服务端 > Ubuntu分区小知识与分区方案

Ubuntu分区小知识与分区方案

Most PC operating systems still work with an ancient disk partition scheme that historically makes distinction between primary and extended partitions. It also places a limitation for four primary partitions or three primary partitions and one extended partition. When present, an extended partition can then be divided into any number number of logical partitions.
However, many recent (since 2011) machines use a different and incompatible scheme known as "gpt" which allows many more primary partitions. Search these pages for UEFI to learn how to tell which scheme your system is using; applying techniques for one scheme to a system that uses the other will definitely lead to possibly serious problems.
Each Windows installation will need to be installed on a primary partition. Windows systems commonly assign a drive letter to each individual (Windows) partition.
Linux operating systems need a minimum of one partition: one for the OS itself (and data files) and optionally one for a swap area (to be used as an extension for RAM memory) if preferred over a swap file.
While these two partitions can be primary partitions, more flexibility is afforded when logical partitions (within the extended partition) are used. In this manner, as many partitions can be created as is desired. Multiple (Ubuntu Linux and Mac) operating systems can be installed, each in its own partition, and data can also be more easily compartmentalized when it is placed within individually separate logical partitions. (The swap partition can also be located on a logical partition.)

一句话概括:Ubuntu系统在一个硬盘上只支持最多4个 Primary 分区或3个 Primary 分区加1个 Extended 分区。Extended 分区下面可以有多个 Logical 分区。

以2TB大小的硬盘为例,结合官方推荐的分区方案(单系统):

  • swap: 10GB (10240MB)
    这是10GB是以系统内存大小4GB的2倍为依据的。也就是说,swap 分区的大小要大于系统内存大小的2倍。

  • (root)/: 30GB (30960MB)
    存放 Ubuntu 系统文件和程序

  • /home: 100GB (102400MB)
    存放系统/应用的配置文件,数据和其他文件。Ubuntu 下新建一个用户会自动在/home文件夹下新建对应的文件夹/username,这个用户的文档、下载等都存放在这个文件夹里,所以这个分区不能太小。

  • 10850GB空间分给其他,比如/data/存放数据或/download当下载盘。

参考文献

根据我自己查到的资料,分区类型为 Primary 或 Logical 本身并不影响分区的性能和使用。

参考文献

作者:2021年的顺遂平安君
来源链接:https://www.cnblogs.com/yaos/p/6940709.html

版权声明:
1、Java侠(https://www.javaxia.com)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaxia.com/server/124740.html

分享给朋友: