8.15. Creating and Deleting a Logical Volume

As long as a volume group has some free space, you can add a logical volume to it at any time. A logical volume can be any size, but the size will always be rounded up to a multiple of the allocation block size used by the volume group (4 MB by default). You can see the current block size, blocks allocated, and total blocks by clicking on a volume group's icon on the main page of the module.

The steps for adding a new logical volume are as follows:

1.
On the list of volume groups, click on the Create a new logical volume link next to the volume group to which you want to add it.

2.
In the Volume name field, enter a name for your new logical volume. This should be short and contain no spaces, like data_lv.

3.
For the Volume size field, enter the number of kilobytes to allocate to this volume. Whatever you enter will be rounded up to the nearest Allocation block size shown below.

By default, this field will be set to the total amount of free space in the volume group.

4.
If the Allocation method option is set to Contiguous, all space reserved for this logical volume will be in one large block on disk. This can speed up access to the data but is inflexible if you are adding and removing logical volumes causing the volume group to become fragmented. Therefore, it is usually best to leave the option set to Non-contiguous.

5.
The Volume striping option controls how data for the logical volume is laid out on disk. The Disabled option is similar to linear mode in RAID, while the Stripe across option is similar to striped mode. See Section 8.9 “Introduction to RAID” for a more detailed explanation.

6.
When all the fields are set to your satisfaction, click the Create button. As long as all fields have been filled in properly and there enough free space in the volume group, the browser will return to the main page of the module and a new icon for your logical volume should be visible.

7.
Assuming you want to mount the new logical volume somewhere, you will first need to create a filesystem on it. To do this, click on its icon on the main page of the module that will take you to the logical volume editing page.

8.
Select the type of filesystem you want to create from the menu at the bottom of the page, and click the Create filesystem of type button.

9.
Select any options for the new filesystem, as explained in Section 8.4 “Creating a New Filesystem”. When done, click the Create button. A page showing the progress of the new filesystem's creation will be displayed, which can take some time for large volumes.

10.
Assuming that the formatting is successful, you can now use the Disk and Network Filesystems module to mount the new filesystem.

Existing logical volumes can be deleted from their volume group to free up space or reduce the volume group size. Before you can delete a logical volume, it must have been unmounted in the Disk and Network Filesystems module. When it is deleted, any data that it contained will be lost forever.

To remove a logical volume, follow these steps:

1.
Click on its icon on the main page of the module, which will take you to the logical volume editing form.

2.
Click the Delete button. This will bring up a page asking if you are really sure about deleting it.

3.
Click Delete Now to confirm. Once it has been removed from the volume group, your browser will return to the main page of the module. The space freed up can be reused for another logical volume immediately.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.6.10