mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #3101 from geekpi/master
translated tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md
This commit is contained in:
commit
4b13e7f9ab
@ -1,74 +0,0 @@
|
||||
translating----geekpi
|
||||
|
||||
What is Logical Volume Management and How Do You Enable It in Ubuntu?
|
||||
================================================================================
|
||||
> Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes. Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for.
|
||||
|
||||
### What is LVM? ###
|
||||
|
||||
Logical Volume Manager allows for a layer of abstraction between your operating system and the disks/partitions it uses. In traditional disk management your operating system looks for what disks are available (/dev/sda, /dev/sdb, etc.) and then looks at what partitions are available on those disks (/dev/sda1, /dev/sda2, etc.).
|
||||
|
||||
With LVM, disks and partitions can be abstracted to contain multiple disks and partitions into one device. Your operating systems will never know the difference because LVM will only show the OS the volume groups (disks) and logical volumes (partitions) that you have set up.
|
||||
|
||||
Because volume groups and logical volumes aren’t physically tied to a hard drive, it makes it easy to dynamically resize and create new disks and partitions. In addition, LVM can give you features that your file system is not capable of doing. For example, Ext3 does not have support for live snapshots, but if you’re using LVM you have the ability to take a snapshot of your logical volumes without unmounting the disk.
|
||||
|
||||
### When Should You Use LVM? ###
|
||||
|
||||
The first thing your should consider before setting up LVM is what you want to accomplish with your disks and partitions. Some distributions, like Fedora, install with LVM by default.
|
||||
|
||||
If you are using Ubuntu on a laptop with only one internal hard drive and you don’t need extended features like live snapshots, then you may not need LVM. If you need easy expansion or want to combine multiple hard drives into a single pool of storage then LVM may be what you have been looking for.
|
||||
|
||||
### Setting up LVM in Ubuntu ###
|
||||
|
||||
First thing to know about using LVM is there is no easy way to convert your existing traditional partitions to logical volumes. It is possible to move to a new partition that uses LVM, but that won’t be something that we will cover in this article; instead we are going to take the approach of setting up LVM on a fresh installation of Ubuntu 10.10.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png)
|
||||
|
||||
To install Ubuntu using LVM you need to use the alternate install CD. Download it from the link below and burn a CD or [use unetbootin to create a USB drive][1].
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/download-web.png)
|
||||
|
||||
Boot your computer from the alternate install disk and select your options up until the partition disks screen and select guided – use entire disk and set up LVM.
|
||||
|
||||
*Note: This will format your entire hard drive so if you are trying to dual boot or have another installation select manual instead.*
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-1.png)
|
||||
|
||||
Select the main disk you want to use, typically your largest drive, and then go to the next step.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-2.png)
|
||||
|
||||
You will immediately need to write the changes to disk so make sure you selected the right disk and then write the changes.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-3.png)
|
||||
|
||||
Select the size you want the first logical volume to be and then continue.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-4.png)
|
||||
|
||||
Confirm your disk partitions and continue with the installation.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-5.png)
|
||||
|
||||
The final step will write the GRUB bootloader to the hard drive. It is important to note that GRUB cannot be on an LVM partition because computer BIOSes cannot directly read from a logical volume. Ubuntu will automatically create a 255 MB ext2 partition for your bootloader.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-6.png)
|
||||
|
||||
After the installation is complete, reboot the machine and boot into Ubuntu as normal. There should be no perceivable difference between using LVM or traditional disk management with this type of installation.
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/disk-manager.png)
|
||||
|
||||
To use LVM to its full potential, stay tuned for our upcoming article on managing your LVM installation.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/
|
||||
|
||||
作者:[How-To Geek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/+howtogeek?prsrc=5
|
||||
[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/
|
@ -0,0 +1,72 @@
|
||||
什么是逻辑分区管理工具,它怎么在Ubuntu启用?
|
||||
================================================================================
|
||||
> 逻辑分区管理(LVM)是每一个主流Linux发行版都含有的磁盘管理选项。无论你是否需要设置存储池或者只需要动态创建分区,LVM就是你正在寻找的。
|
||||
|
||||
### 什么是 LVM? ###
|
||||
|
||||
逻辑分区管理是一个存在于磁盘/分区和操作系统之间的一个抽象层。在传统的磁盘管理中,你的操作系统寻找有哪些磁盘可用(/dev/sda、/dev/sdb等等)接着这些磁盘有哪些可用的分区(如/dev/sda1、/dev/sda2等等)。
|
||||
|
||||
在LVM下,磁盘和分区可以抽象成一个设备中含有多个磁盘和分区。你的操作系统将不会知道这些区别,因为LVM只会给操作系统展示你设置的卷组(磁盘)和逻辑卷(分区)
|
||||
|
||||
,因此可以很容易地动态调整和创建新的磁盘和分区。除此之外,LVM带来你的文件系统不具备的功能。比如,ext3不支持实时快照,但是如果你正在使用LVM你可以不卸载磁盘的情况下做一个逻辑卷的快照。
|
||||
|
||||
### 你什么时候该使用LVM? ###
|
||||
|
||||
在使用LVM之前首先得考虑的一件事是你要用你的磁盘和分区完成什么。一些发行版如Fedora已经默认安装了LVM。
|
||||
|
||||
如果你使用的是一台只有一块磁盘的Ubuntu笔记本电脑,并且你不需要像实时快照这样的扩展功能,那么你或许不需要LVM。如果I想要轻松地扩展或者想要将多块磁盘组成一个存储池,那么LVM或许正式你郑寻找的。
|
||||
|
||||
### 在Ubuntu中设置LVM ###
|
||||
|
||||
使用LVM首先要了解的一件事是没有简单的方法将已经存在传统的分区转换成逻辑分区。可以将它移到一个使用LVM的新分区下,但是这并不会在本篇中提到;反之我们将全新安装一台Ubuntu 10.10来设置LVM
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png)
|
||||
|
||||
要使用LVM安装Ubuntu你需要使用另外的安装CD。从下面的链接中下载并烧录到CD中或者[使用unetbootin创建一个USB盘][1]。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/download-web.png)
|
||||
|
||||
从安装盘启动你的电脑,并在磁盘选择界面选择整个磁盘并设置LVM。
|
||||
|
||||
*注意:这会格式化你的整个磁盘,因此如果正在尝试双启动或者其他的安装选择,选择手动。*
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-1.png)
|
||||
|
||||
选择你想用的主磁盘,最典型的是使用你最大的磁盘,接着进入下一步。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-2.png)
|
||||
|
||||
你马上会将改变写入磁盘所以确保此时你选择的是正确的磁盘接着才写入设置。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-3.png)
|
||||
|
||||
选择第一个逻辑卷的大小并继续。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-4.png)
|
||||
|
||||
确认你的磁盘分区并继续安装。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-5.png)
|
||||
|
||||
最后一步将GRUB的bootloader写到磁盘中。重点注意的是GRUB不能作为一个LVM分区因为计算机BIOS不能直接从逻辑卷中读取数据。Ubuntu将自动创建一个255MB的ext2分区用于bootloder。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-6.png)
|
||||
|
||||
安装完成之后。重启电脑并如往常一样进入Ubuntu。使用这种方式安装之后应该就感受不到LVM和传统磁盘管理之间的区别了。
|
||||
|
||||
![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/disk-manager.png)
|
||||
|
||||
要使用LVM的全部功能,静待我们的下篇关于管理LVM的文章。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/
|
||||
|
||||
作者:[How-To Geek][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/+howtogeek?prsrc=5
|
||||
[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/
|
Loading…
Reference in New Issue
Block a user