Howdy, Stranger!

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

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    How can a VM created in A disk make use of B disk in the same server?
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

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

    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
      • do not prepay > 1 year and check for reviews/support
      • only use monthly from a provider operating < 1 year 🍆
    • Probably try LVM?

      Thanked by 1yongsiklee
    • HBAndreiHBAndrei Member, Provider
      edited September 2018

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

      Thanked by 1yongsiklee

      Free Uptime Monitoring - minimize your downtime by being the first to know about it.
      Free Blacklist Monitoring - don't let a few bad clients ruin your network.

    • yongsikleeyongsiklee Member
      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.

      Own a piece of internets history.

    • 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
      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
      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.

    • @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.

    • @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
    • @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.