
LVM - Logical Volume Management - Combining Drives Together - Chris Titus Tech
video description
Date: 2022-03-21
Related videos
Comments and reviews: 10
Anoop
After watching your video, i decided to check it. but not ready to test on my lap/Computer. so i purchased a dedicated server from a data center and its have 3 x 2 TB HDD. i setup the server with NO RAID. so i can use the three individual disk. Operating System used for testing was Centos and Ubuntu.-
1. i untouched the sda disk -
2. created single partition with sdb1 with 100% Storage. Around 1.7 TB Can use.-
3. Created single partition with sdc1 with 100% Storage. Around 1.7. TB Can use.-
4. i create physical volume successfully.-
pvs-
PV VG Fmt Attr PSize PFree-
/dev/sda5 kvmvpstorage lvm2 a-- 1.67t 1.67t-
/dev/sdb1 backup lvm2 a-- 1.82t 0-
/dev/sdc1 backup lvm2 a-- 1.82t 0-
root-rescue:/mnt#-
5. successfully created volume group also-
vgs-
VG #PV #LV #SN Attr VSize VFree-
backup 2 1 0 wz--n- 3.64t 0-
kvmvpstorage 1 0 0 wz--n- 1.67t 1.67t-
root-rescue:/mnt#-
6. Finally i created 100% volumegrop to logical Volume-
lvs-
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert-
lv1 backup -wi-a----- 3.64t-
so i got the result of a total storage of 3.64 TB and mounted this lv1 to /backup-
But, after few hours, i restarted the server. unfortunaetly the server is not booting/working. On detailed inspection found that the newly created mounted lv was missing. so i logged the server via rescue mode and added the details or mount id in /etc/fstab. But i dont know how to remount it again via rescue mode. if you know it, please update it.
reply
After watching your video, i decided to check it. but not ready to test on my lap/Computer. so i purchased a dedicated server from a data center and its have 3 x 2 TB HDD. i setup the server with NO RAID. so i can use the three individual disk. Operating System used for testing was Centos and Ubuntu.-
1. i untouched the sda disk -
2. created single partition with sdb1 with 100% Storage. Around 1.7 TB Can use.-
3. Created single partition with sdc1 with 100% Storage. Around 1.7. TB Can use.-
4. i create physical volume successfully.-
pvs-
PV VG Fmt Attr PSize PFree-
/dev/sda5 kvmvpstorage lvm2 a-- 1.67t 1.67t-
/dev/sdb1 backup lvm2 a-- 1.82t 0-
/dev/sdc1 backup lvm2 a-- 1.82t 0-
root-rescue:/mnt#-
5. successfully created volume group also-
vgs-
VG #PV #LV #SN Attr VSize VFree-
backup 2 1 0 wz--n- 3.64t 0-
kvmvpstorage 1 0 0 wz--n- 1.67t 1.67t-
root-rescue:/mnt#-
6. Finally i created 100% volumegrop to logical Volume-
lvs-
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert-
lv1 backup -wi-a----- 3.64t-
so i got the result of a total storage of 3.64 TB and mounted this lv1 to /backup-
But, after few hours, i restarted the server. unfortunaetly the server is not booting/working. On detailed inspection found that the newly created mounted lv was missing. so i logged the server via rescue mode and added the details or mount id in /etc/fstab. But i dont know how to remount it again via rescue mode. if you know it, please update it.
reply
SciFiFreak
I figured out that you dont have to create a single large partition with a filesystem in it, you can just use sdb as a whole, you dont even need to create a partition table. Thats why it says -1 disk- at 6:25. I also found it strange that you created a filesystem within sdb1 since thats something one would do with the devfile of the logical volume. Thats why it asks -Wipe it- at 9:20, after that there is no file system anymore. With btrfs you can also add whole disks to a file system, thats the reason why i tested this with lvm. Still, thanks for the video.
reply
I figured out that you dont have to create a single large partition with a filesystem in it, you can just use sdb as a whole, you dont even need to create a partition table. Thats why it says -1 disk- at 6:25. I also found it strange that you created a filesystem within sdb1 since thats something one would do with the devfile of the logical volume. Thats why it asks -Wipe it- at 9:20, after that there is no file system anymore. With btrfs you can also add whole disks to a file system, thats the reason why i tested this with lvm. Still, thanks for the video.
reply
Ezequiel
Hello Christ.. Great videos!!... Is it possible to create a Mirrored Volumes with LVM?... I have a WIndows PC with 256gb SSD as C: and added two 4gb partitions Miirrored since they will be used for backups. I would prefer to use Linux instead of windows.. Windows Partition Manager converted them to GPT and gave me an option to create New Mirrored Volume. Thanks in advance.
reply
Hello Christ.. Great videos!!... Is it possible to create a Mirrored Volumes with LVM?... I have a WIndows PC with 256gb SSD as C: and added two 4gb partitions Miirrored since they will be used for backups. I would prefer to use Linux instead of windows.. Windows Partition Manager converted them to GPT and gave me an option to create New Mirrored Volume. Thanks in advance.
reply
Your
You don't need to partition your disk for LVM. You can run it on a raw unpartitioned disk. Same with LUKS. I always do raw LUKS on an unpartitioned disk and then LVM on LUKS.
Also, I prefer XFS. Sure, it can't shrink but it can grow and also dynamically grow its inodes. Plus, I still don't trust ext4 shrink. XFS performs better anyway with way more features like dedupe.
reply
You don't need to partition your disk for LVM. You can run it on a raw unpartitioned disk. Same with LUKS. I always do raw LUKS on an unpartitioned disk and then LVM on LUKS.
Also, I prefer XFS. Sure, it can't shrink but it can grow and also dynamically grow its inodes. Plus, I still don't trust ext4 shrink. XFS performs better anyway with way more features like dedupe.
reply
Ivy
Has anyone here tried caching with nvme ssds? I-m playing around with one of our old servers and get worse r/w with dm-cache than with the an ancient raid controller alone. I have tried dm-cache and dm-writecache, writecache won-t let me activate the lv and shouts about memory and dm-cache halves r/w.
12 x 4 TB HW r6 1.7/2.2 r/w vs cached 0.6/0.3.
reply
Has anyone here tried caching with nvme ssds? I-m playing around with one of our old servers and get worse r/w with dm-cache than with the an ancient raid controller alone. I have tried dm-cache and dm-writecache, writecache won-t let me activate the lv and shouts about memory and dm-cache halves r/w.
12 x 4 TB HW r6 1.7/2.2 r/w vs cached 0.6/0.3.
reply
Jeff
Hi, nice info! I was just about to add another disk to my system. I have some questions:
1. Can I mix SSD and HDD? Suppose that I already have a LVM partition on a SSD, can I extend the volume with the new added HDD?
2. If (1.) is possible, is it safe to do so? Any disadvantage of mixing drives?
thanks
reply
Hi, nice info! I was just about to add another disk to my system. I have some questions:
1. Can I mix SSD and HDD? Suppose that I already have a LVM partition on a SSD, can I extend the volume with the new added HDD?
2. If (1.) is possible, is it safe to do so? Any disadvantage of mixing drives?
thanks
reply
Your
Why isn't it used in business? LVM supports all the RAID levels. Plus, you can setup caching. A majority of my servers use a RAID 50 of HDD with a RAID 10 of NVME that act as a writeback cache to the RAID 50 of HDD.
It allows me to get NVME performance for HDD price 99.999% of the time.
reply
Why isn't it used in business? LVM supports all the RAID levels. Plus, you can setup caching. A majority of my servers use a RAID 50 of HDD with a RAID 10 of NVME that act as a writeback cache to the RAID 50 of HDD.
It allows me to get NVME performance for HDD price 99.999% of the time.
reply
Noman
Chris if we installed ubuntu without LVM and just with standard installation, than how can we do it from there, In this video you have already setup LVM and taught us that how to add and increase space, but in case we installed without LVM support, than how can we do that. Please
reply
Chris if we installed ubuntu without LVM and just with standard installation, than how can we do it from there, In this video you have already setup LVM and taught us that how to add and increase space, but in case we installed without LVM support, than how can we do that. Please
reply
Liaquat
Thanks for sharing the video.
I followed your video and tried to increase to increase the swap partition to 8GB, but it's still showing 1GB and when i type lvscan here is the output i see
ACTIVE '/dev/vgubuntu/swap_1' [
reply
Thanks for sharing the video.
I followed your video and tried to increase to increase the swap partition to 8GB, but it's still showing 1GB and when i type lvscan here is the output i see
ACTIVE '/dev/vgubuntu/swap_1' [
reply
Still
Passing -r to the lvextend command will automatically resize the FS for the extended LV. So, in this case it would be -lvextend -l +100%FREE -r /dev/vg1/lv1- so then you don't need the final resize2fs call. Great video, thanks!
reply
Passing -r to the lvextend command will automatically resize the FS for the extended LV. So, in this case it would be -lvextend -l +100%FREE -r /dev/vg1/lv1- so then you don't need the final resize2fs call. Great video, thanks!
reply
Add a review, comment
Other channel videos















