TerryE wrote:Well another way is use a loop device to create a shared disk. Let's assume you only need 50 Mbytes, then use the VboxManage to create and register a VDI container:
createvdi -filename vdiName -size 50 -static -register -type writethroughNote that you may need to specify an absolute path in the vdiName because relative addresses are relative to the default VDI folder.
TerryE wrote:Then attach it to your FreeBSD system as a second or third HDD. The easiest way is to boot your VM and use FreeBSD to partition it (preferably as DOS partitioned device) and initialise the filesystem, I would strongly recommend sticking to a single partition per VDI in this sort of scenario and VFAT or Ext3.
TerryE wrote:Once the guest has initialised the FS on the VDI you can shut it down and then use a loop device to mount it with an offset of 33280 (for a disk of <128Mb DOS partitioned).
You now have a FS that can be mounted in the host and VM and used to pass data between. The only thing that you must remember is to only mount it in one system at a time because if you mount it in both then you can trash the FS. One way to do this is to put some wrapper scripts around the mount and umount so that you create an interlock file in the FS e.g. "/owned_by_HOST" so that the mount creates this and the umount deletes it. When you do the mount first mount it RO and check for the absence of the wrong file before remounting it RW. Hence this interllock will prevent both FS mounting at the same time.
In your first post you wrote:Bottom line is I want/need shared folders
In the first you are asking for shared folders (which are difficult to realise in BSD because of the lack of GA support) which is why I started talking about VDI encapsulates loop devices.In your last post you wrote: I don't actually need to be able to see the files from the host. I just want to have Linux MD RAID0 underneath.
TerryE wrote:bcs, I need to put a stop!sign up here. On reading your last post, I think that we are talking at cross purposes and your first question is the wrong one. Can I pick out two of your statements:In your first post you wrote:Bottom line is I want/need shared foldersIn the first you are asking for shared folders (which are difficult to realise in BSD because of the lack of GA support) which is why I started talking about VDI encapsulates loop devices.In your last post you wrote: I don't actually need to be able to see the files from the host. I just want to have Linux MD RAID0 underneath.
In your second you say you don't need to have shared access you just want them protected by your RAID-1 subsystem. In this case all you need are bog standard VDIs: no sharing; no loop devices; nothing but bog standard and we don't need to have this discussion.
TerryE wrote:Second, what I still don't understand is why you just don't use VDIs. I really can't understand why you want to use raw partitions. I am really interested in your reasoning here. What do you think that you will gain?
If doesn't help that much. You still have all of the other files used by the VMM on a file system somewhere that needs checked. Surely what you want to do is to move your VirtualBox hierarchy onto its own dedicated partition with a tune2fs -i 0 -c 0 and a routine W/E maintenance slot which does a savestate of any guests, bounces the file system with any fschk.bsc wrote:Well, among other reasons, if I use a VDI on top of an ext3 fs then the the embedded ufs fs will be fscked by the guest in addition to the host ext3 fsck that Linux already did, but at the risk of stating the obvious, raw partitions won't be fscked.
Users browsing this forum: Bing [Bot] and 3 guests