Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How can a VM created in A disk make use of B disk in the same server?

yongsikleeyongsiklee Member, Host Rep

I have two disks in my server, one SSD, another HDD.

I created a VM with Proxmox on SSD and installed Nextcloud in it.
Since my HDD has a capacity to hold 5TB of files, I want to make use of it for the Nextcloud VM. What will be the simplest/smartest way to achieve it?

Thank you.

Comments

  • $15 to a sysadmin.

    Thanked by 4mikho mfs MrPsycho FHR
  • Probably try LVM?

    Thanked by 1yongsiklee
  • HBAndreiHBAndrei Member, Top Host, Host Rep
    edited September 2018

    Add another disk ( located on Disk B ) to your VM.

    Thanked by 1yongsiklee
  • yongsikleeyongsiklee Member, Host Rep
    edited September 2018

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

  • You need to export/import with something like Gluster/NFS, but then you're doing it wrong.

  • dragon2611dragon2611 Member
    edited September 2018

    @yongsiklee said:

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

    Add the HDD as storage in proxmox (either as a folder, or LVM.etc), that can store disk images.

    Then add a second Disk to your VM (its under hardware) with that storage set, you will need to partition/format the disk within the VM and then you should be able to mount it.

    Thanked by 1yongsiklee
  • yongsikleeyongsiklee Member, Host Rep
    edited September 2018

    @dragon2611 said:

    @yongsiklee said:

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

    Add the HDD as storage in proxmox (either as a folder, or LVM.etc), that can store disk images.

    The add a second Disk to your VM (its under hardware) with that storage set, you will need to partition/format the disk within the VM and then you should be able to mount it.

    WOW I didn't know Proxmox has option to add a second drive for a VM in its UI. Thank you.

  • yongsikleeyongsiklee Member, Host Rep
    edited September 2018

    @CyberMonday said:
    You need to export/import with something like Gluster/NFS, but then you're doing it wrong.

    It's ridiculous to deploy NFS for a local disk.

  • yongsikleeyongsiklee Member, Host Rep

    @dragon2611 said:

    @yongsiklee said:

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

    Add the HDD as storage in proxmox (either as a folder, or LVM.etc), that can store disk images.

    Then add a second Disk to your VM (its under hardware) with that storage set, you will need to partition/format the disk within the VM and then you should be able to mount it.

    Tried, not working. You "first" need to have the drive partitioned/formatted/mounted and added as a storage in Datacenter. A VM cannot use/see the storage even if it is later added as a second harddrive in the UI of Proxmox.

  • yongsikleeyongsiklee Member, Host Rep

    @yongsiklee said:

    @CyberMonday said:
    You need to export/import with something like Gluster/NFS, but then you're doing it wrong.

    It's ridiculous to deploy NFS for a local disk.

    I might have to go with Gluster/NFS in the end but I will try other local methods first.

  • @yongsiklee said:

    @dragon2611 said:

    @yongsiklee said:

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

    Add the HDD as storage in proxmox (either as a folder, or LVM.etc), that can store disk images.

    Then add a second Disk to your VM (its under hardware) with that storage set, you will need to partition/format the disk within the VM and then you should be able to mount it.

    Tried, not working. You "first" need to have the drive partitioned/formatted/mounted and added as a storage in Datacenter. A VM cannot use/see the storage even if it is later added as a second harddrive in the UI of Proxmox.

    Well yes the 2nd drive needs to be in a state where you can store VM images in, but yes the VM will absolutely see drives on secondary disks, they'll show up as an extra Hard disk within the VM.

    I have VM's with more than one disk present, usually a small OS disk and a data drive.

    Thanked by 1yongsiklee
  • yongsikleeyongsiklee Member, Host Rep

    @dragon2611 said:

    @yongsiklee said:

    @dragon2611 said:

    @yongsiklee said:

    I've already created partition for the new disk and mounted into a folder in SSD, (No LVM but just the traditional way). But the trouble is I cannot access it from a virtual machine which is basing itself on the SSD where the mounted folder resides.

    Fair question should be, how can I access a folder, from a vm, that's located in the drive where a vm is created.

    Add the HDD as storage in proxmox (either as a folder, or LVM.etc), that can store disk images.

    Then add a second Disk to your VM (its under hardware) with that storage set, you will need to partition/format the disk within the VM and then you should be able to mount it.

    Tried, not working. You "first" need to have the drive partitioned/formatted/mounted and added as a storage in Datacenter. A VM cannot use/see the storage even if it is later added as a second harddrive in the UI of Proxmox.

    Well yes the 2nd drive needs to be in a state where you can store VM images in, but yes the VM will absolutely see drives on secondary disks, they'll show up as an extra Hard disk within the VM.

    I have VM's with more than one disk present, usually a small OS disk and a data drive.

    Thank you again. I only restarted the VM previously and that's probably why I did not see the new drive. I powered off and started the VM and now I am with a new drive in VM. :-)

Sign In or Register to comment.