Ubuntu Install Method

简介: 1. 主分区 挂载点 选择  / (最大空间分配,Ext4,Ext3皆可) 2. 逻辑分区 home分区 挂载点 /home  3. 交换分区 最小  Ext3与Ext4的区别 Linux   kernel 自 2.6.28 开始正式支持新的文件系统 Ext4。 Ext4 是 Ext3 的改进版,修改了 Ext3   中


1. 主分区 挂载点 选择  / (最大空间分配,Ext4,Ext3皆可)

12.jpg


2. 逻辑分区 home分区 挂载点 /home 

7.jpg


3. 交换分区 最小 

1.jpg



Ext3与Ext4的区别


Linux
  kernel 自 2.6.28 开始正式支持新的文件系统 Ext4。 Ext4 是 Ext3 的改进版,修改了 Ext3
  中部分重要的数据结构,而不仅仅像 Ext3 对 Ext2 那样,只是增加了一个日志功能而已。Ext4
  可以提供更佳的性能和可靠性,还有更为丰富的功能:<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">1. 与 Ext3 兼容。</span><span class="Apple-converted-space">&nbsp;</span>执行若干条命令,就能从 Ext3 在线迁移到 Ext4,而无须重新格式化磁盘或重新安装系统。原有 Ext3 数据结构照样保留,Ext4 作用于新数据,当然,整个文件系统因此也就获得了 Ext4 所支持的更大容量。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">2. 更大的文件系统和更大的文件。</span><span class="Apple-converted-space">&nbsp;</span>较之 Ext3 目前所支持的最大 16TB 文件系统和最大 2TB 文件,Ext4 分别支持 1EB(1,048,576TB, 1EB=1024PB, 1PB=1024TB)的文件系统,以及 16TB 的文件。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">3. 无限数量的子目录。</span><span class="Apple-converted-space">&nbsp;</span>Ext3 目前只支持 32,000 个子目录,而 Ext4 支持无限数量的子目录。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">4. Extents。</span><span class="Apple-converted-space">&nbsp;</span>Ext3
  采用间接块映射,当操作大文件时,效率极其低下。比如一个 100MB 大小的文件,在 Ext3 中要建立 25,600
  个数据块(每个数据块大小为 4KB)的映射表。而 Ext4 引入了现代文件系统中流行的 extents 概念,每个 extent
  为一组连续的数据块,上述文件则表示为“该文件数据保存在接下来的 25,600 个数据块中”,提高了不少效率。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">5. 多块分配。</span><span class="Apple-converted-space">&nbsp;</span>
  写入数据到 Ext3 文件系统中时,Ext3 的数据块分配器每次只能分配一个 4KB 的块,写一个 100MB 文件就要调用 25,600
  次数据块分配器,而 Ext4 的多块分配器“multiblock allocator”(mballoc) 支持一次调用分配多个数据块。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">6. 延迟分配。</span><span class="Apple-converted-space">&nbsp;</span>Ext3 的数据块分配策略是尽快分配,而 Ext4 和其它现代文件操作系统的策略是尽可能地延迟分配,直到文件在 cache 中写完才开始分配数据块并写入磁盘,这样就能优化整个文件的数据块分配,与前两种特性搭配起来可以显著提升性能。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">7. 快速 fsck。</span><span class="Apple-converted-space">&nbsp;</span>以前执行 fsck 第一步就会很慢,因为它要检查所有的 inode,现在 Ext4 给每个组的 inode 表中都添加了一份未使用 inode 的列表,今后 fsck Ext4 文件系统就可以跳过它们而只去检查那些在用的 inode 了。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">8. 日志校验。</span><span class="Apple-converted-space">&nbsp;</span>日志是最常用的部分,也极易导致磁盘硬件故障,而从损坏的日志中恢复数据会导致更多的数据损坏。Ext4 的日志校验功能可以很方便地判断日志数据是否损坏,而且它将 Ext3 的两阶段日志机制合并成一个阶段,在增加安全性的同时提高了性能。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">9. “无日志”(No Journaling)模式。</span><span class="Apple-converted-space">&nbsp;</span>日志总归有一些开销,Ext4 允许关闭日志,以便某些有特殊需求的用户可以借此提升性能。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">10. 在线碎片整理。</span><span class="Apple-converted-space">&nbsp;</span>尽管延迟分配、多块分配和 extents 能有效减少文件系统碎片,但碎片还是不可避免会产生。Ext4 支持在线碎片整理,并将提供 e4defrag 工具进行个别文件或整个文件系统的碎片整理。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">11. inode 相关特性。</span><span class="Apple-converted-space">&nbsp;</span>Ext4
  支持更大的 inode,较之 Ext3 默认的 inode 大小 128 字节,Ext4 为了在 inode
  中容纳更多的扩展属性(如纳秒时间戳或 inode 版本),默认 inode 大小为 256 字节。Ext4 还支持快速扩展属性(fast
  extended attributes)和 inode 保留(inodes reservation)。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">12. 持久预分配(Persistent preallocation)。</span><span class="Apple-converted-space">&nbsp;</span>P2P
  软件为了保证下载文件有足够的空间存放,常常会预先创建一个与所下载文件大小相同的空文件,以免未来的数小时或数天之内磁盘空间不足导致下载失败。
  Ext4 在文件系统层面实现了持久预分配并提供相应的 API(libc 中的 posix_fallocate()),比应用软件自己实现更有效率。<br>
  <br>
  <span style="font-weight: bold; color: rgb(51, 51, 255);">13. 默认启用 barrier。</span><span class="Apple-converted-space">&nbsp;</span>
  盘上配有内部缓存,以便重新调整批量数据的写操作顺序,优化写入性能,因此文件系统必须在日志数据写入磁盘之后才能写 commit 记录,若
  commit 记录写入在先,而日志有可能损坏,那么就会影响数据完整性。Ext4 默认启用 barrier,只有当 barrier
  之前的数据全部写入磁盘,才能写 barrier 之后的数据。(可通过 "mount -o barrier=0" 命令禁用该特性。)</span>


相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
目录
相关文章
|
4月前
|
NoSQL MongoDB Docker
Ubuntu18 Install MongoDB
Ubuntu18 Install MongoDB
|
Ubuntu
how to install xlsx in R on ubuntu?
how to install xlsx in R on ubuntu?
60 0
|
Ubuntu Linux Windows
Install KDE Plasma and XRDP on Ubuntu Server
Install KDE Plasma and XRDP on Ubuntu Server
268 0
Install KDE Plasma and XRDP on Ubuntu Server
|
Ubuntu
【Ubuntu】apt-get install 报错 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
【Ubuntu】apt-get install 报错 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
136 0
|
NoSQL MongoDB Docker
Ubuntu18 Install MongoDB
主要介绍Install MongoDB Community Edition,WebSite,Docker Use MongoDB这三个部分·。
|
Ubuntu Apache Docker
How to Install and Deploy Kubernetes on Ubuntu 16.04
In this tutorial, we are going to setup multi-node Kubernetes Cluster on Ubuntu 16.04 server using Alibaba Cloud Elastic Compute Service (ECS).
6748 0
How to Install and Deploy Kubernetes on Ubuntu 16.04
|
关系型数据库 Java 应用服务中间件
Database Visualization using Metabase Part 1 - Install Metabase on Ubuntu 16.04
In this tutorial, we will install Metabase on an Alibaba Cloud ECS Ubuntu 16.04 server to achieve data visualization.
1902 0
Database Visualization using Metabase Part 1 - Install Metabase on Ubuntu 16.04
|
弹性计算 Ubuntu 网络安全
How to Install and Use Ansible on Ubuntu 16.04
In this tutorial, we will learn how to set up Ansible on an Alibaba Cloud ECS Ubuntu 16.04 instance.
2473 0
How to Install and Use Ansible on Ubuntu 16.04
|
Ubuntu 关系型数据库 MySQL
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
In this tutorial, we will explore how to install Docker on Alibaba Cloud and learn some important Docker commands to help you deploy and manage your container services.
3008 0
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
|
弹性计算 Ubuntu Apache
How to Install Puppet Master and Client on Ubuntu 16.04
This guide will help you through the steps of installing and configuring open source Puppet on ECS Ubuntu 16.
2370 0
How to Install Puppet Master and Client on Ubuntu 16.04