Adding a hard drive to an Ubuntu LVM VM

starkruzr

Well-Known Member
I added a 1TB HDD device to an Ubuntu VM with LVM on it, shut it down, and restarted it.

Code:
lvm> lvmdiskscan  /dev/ram0             [      64.00 MiB] 
  /dev/Tauron-vg/root   [     244.77 GiB] 
  /dev/ram1             [      64.00 MiB] 
  /dev/Tauron-vg/swap_1 [       4.00 GiB] 
  /dev/vda1             [     243.00 MiB] 
  /dev/ram2             [      64.00 MiB] 
  /dev/ram3             [      64.00 MiB] 
  /dev/ram4             [      64.00 MiB] 
  /dev/ram5             [      64.00 MiB] 
  /dev/vda5             [     249.76 GiB] LVM physical volume
  /dev/ram6             [      64.00 MiB] 
  /dev/ram7             [      64.00 MiB] 
  /dev/ram8             [      64.00 MiB] 
  /dev/ram9             [      64.00 MiB] 
  /dev/ram10            [      64.00 MiB] 
  /dev/ram11            [      64.00 MiB] 
  /dev/ram12            [      64.00 MiB] 
  /dev/ram13            [      64.00 MiB] 
  /dev/ram14            [      64.00 MiB] 
  /dev/ram15            [      64.00 MiB] 
  1 disk
  18 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume
Where the heck is it?
 
Did you extend your existing LVM to the new disk image and resized it ?

1. #vgextend <existing_volume_group> /dev/<new_hdd>

2. #lvextend -l100%FREE /dev/<existing_volume_group>/<existing_lv>

3. #resize2fs /dev/<existing_volume_group>/<existing_lv>

4. Check with #vgdisplay, #lvdisplay
 
fdisk - l

Find out the device name.

If you want a completely different lvm, create a new lvm. . If you just want to mount the disk as a mount point you don't need lvm at all and the fact that you already have lvm has no bearing on anything.
 
LVM is not your problem. If you want to mount the seperate disk to /mnt/storage you can do that without using LVM.
See what dmesg says. Your new device must appear there. Otherwise it isn't detected.