Sign in to follow this  
StuartM

How can a VM guest access the host filesystem RAID?

Recommended Posts

I have Ubuntu Server 16.04 as my host. On this machine I have created a RAID 5 filesystem. I have created a 20Gb VirtualMachine using KVM and installed Xpenology 5967.1 on this VM. I would like to give Synology access to this existing RAID (and I don't want to destroy the existing RAID). Can this be done, and if so how?

 

Regards, Stuart

Share this post


Link to post
Share on other sites
I have Ubuntu Server 16.04 as my host. On this machine I have created a RAID 5 filesystem. I have created a 20Gb VirtualMachine using KVM and installed Xpenology 5967.1 on this VM. I would like to give Synology access to this existing RAID (and I don't want to destroy the existing RAID). Can this be done, and if so how?

 

Regards, Stuart

 

if i just take the topic an ignore the text my answer would be network (nfs) or some kind of shared folder finction between host and guest (if kvm has anything like this), but that will not give dsm some kind of disk or volume to use

you text makes it different and much more complicated (if not impossible?) with giving access you mean you want to read he files alrady in that (raid based) filesystem (if not you could just create a virtual disk within that filesystem and presend this as basic disc to dsm/xpenology and create a basic disc)

with vt-d you could give the controller to the vm (if kvm supports that) and the guest would see the disks but thats no option for you as you want to keep your data and dsm would have to create the array by itself (it takes ~3GB from every disk to mirror the dsm system, whats left is for raid availible) and destroying all data already on the disks

maybe dsm/xpenology is not the best choice for you, i know that open media vault will be able to do that (don't know if it is running in kvm), it will recognise the raid and use it (tryed that with bare metal as i was looking for a fallback if dsm is not working any more, omv recognised the raid5 volume dsm had created and was able to use it)

Share this post


Link to post
Share on other sites

I am not sure exactly what you mean from your post. But if you want Xpenology to see to use your RAID share natively (as volume2 for example), you can do just that.

 

On your Xpenology, create a very small volume2. Then ssh onto your Xpenology box

 

Edit the file

/etc/rc

search for the line

# checking and Mounting filesystem(s) ...

/usr/syno/bin/synobootseq --set-check-fs >/dev/null 2>&1

/etc.defaults/rc.volume start

/etc.defaults/rc.syn start

 

Add the above line (/etc.defaults/rc.syn start) below the rc.volume start

 

Now you need to create file rc.syn in /etc.defaults

 

In that rc.syn file put in the 3 lines:

 

umount /volume2

sleep 2

mount -t nfs 192.168.1.100:/mnt/Vol01/Synology /volume2

 

Make the rc.syn file executable.

 

Obviously, I use 192.168.1.100 as your host IP and /mnt/Vol01/Synology is just an example share location. Change it to match your setup.

root users on both your xpenology and host must have the same password.

 

After everything is done, in Xpenology you'll see that your small dummy volume2 is replaced with your RAID share. You can create shares and stuffs in Xpenology on that volume2.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this