diff --git a/translated/tech/20200914 Incremental backups with Btrfs snapshots.md b/published/20200914 Incremental backups with Btrfs snapshots.md similarity index 59% rename from translated/tech/20200914 Incremental backups with Btrfs snapshots.md rename to published/20200914 Incremental backups with Btrfs snapshots.md index f82ce56526..2feb57cf58 100644 --- a/translated/tech/20200914 Incremental backups with Btrfs snapshots.md +++ b/published/20200914 Incremental backups with Btrfs snapshots.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12653-1.html) [#]: subject: (Incremental backups with Btrfs snapshots) [#]: via: (https://fedoramagazine.org/btrfs-snapshots-backup-incremental/) [#]: author: (Alessio https://fedoramagazine.org/author/alciregi/) @@ -10,53 +10,63 @@ 使用 Btrfs 快照进行增量备份 ====== -![][1] +![](https://img.linux.net.cn/data/attachment/album/202009/26/112524cppfppjpvplyjzyx.jpg) -快照是 Btrfs 的一个有趣的功能。快照是一个子卷的副本。生成快照是立即的。然而,生成快照与执行 _rsync_ 或 _cp_ 不同,快照并不是一创建就会占用空间。 +快照snapshot是 Btrfs 的一个有趣的功能。快照是一个子卷的副本。生成快照是立即的。然而,生成快照与执行 `rsync` 或 `cp` 不同,快照并不是一创建就会占用空间。 -编者注:来自 [BTRFS Wiki][2 ]:快照是一个简单的子卷,它使用 Btrfs 的 COW 功能与其他子卷共享其数据(和元数据)。 +> 编者注:来自 [BTRFS Wiki][2]:快照简单的来说就是一个子卷,它使用 Btrfs 的 COW 功能与其他子卷共享其数据(和元数据)。 -如果它是可写的,占用的空间将随着原始子卷或快照本身的数据变化而增加。子卷中已添加/修改的文件和已删除的文件仍然存在于快照中。这是一种方便的备份方式。 +占用的空间将随着原始子卷或快照本身(如果它是可写的)的数据变化而增加。子卷中已添加/修改的文件和已删除的文件仍然存在于快照中。这是一种方便的备份方式。 ### 使用快照进行备份 -快照保存在子卷所在的同一磁盘上。你可以像浏览普通目录一样浏览它,并按照生成快照时的状态恢复文件的副本。顺便说一下,在被快照子卷的同一磁盘上做快照并不是一个理想的备份策略:如果硬盘坏了,快照也会丢失。快照的一个有趣的功能是可以将快照发送到另一个位置。快照可以被发送到外部硬盘或通过 SSH 发送到远程系统(目标文件系统也需要格式化为 Btrfs)。要实现这个,需要使用命令 _btrfs send_ 和 _btrfs receive_。 +快照驻留在子卷所在的同一磁盘上。你可以像浏览普通目录一样浏览它,并按照生成快照时的状态恢复文件的副本。顺便说一下,在快照子卷的同一磁盘上生成快照并不是一个理想的备份策略:如果硬盘坏了,快照也会丢失。快照的一个有趣的功能是可以将快照发送到另一个位置。快照可以被发送到外部硬盘或通过 SSH 发送到远程系统(目标文件系统也需要格式化为 Btrfs)。要实现这个,需要使用命令 `btrfs send` 和 `btrfs receive`。 ### 生成快照 -要使用 _send_ 和 _receive_ 命令,重要的是要将快照创建为只读,而快照默认是可写的。 +要使用 `btrfs send` 和 `btrfs receive` 命令,重要的是要将快照创建为只读,而快照默认是可写的。 -下面的命令将对 _/home_ 子卷进行快照。请注意 _-r_ 标志为只读。 +下面的命令将对 `/home` 子卷进行快照。请注意 `-r` 标志代表只读。 +``` sudo btrfs subvolume snapshot -r /home /.snapshots/home-day1 +``` -快照的名称可以是当前日期,而不是 day1,比如 _home-$(date +%Y%m%d)_。快照看起来像普通的子目录。你可以把它们放在任何你喜欢的地方。目录 _/.snapshots_ 可能是一个不错的选择,以保持它们的整洁和避免混淆。 +快照的名称可以是当前日期,而不是 `day1`,比如 `home-$(date +%Y%m%d)`。快照看起来像普通的子目录。你可以把它们放在任何你喜欢的地方。目录 `/.snapshots` 可能是一个不错的选择,以保持它们的整洁和避免混淆。 -编者注:快照不会对自己进行递归快照。如果你创建了一个子卷的快照,子卷所包含的每一个子卷或快照都会被映射到快照里面的一个同名的空目录。 +> 编者注:快照不会对自己进行递归快照。如果你创建了一个子卷的快照,子卷所包含的每一个子卷或快照都会被映射到快照里面的一个同名的空目录。 ### 使用 btrfs send 进行备份 -在本例中,U 盘中的目标 Btrfs 卷被挂载为 _/run/media/user/mydisk/bk_。发送快照到目标卷的命令是: +在本例中,U 盘中的目标 Btrfs 卷被挂载为 `/run/media/user/mydisk/bk`。发送快照到目标卷的命令是: +``` sudo btrfs send /.snapshots/home-day1 | sudo btrfs receive /run/media/user/mydisk/bk +``` -这被称为初始启动,它相当于一个完整的备份。这个任务需要一些时间,取决于 _/home_ 目录的大小。显然,后续的增量发送只需要更短的时间。 +这被称为初始启动,它相当于一个完整的备份。这个任务需要一些时间,取决于 `/home` 目录的大小。显然,后续的增量发送只需要更短的时间。 ### 增量备份 快照的另一个有用的功能是能够以增量的方式执行发送任务。让我们再来生成一个快照。 +``` sudo btrfs subvolume snapshot -r /home /.snapshots/home-day2 +``` -为了执行增量发送任务,需要指定上一个快照作为基础,并且这个快照必须存在于源文件和目标文件中。请注意 _-p_ 选项。 +为了执行增量发送任务,需要指定上一个快照作为基础,并且这个快照必须存在于源文件和目标文件中。请注意 `-p` 选项。 +``` sudo btrfs send -p /.snapshot/home-day1 /.snapshot/home-day2 | sudo btrfs receive /run/media/user/mydisk/bk +``` -再来一次(之后一天): +再来一次(一天之后): +``` sudo btrfs subvolume snapshot -r /home /.snapshots/home-day3 sudo btrfs send -p /.snapshot/home-day2 /.snapshot/home-day3 | sudo btrfs receive /run/media/user/mydisk/bk +``` ### 清理 @@ -64,15 +74,14 @@ sudo btrfs send -p /.snapshot/home-day2 /.snapshot/home-day3 | sudo btrfs receiv 请记住,为了执行增量发送,你至少需要最后一个快照。这个快照必须存在于源文件和目标文件中。 +``` sudo btrfs subvolume delete /.snapshot/home-day1 - sudo btrfs subvolume delete /.snapshot/home-day2 - sudo btrfs subvolume delete /run/media/user/mydisk/bk/home-day1 - sudo btrfs subvolume delete /run/media/user/mydisk/bk/home-day2 +``` -注意:第 3 天的快照被保存在源文件和目标文件中。这样,明天(第 4 天),你就可以执行新的增量 _btrfs send_。 +注意:第 3 天的快照被保存在源文件和目标文件中。这样,明天(第 4 天),你就可以执行新的增量 `btrfs send`。 最后的建议是,如果 U 盘的空间很大,可以考虑在目标盘中保留多个快照,而在源盘中只保留最后一个快照。 @@ -83,7 +92,7 @@ via: https://fedoramagazine.org/btrfs-snapshots-backup-incremental/ 作者:[Alessio][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20200921 Teach Python with the Mu editor.md b/published/20200921 Teach Python with the Mu editor.md similarity index 67% rename from translated/tech/20200921 Teach Python with the Mu editor.md rename to published/20200921 Teach Python with the Mu editor.md index e3f76169e6..ba38d69784 100644 --- a/translated/tech/20200921 Teach Python with the Mu editor.md +++ b/published/20200921 Teach Python with the Mu editor.md @@ -1,20 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12654-1.html) [#]: subject: (Teach Python with the Mu editor) [#]: via: (https://opensource.com/article/20/9/teach-python-mu) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) 使用 Mu 编辑器教授 Python ====== -Mu 让你轻松学会如何编写 Python 代码。 -![Hands on a keyboard with a Python book ][1] -在学校里,教孩子们编程是非常流行的。很多年前,在 Apple II 和 [Logo][2] 编程的年代,我学会了乌龟图案。我很喜欢学习如何对虚拟乌龟进行编程,后来也帮助学生进行编程。 +> Mu 让你轻松学会如何编写 Python 代码。 -大约五年前,我了解了 [Python 的 turtle 模块][3],这是我 Python 之旅的转折点。很快,我开始使用 turtle 模块来教学生 Python 编程基础,包括使用它来创建有趣的图形。 +![](https://img.linux.net.cn/data/attachment/album/202009/26/115018dkf3lvfyekifliec.jpg) + +在学校里,教孩子们编程是非常流行的。很多年前,在 Apple II 和 [Logo][2] 编程的年代,我学会了创建乌龟turtle绘图。我很喜欢学习如何对虚拟乌龟进行编程,后来也帮助学生进行编程。 + +大约五年前,我了解了 [Python 的 turtle 模块][3],这是我 Python 之旅的转折点。很快,我开始使用 `turtle` 模块来教学生 Python 编程基础,包括使用它来创建有趣的图形。 ### 开始使用 Python 的 turtle 模块 @@ -22,11 +24,11 @@ Mu 让你轻松学会如何编写 Python 代码。 如果你使用的是 Windows 电脑,则需要先安装 Python,到 Python 网站上[下载][4]最新的稳定版。 -接下来,用 `import turtle ` 或 `import turtle as t` 将 turtle 模块导入 Python 中。然后你就可以开始享受创建乌龟图案的乐趣了。 +接下来,用 `import turtle ` 或 `import turtle as t` 将 `turtle` 模块导入 Python 中。然后你就可以开始享受创建乌龟绘图的乐趣了。 ### 认识一下 Mu -在我的 Python 冒险的早期,我使用了 [IDLE][5],它是 Python 的集成开发环境。它比在 Python shell 中输入命令要容易得多,而且我可以编写和保存程序供以后使用。我参加了一些在线课程,阅读了许多关于 Python 编程的优秀书籍。我教老师和学生如何使用 IDLE 创建乌龟图案。 +在我的 Python 冒险的早期,我使用了 [IDLE][5],它是 Python 的集成开发环境。它比在 Python shell 中输入命令要容易得多,而且我可以编写和保存程序供以后使用。我参加了一些在线课程,阅读了许多关于 Python 编程的优秀书籍。我教老师和学生如何使用 IDLE 创建乌龟绘图。 IDLE 是一个很大的改进,但在克利夫兰的 PyConUS 2019 上,我看到了 [Nicholas Tollervey][6]的演讲,这改变了我学习和教授 Python 的方式。Nick 是一位教育家,他创建了 [Mu][7],一个专门为年轻程序员(甚至像我这样的老程序员)设计的 Python 编辑器。Mu 可以安装在 Linux、macOS 和 Windows 上。它很容易使用,并且附带了优秀的[文档][8]和[教程][9]。 @@ -34,99 +36,73 @@ IDLE 是一个很大的改进,但在克利夫兰的 PyConUS 2019 上,我看 在 Ubuntu 或 Debian 上: - ``` -`$ sudo apt install mu-editor` +$ sudo apt install mu-editor ``` 在 Fedora 或类似的地方: - ``` -`$ sudo dnf install mu` +$ sudo dnf install mu ``` 或者,你可以使用 Python 来进行安装。首先,确保你已经安装了 Python 3: - ``` -`$ python --version` +$ python --version ``` 如果失败了,就试试: - ``` -`$ python3 --version` +$ python3 --version ``` 假设你有 Python 3 或更高版本,使用 Python 包管理器 `pip` 安装 Mu。 - ``` -`$ python -m pip install mu-editor --user` +$ python -m pip install mu-editor --user ``` 然后你可以从命令行运行 Mu,或者创建一个快捷方式: - ``` -`$ python -m pip install shortcut mu-editor --user` +$ python -m pip install shortcut mu-editor --user ``` -Mu 默认安装在[树莓派][10]上,这是一个很大的优点。在过去的几年里,我已经向学生介绍了树莓派和使用 Mu 编辑器的 Python 编程。 +[树莓派][10]上默认安装了 Mu,这是一个很大的优点。在过去的几年里,我已经向学生介绍了使用树莓派和 Mu 编辑器的 Python 编程。 ### 如何用 Mu 教授 Python Mu 是向学生展示 Python 入门的好方法。下面是我如何教学生开始使用它。 - 1. 打开Mu编辑器。 +1. 打开 Mu 编辑器。 -![Mu editor][11] - -(Don Watkins, [CC BY-SA 4.0][12]) - - 2. 输入 `import turtle` 导入 Turtle 模块,就可以让乌龟动起来了。我的第一课是用 Python 代码画一个简单的正方形。 - -![Mu editor][13] - -(Don Watkins, [CC BY-SA 4.0][12]) - - 3. 保存这个程序,确保文件名以 .py 结尾。 - -![Saving program in Mu][14] - -(Don Watkins, [CC BY-SA 4.0][12]) - - 4. 运行程序。哪怕是运行这样一个简单的程序都会让人兴奋,看到你写的程序的图形输出是很有趣的。 - -![Running Python program in Mu][15] - -(Don Watkins, [CC BY-SA 4.0][12]) + ![Mu editor][11] +2. 输入 `import turtle` 导入 `turtle` 模块,就可以让乌龟动起来了。我的第一课是用 Python 代码画一个简单的正方形。 + ![Mu editor][13] +3. 保存这个程序,确保文件名以 .py 结尾。 + ![Saving program in Mu][14] +4. 运行程序。哪怕是运行这样一个简单的程序都会让人兴奋,看到你写的程序的图形输出是很有趣的。 + ![Running Python program in Mu][15] ### 超越基础知识 -在上完这节简单的课后,我讲解了有一些方法可以简化和扩展学生所学的基础知识。一是创建一个更简单的 turtle 对象,`import turtle as t`。然后我介绍了一个 `for` 循环,作为用 turtle 画一个正方形的另一种方法。 +在上完这节简单的课后,我讲解了有一些方法可以简化和扩展学生所学的基础知识。一是创建一个更简单的 `turtle` 对象,`import turtle as t`。然后我介绍了一个 `for` 循环,用另外一种 `turtle` 方法画一个正方形。 ![for loops in Python with Mu][16] -(Don Watkins, [CC BY-SA 4.0][12]) - 接下来,我将展示如何创建一个 `my_square` 函数,作为另一种绘制正方形的方法。 ![my_square function][17] -(Don Watkins, [CC BY-SA 4.0][12]) - -后来,我通过介绍其他 turtle 模块方法,包括 `penup`、`pendown` 和 `pencolor`来扩展这个概念。很快,我的学生们就开始开发更复杂的程序,并对其进行迭代。 +后来,我通过介绍其他 `turtle` 模块方法,包括 `penup`、`pendown` 和 `pencolor` 来扩展这个概念。很快,我的学生们就开始开发更复杂的程序,并对其进行迭代。 ![Mu editor][18] -(Don Watkins, [CC BY-SA 4.0][12]) - 我一直渴望学习,我很想知道你在学校或家里是如何教授 Python 的。请在评论中分享你的经验。 -------------------------------------------------------------------------------- @@ -136,7 +112,7 @@ via: https://opensource.com/article/20/9/teach-python-mu 作者:[Don Watkins][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md b/published/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md similarity index 98% rename from translated/tech/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md rename to published/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md index b783d4449c..0e0aabb207 100644 --- a/translated/tech/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md +++ b/published/20200923 Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12655-1.html) [#]: subject: (Meet eDEX-UI, A Sci-Fi Inspired Linux Terminal Emulator With Some Cool Features) [#]: via: (https://itsfoss.com/edex-ui-sci-fi-terminal/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) @@ -22,8 +22,6 @@ eDEX-UI:一款科幻风格的酷炫 Linux 终端仿真器 ### eDEX-UI: 一个很酷的终端仿真器 -![][4] - [eDEX-UI][5] 是一款开源的跨平台终端仿真器,它为你呈现了一个科幻风格的外观和一些有用的功能。 它最初的灵感来自于 [DEX UI][6] 项目,但该项目已经不再维护。 diff --git a/sources/tech/20200921 Installing and running Vagrant using qemu-kvm.md b/sources/tech/20200921 Installing and running Vagrant using qemu-kvm.md index 54e74b428c..307c85c599 100644 --- a/sources/tech/20200921 Installing and running Vagrant using qemu-kvm.md +++ b/sources/tech/20200921 Installing and running Vagrant using qemu-kvm.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md b/translated/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md similarity index 53% rename from sources/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md rename to translated/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md index 210e5196d6..6c73ec74d2 100644 --- a/sources/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md +++ b/translated/tech/20200918 How to Extend-Increase LVM-s (Logical Volume Resize) in Linux.md @@ -7,53 +7,54 @@ [#]: via: (https://www.2daygeek.com/extend-increase-resize-lvm-logical-volume-in-linux/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -How to Extend/Increase LVM’s (Logical Volume Resize) in Linux +如何在 Linux 中扩展/增加 LVM 大小(逻辑卷调整)? ====== -Expanding the logical volume is extremely easy, it takes very few steps and can be done online without unmounting a certain logical volume. +扩展逻辑卷非常简单,只需要很少的步骤,而且不需要卸载某个逻辑卷就可以在线完成。 -The main purpose of LVM is flexible disk management, which allows you to easily resize, extend and reduce the logical volume size when you need it. +LVM 的主要目的是灵活的磁盘管理,当你需要的时候,可以很方便地调整、扩展和缩小逻辑卷的大小。 -If you are new to Logical Volume Management (LVM), I suggest you start with our previous article. +如果你是逻辑卷管理 (LVM) 新手,我建议你从我们之前的文章开始学习。 - * **Part-1: [How to Create/Configure LVM (Logical Volume Management) in Linux][1]** + * **第一部分:[如何在 Linux 中创建/配 置LVM(逻辑卷管理)][1]** ![][2] -Expanding the logical volume involves the below steps. +扩展逻辑卷涉及到以下步骤: - * Check if you have sufficient unallocated disk space in the volume group where the LV was residing. - * If yes, you can use that space to extend the logical volume. - * If not, add new disks or LUNs to your system. - * Convert a physical disk as a physical volume (PV). - * Extend the Volume Group - * Increase the logical Volume - * Grow the filesystem - * Check the extended filesystem size + + * 检查 LV 所在的卷组中是否有足够的未分配磁盘空间 + * 如果有,你可以使用这些空间来扩展逻辑卷 + * 如果没有,请向系统中添加新的磁盘或 LUN + * 将物理磁盘转换为物理卷(PV) + * 扩展卷组 + * 增加逻辑卷大小 + * 扩大文件系统 + * 检查扩展的文件系统大小 -### How to Create LVM Physical Volumes +### 如何创建 LVM 物理卷? -Create LVM physical volumes with the pvcreate command. +使用 pvcreate 命令创建 LVM 物理卷。 -Once the disk is detected in the OS, use the pvcreate command to initialize the LVM PV (Physical Volumes). +当在操作系统中检测到磁盘,使用 pvcreate 命令初始化 LVM PV(物理卷)。 ``` # pvcreate /dev/sdc Physical volume "/dev/sdc" successfully created ``` -**Make a note:** +**请注意:** - * The above command erases any data on the given disk /dev/sdc. - * Physical disk can be added directly into the LVM PV instead of the disk partition. + * 上面的命令将删除磁盘 /dev/sdc 上的所有数据。 + * 物理磁盘可以直接添加到 LVM PV 中,而不是磁盘分区。 -Use the pvdisplay command to display the PVs you have created. +使用 pvdisplay 命令来显示你所创建的 PV。 ``` # pvdisplay /dev/sdc @@ -71,16 +72,16 @@ Allocated PE 0 PV UUID 69d9dd18-36be-4631-9ebb-78f05fe3217f ``` -### How to Extend the Volume Group +### 如何扩展卷组 -Use the following command to add a new physical volume to the existing volume group. +使用以下命令在现有的卷组中添加一个新的物理卷。 ``` # vgextend vg01 /dev/sdc Volume group "vg01" successfully extended ``` -Use the vgdisplay command to display the PVs you have created. +使用 vgdisplay 命令来显示你所创建的 PV。 ``` # vgdisplay vg01 @@ -106,17 +107,17 @@ Free PE / Size 2560 / 9.99 GiB VG UUID d17e3c31-e2c9-4f11-809c-94a549bc43b7 ``` -### How to Extend the Logical Volume +### 如何扩展逻辑卷? -Use the following command to increase the existing logical volume. +使用以下命令增加现有逻辑卷大小。 -**Common syntax for logical volume extension (lvextend).** +**逻辑卷扩展 (lvextend) 的常用语法。** ``` -lvextend [Additional space to be added] [Existing Logical Volume Name] +lvextend [要增加的额外空间] [现有逻辑卷名称] ``` -Use the below command to increase the existing logical volume additionally to 10GB. +使用下面的命令将现有的逻辑卷增加 10GB。 ``` # lvextend -L +10G /dev/mapper/vg01-lv002 @@ -125,33 +126,33 @@ Size of logical volume vg01/lv002 changed from 5.00 GiB (1280 extents) to 15.00 Logical volume var successfully resized ``` -To extend logical volume using PE size’s. +使用 PE 大小来扩展逻辑卷。 ``` # lvextend -l +2560 /dev/mapper/vg01-lv002 ``` -To extend the logical volume using percentage (%), use the following command. +要使用百分比 (%) 扩展逻辑卷,请使用以下命令。 ``` # lvextend -l +40%FREE /dev/mapper/vg01-lv002 ``` -Now, the logical volume is extended and you need to resize the file system to extend the space inside the logical volume. +现在,逻辑卷已经扩展,你需要调整文件系统的大小以扩展逻辑卷内的空间。 -For an ext3 and ext4 based file system, run the following command. +对于基于 ext3 和 ext4 的文件系统,运行以下命令。 ``` # resize2fs /dev/mapper/vg01-lv002 ``` -For the xfs file system, use the following command. +对于xfs文件系统,使用以下命令。 ``` # xfs_growfs /dev/mapper/vg01-lv002 ``` -Use the **[df command][3]** to view the file system size. +使用 **[df 命令][3]**查看文件系统大小。 ``` # df -h /lvmtest1 @@ -165,7 +166,7 @@ via: https://www.2daygeek.com/extend-increase-resize-lvm-logical-volume-in-linux 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出