0

This is a little related to my previous question Solaris: Mounting a file system on an application's handlers except this question is for a different purpose and is simpler as there is no open/close/lock it is just a fixed length block of bytes with read/write operations.

Is there anyway I can create a virtual slice, kinda like a RAM disk or a SVM slice.. but I want the reads and writes to go through my app.

I am planning to use ZFS to take multiple of these virtual slices/disks and make them into one larger one for distributed backup storage with snapshots. I really like the compression and stacking that ZFS offers. If necessary I can guarantee that there is only one instance of ZFS accessing these virtual disks at a time (to prevent cache conflicts and such). If the one instance goes down, we can make sure it won't start back up and then we can start another instance of that ZFS.

I am planning to have those disks in chunks of about 4GB or so,, then I can move around each chunk and decide where to store them (multiple times mirrored of course) and then have ZFS access the chunks and put them together in to larger chunks for actual use. Also ZFS would permit adding of these small chunks if necessary to increase the size of the larger chunk.

I am aware there would be extra latency / network traffic if we used my own app in Java, but this is just for backup storage. The production storage is entirely different configuration that does not relate.

Edit: We have a system that uses all the space available and basically when there is not enough space it will remove old snapshots and increase the gaps between old snapshots. The purpose of my proposal is to allow the unused space from production equipment to be put to use at no extra cost. At different times different units of our production equipment will have free space. Also the system I am describing should eliminate any single point of failure when attempting to access data. I am hoping to not have to buy two large units and keep them synchronized. I would prefer just to have two access points and then we can mix large/small units in any way we want and move data around seamlessly.

This is a cross post because this is more software related than sysadmin related The original question is here: https://serverfault.com/questions/212072. it may be a good idea for the original to be closed

4

2 回答 2

2

一种方法是编写一个 Solaris 设备驱动程序,它正是一个模拟真实磁盘的块设备,但它会与您的应用程序进行通信。

从阅读设备驱动程序教程开始,然后查看OpenSolaris 源代码以获取真正的驱动程序代码。

或者,您可以研究将 Solaris iSCSI 目标修改为与您的应用程序的接口。同样,查看OpenSolaris COMSTAR将是一个好的开始。

于 2010-12-13T21:47:17.643 回答
-1

似乎任何文件系统上的任何固定长度文件都适用于与 ZFS 一起使用的块设备。不确定重启是如何工作的,但我相信我们可以编写一些启动命令来解决这个问题。

编辑:固定长度文件将位于 NFS 等网络文件系统上。

于 2010-12-27T23:32:49.960 回答