Multiple hard drives, only one active & need more space

This is what I think worked for me, (a least I think id did). Please correct me If I did some that was not correctly done.

BUT: system disk still untouch, LVM was install on the extra hd, in other words, I installed LVM on the second 250GB drive, (sdb) not the 250Gb (sda) drive that alreaddy had Linux installed. Virtualmin System Information shows, Local disk space 1.75 TB total, 201.60 GB used, But I dot think I can use any of the other hard drives (sdc and sdd) for storage space yet.

As of right now vistualmin shows that I have Local disk space 1.75 TB total, 168.78 GB used. The Only problem is that I can not manually copy/paste files to any of the added drives and they all have a lost+found folder (dont know what that is for) inside the two 750Gb drives and the 250GB drive.

Install LVM in ubuntu 12.04

Part (1)

  • login to a live ubuntu
  • open text editor
  • open gParted
  • open terminal
  • open url: https://help.ubuntu.com/community/UbuntuDesktopLVM (for a fully detaile instructions)
  • clean all existing hard drives (formated them to ext4)
  • Install lvm2: sudo apt-get -y install lvm2 (on the live section)

note: this command should had ‘Create the physical volume’, (sda2) but for some reason, it did not, I had to create the partition manually (30GB on a 250GB disk).

Part (2)

  • make a sda2 partition manually (on the system disk)
    – click on Device -> Create partition tatle
    – click apply
    – right click -> new -> 30720MB -> add -> apply
    – right click the new partition (30GB) and select new
    – select ext4 -> add -> add -> apply

note: to delete a lvm partition, I had to delete the partition then restart the computer so the system would accept the new changes.

  • Create the physical volume: sudo pvcreate /dev/sda2

  • Create a group using our newly create physical volume: sudo vgcreate sysvg /dev/sda2

  • creates a new volume group which is tided to a physical volume: sudo lvcreate -L 1G -n lvswap sysvg

  • Create the root logical volume using the newly create sysvg group: sudo lvcreate -L 20G -n lvroot sysvg

  • Create the home logical volume using the newly create sysvg group: sudo lvcreate -l 100%FREE -n lvhome sysvg

  • Build linux file systems for all newly created logical volumes:

  • sudo mkfs.ext4 /dev/mapper/sysvg-lvroot

  • sudo mkfs.ext4 /dev/mapper/sysvg-lvhome

  • sudo mkswap -f /dev/mapper/sysvg-lvswap

  • Double click on “Install Ubuntu”

  • select both “Download updates while installing” and “Install this third-party software” (optional)

  • select ‘Something else’

  • Scroll down the list to the bottom and highlight /dev/sda1 and press the “Change…”" button.

  • Use as: ext4journaling file system

  • Mount point: /boot

  • Now lets scroll up to the top and highlight the /dev/mapper/sysvg-lvhome partition that has the “ext4” next to it. Click on “Change”

  • Use as: ext4journaling file system

  • Mount point: /home

  • Now lets scroll up to the top and highlight the /dev/mapper/sysvg-root and press the “Change…” button.

  • Use as: ext4journaling file system

  • Mount point: /

  • Now lets scroll up to the top and highlight the /dev/mapper/sysvg-lvswap and press the “Change…” button.

  • here just click Ok

note: I did not install any OS in this case. But you could press the “Install Now” button to start the installation process. Make sure you DO NOT PRESS “Restart Now”. You want to press the “Continue Testing” We need to install lvm2 it onto your newly setup Ubuntu instance. The commands below will help do this.

  • Install lvm2 onto your new Ubuntu Install. Mount your system into /mnt/:

  • sudo mount /dev/mapper/sysvg-lvroot /mnt

  • sudo mount /dev/mapper/sysvg-lvhome /mnt/home/

  • sudo mount /dev/sda1 /mnt/boot (error: mount point /mnt/boot does not exist)

  • We need to first mount your root file system to /mnt.

  • sudo chroot /mnt (error: failed to run command `/bin/bash’: No such file or directory)

All i wanted was to use all available hard drives on my system as if is was just one whole drive (about 2T).

merry xmas to all here too. thx

wow this multiple hard dive stuff is driving me crazy. Im gonna start fresh installing LVM on a fresh disk and then install ubuntu 12.042 and Virtuamin on it. Will post result as soo as I can, but if anyone has a subjection, please post it here. Thx

Hi !

I have installed virtualmin/webmin first on a 80GB disk. Then i cloned that disk on a 500GB with Clonezilla. Even if i have 420 GB free disk space on it, it do not show available for the system.

What actions do i have to do ( i do not want to loose data btw ), to merge the /dev/sda2 ( 74.04 gb ) with my /dev/sda3 ??

i have downloaded gparted but can’t resize the /dev/sda2 ( lvm2 pv )… I have an option on right click ( deactivate ), but i am not willing to click it and loose data… Or do i have to click it in order to be able to resize it ?

Thanks for any help…

At final, i want only the /dev/sda2 to have the full disk space and no more /dev/sda3.

stephane

I think ur problem is ur cloning… I’m not an expert tho, so I hope this helps
(Here is what I did a while back. This is my own private server and I use for my own reference
http://marcosaquino.noip.me/forum/showthread.php?13-Use-Clonezilla-to-clone-a-small-Drive-to-a-larger-Drive