Logical volumes
Create and manage logical volumes from storage devices, and format them with file systems or prepare them with swap spaces.
Task 1:
One Logical Volume named lv1
is created under vg0
. The initial size of the logical volume is 100mb. Now you required to size 500mb. Make successfully the size of that logical volume 500mb without losing any data. As well as size should be increased online.
Solution:
Task 2:
Create a logical volme as required:
Name the logical volume as database, belongs to datastore of the volume group size is 50PE.
Expansion size of each volume group datastore is 16MB.
Use ext3 to format this new logical volume, this logical volume should automatically mount to /mnt/database
Solution:
Task 3:
One logical volume named /dev/test0/testvolume1
is created. The initial size of that disk is 100mb now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.
Solution:
Task 4:
Resize the logical volume, lvrz and reduce filesystem to 4600MiB. Make sure the filesystem contents remain intact with mount point /datarz
(Note: partitions are seldom exactly the size required, so anything with the range of 4200MiB to 4900MiB is acceptable)
Solution:
Task 5:
We are working on /data
initially the size is 2GB. The /dev/test0/lvtestvolume
is mount on /data
. Now you required more space on /data
but you already added all disks belong to physical volume. You saw that you have unallocated space around 5GB on your harddisk. Increase the size of lvtestvolume by 5GB.
Solution:
Task 6
Adjust the size of the vo logical volume, its file system size should be 290M. Make sure that the content of this system is complte.
NOTE: the partition size is rarely accurate to the same size as required, so in the range 270M to 320M is acceptable.
Solution:
Task 7:
There us a local logical volume in your system, named with common and belong to vgsrv volume group, mount to the /common directory. the definition of the size is 128MB.
Requirement:
Extend the logical volume to 190MB without any loss of data. The size is allowed between 160MB after extending.
Solution:
Task 8:
Create thin-provisioned filesystem with the name think_fs from pool think_pool using the devices. The filesystem should be mounted on /strav and must be persistent accross reboot.
Solution:
Task 9:
Change the logical volume capacity named vo from 190M to 300M. and the size of the floating range should set between 280 and 320.
Solution:
Task 10:
Create volume group, and set the size is 500M, the size of single pe is 16M. Create logical volume named lv0 in this volume group, set size is 20pe, make it as ext3 file system, and mounted automatically under data.
Solution:
Task 11:
One logical volume is created named as myvol under vo volume group and is mounted. The initial size of that logical volume is 400MB. Make successfully that the size of logical volume is 200MB without losing any data. The size of logical volume 200MB to 210MB. will be acceptable.
Solution:
Task 12:
There is logical volumes in your system, named with shrink and belong to vgsrv volume group, mount to the /shrink directory. The definition of size is 320MB.
Requirement:
Reduce the logical volume to 220MB without any loss of data. The size is allowed between 200-260MB after reucing.
Solution:
Task 13:
Create volume group, and set 16M as a extends. And divided a volume group containing 50 extends on volume group lv, make it as ext4 files system, and mounted automatically under /mnt/data
Solution:
Last updated
Was this helpful?