mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
translated
This commit is contained in:
parent
9e3650a274
commit
26bcad477c
@ -1,86 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (A guided tour of Linux file system types)
|
||||
[#]: via: (https://www.networkworld.com/article/3432990/a-guided-tour-of-linux-file-system-types.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
A guided tour of Linux file system types
|
||||
======
|
||||
Linux file systems have evolved over the years, and here's a look at file system types
|
||||
![Andreas Lehner / Flickr \(CC BY 2.0\)][1]
|
||||
|
||||
While it may not be obvious to the casual user, Linux file systems have evolved significantly over the last decade or so to make them more resistant to corruption and performance problems.
|
||||
|
||||
Most Linux systems today use a file system type called **ext4**. The “ext” part stands for “extended” and the 4 indicates that this is the 4th generation of this file system type. Features added over time include the ability to provide increasingly larger file systems (currently as large as 1,000,000 TiB) and much larger files (up to 16 TiB), more resistance to system crashes and less fragmentation (scattering single files as chunks in multiple locations) which improves performance.
|
||||
|
||||
The **ext4** file system type also came with other improvements to performance, scalability and capacity. Metadata and journal checksums were implemented for reliability. Timestamps now track changes down to nanoseconds for better file time-stamping (e.g., file creation and last updates). And, with two additional bits in the timestamp field, the year 2038 problem (when the digitally stored date/time fields will roll over from maximum to zero) has been put off for more than 400 years (to 2446).
|
||||
|
||||
### File system types
|
||||
|
||||
To determine the type of file system on a Linux system, use the **df** command. The **T** option in the command shown below provides the file system type. The **h** makes the disk sizes “human-readable”; in other words, adjusting the reported units (such as M and G) in a way that makes the most sense to the people reading them.
|
||||
|
||||
```
|
||||
$ df -hT | head -10
|
||||
Filesystem Type Size Used Avail Use% Mounted on
|
||||
udev devtmpfs 2.9G 0 2.9G 0% /dev
|
||||
tmpfs tmpfs 596M 1.5M 595M 1% /run
|
||||
/dev/sda1 ext4 110G 50G 55G 48% /
|
||||
/dev/sdb2 ext4 457G 642M 434G 1% /apps
|
||||
tmpfs tmpfs 3.0G 0 3.0G 0% /dev/shm
|
||||
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
|
||||
tmpfs tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup
|
||||
/dev/loop0 squashfs 89M 89M 0 100% /snap/core/7270
|
||||
/dev/loop2 squashfs 142M 142M 0 100% /snap/hexchat/42
|
||||
```
|
||||
|
||||
Notice that the **/** (root) and **/apps** file systems are both **ext4** file systems while **/dev** is a **devtmpfs** file system – one with automated device nodes populated by the kernel. Some of the other file systems shown are **tmpfs** – temporary file systems that reside in memory and/or swap partitions and **squashfs** – file systems that are read-only compressed file systems and are used for snap packages.
|
||||
|
||||
There's also proc file systems that stores information on running processes.
|
||||
|
||||
```
|
||||
$ df -T /proc
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
proc proc 0 0 0 - /proc
|
||||
```
|
||||
|
||||
There are a number of other file system types that you might encounter as you're moving around the overall file system. When you've moved into a directory, for example, and want to ask about the related file system, you can run a command like this:
|
||||
|
||||
```
|
||||
$ cd /dev/mqueue; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
mqueue mqueue 0 0 0 - /dev/mqueue
|
||||
$ cd /sys; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
sysfs sysfs 0 0 0 - /sys
|
||||
$ cd /sys/kernel/security; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
securityfs securityfs 0 0 0 - /sys/kernel/security
|
||||
```
|
||||
|
||||
As with other Linux commands, the . in these commands refers to the current location in the overall file system.
|
||||
|
||||
These and other unique file-system types provide some special functions. For example, securityfs provides file system support for security modules.
|
||||
|
||||
Linux file systems need to be resistant to corruption, have the ability to survive system crashes and provide fast and reliable performance. The improvements provided by the generations of **ext** file systems and the new generation on purpose-specific file system types have made Linux systems easier to manage and more reliable.
|
||||
|
||||
Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3432990/a-guided-tour-of-linux-file-system-types.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://images.idgesg.net/images/article/2019/08/guided-tour-on-the-flaker_people-in-horse-drawn-carriage_germany-by-andreas-lehner-flickr-100808681-large.jpg
|
||||
[2]: https://www.facebook.com/NetworkWorld/
|
||||
[3]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,86 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (A guided tour of Linux file system types)
|
||||
[#]: via: (https://www.networkworld.com/article/3432990/a-guided-tour-of-linux-file-system-types.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
Linux 文件系统类型的导览
|
||||
======
|
||||
Linux 文件系统多年来在不断发展,来看一下文件系统类型。
|
||||
![Andreas Lehner / Flickr \(CC BY 2.0\)][1]
|
||||
|
||||
虽然对于普通用户来说可能并不明显,但在过去十年左右的时间里,Linux 文件系统已经发生了显著的变化,这使它们能够更好抵抗损坏和性能问题。。
|
||||
|
||||
如今大多数 Linux 系统使用名为 **ext4** 的文件系统。 “ext” 代表“扩展”,4 表示这是此文件系统的第 4 代。随着时间的推移,已经添加的功能包括能够提供越来越大的文件系统(目前大到 1,000,000 TiB)和更大的文件(高达 16 TiB),更能抵抗系统崩溃和更少碎片(将多个文件分散为多个位置的块),这些提高了性能。
|
||||
|
||||
**ext4** 文件系统还带来了对性能、可伸缩性和容量的其他改进。为实现可靠性,实现了元数据和日志校验和。时间戳现在跟踪变化到纳秒,以便更好地进行文件时间戳(例如,文件创建和最后更新)。并且,在时间戳字段中有两个附加位,2038 年的问题(存储日期/时间的字段将从最大值翻到零)已被推迟超过 400 年(到 2446)。
|
||||
|
||||
### 文件系统类型
|
||||
|
||||
要确定 Linux 系统上文件系统的类型,请使用 **df** 命令。下面显示的命令中的 **T** 选项显示文件系统类型。 **h** 使磁盘大小显示“人类可读”。换句话说,调整报告的单位(如 M 和 G),使人们更好地理解。
|
||||
|
||||
```
|
||||
$ df -hT | head -10
|
||||
Filesystem Type Size Used Avail Use% Mounted on
|
||||
udev devtmpfs 2.9G 0 2.9G 0% /dev
|
||||
tmpfs tmpfs 596M 1.5M 595M 1% /run
|
||||
/dev/sda1 ext4 110G 50G 55G 48% /
|
||||
/dev/sdb2 ext4 457G 642M 434G 1% /apps
|
||||
tmpfs tmpfs 3.0G 0 3.0G 0% /dev/shm
|
||||
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
|
||||
tmpfs tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup
|
||||
/dev/loop0 squashfs 89M 89M 0 100% /snap/core/7270
|
||||
/dev/loop2 squashfs 142M 142M 0 100% /snap/hexchat/42
|
||||
```
|
||||
|
||||
请注意,**/**(根)和 **/apps** 的文件系统都是 **ext4**,而 **/dev** 是 **devtmpfs** 文件系统 - 一个由内核填充的自动化设备节点。其他的文件系统显示为 **tmpfs** - 驻留在内存和/或交换分区中的临时文件系统和 **squashfs** - 只读压缩文件系统的文件系统,用于快照包。
|
||||
|
||||
还有 proc 文件系统,用于存储正在运行的进程的信息。
|
||||
|
||||
```
|
||||
$ df -T /proc
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
proc proc 0 0 0 - /proc
|
||||
```
|
||||
|
||||
当你在整个文件系统中移动时,可能会遇到许多其他文件系统类型。例如,当你移动到目录中并想了解它的文件系统时,可以运行以下命令:
|
||||
|
||||
```
|
||||
$ cd /dev/mqueue; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
mqueue mqueue 0 0 0 - /dev/mqueue
|
||||
$ cd /sys; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
sysfs sysfs 0 0 0 - /sys
|
||||
$ cd /sys/kernel/security; df -T .
|
||||
Filesystem Type 1K-blocks Used Available Use% Mounted on
|
||||
securityfs securityfs 0 0 0 - /sys/kernel/security
|
||||
```
|
||||
|
||||
与其他 Linux 命令一样,这里的 . 代表整个文件系统的当前位置。
|
||||
|
||||
这些和其他独特的文件系统提供了一些特殊功能。例如,securityfs 提供支持安全模块的文件系统
|
||||
|
||||
Linux 文件系统需要能够抵抗损坏,能够承受系统崩溃并提供快速可靠的性能。由几代 **ext** 文件系统和新一代专用文件系统提供的改进使 Linux 系统更易于管理和更可靠。
|
||||
|
||||
在 [Facebook][2] 和 [LinkedIn][3] 上加入 Network World 社区,评论最热主题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3432990/a-guided-tour-of-linux-file-system-types.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://images.idgesg.net/images/article/2019/08/guided-tour-on-the-flaker_people-in-horse-drawn-carriage_germany-by-andreas-lehner-flickr-100808681-large.jpg
|
||||
[2]: https://www.facebook.com/NetworkWorld/
|
||||
[3]: https://www.linkedin.com/company/network-world
|
Loading…
Reference in New Issue
Block a user