Solaris:与 ZFS 一起使用的虚拟片/磁盘
这与我之前的问题有点相关 Solaris:挂载文件应用程序处理程序上的系统,除了这个问题是出于不同的目的,并且更简单,因为没有打开/关闭/锁定,它只是具有读/写操作的固定长度的字节块。
无论如何,我可以创建一个虚拟切片,有点像 RAM 磁盘或 SVM 切片..但我希望读取和写入通过我的应用程序。
我计划使用 ZFS 获取多个虚拟切片/磁盘,并将它们变成一个更大的虚拟切片/磁盘,用于带有快照的分布式备份存储。我真的很喜欢 ZFS 提供的压缩和堆栈功能。如果有必要,我可以保证一次只有一个 ZFS 实例访问这些虚拟磁盘(以防止缓存冲突等)。如果一个实例出现故障,我们可以确保它不会重新启动,然后我们可以启动该 ZFS 的另一个实例。
我计划将这些磁盘分成大约 4GB 左右的块,然后我可以移动每个块并决定将它们存储在哪里(当然多次镜像),然后让 ZFS 访问这些块并将它们放在一起更大的块中实际使用的块。如果需要增加大块的大小,ZFS 还允许添加这些小块。
我知道如果我们在 Java 中使用我自己的应用程序,将会有额外的延迟/网络流量,但这仅用于备份存储。生产存储是完全不同的、不相关的配置。
编辑:我们有一个系统,它使用所有可用空间,基本上当空间不足时,它会删除旧快照并增加旧快照之间的间隙。我的建议的目的是让生产设备中未使用的空间能够免费使用。在不同的时间,我们的生产设备的不同单元会有可用空间。此外,我所描述的系统应该消除尝试访问数据时的任何单点故障。我希望不必购买两个大型设备并保持它们同步。我希望只有两个接入点,然后我们可以以任何我们想要的方式混合大/小单元并无缝地移动数据。
这是一个交叉帖子,因为这与软件相关而不是与系统管理相关原始问题在这里:https://serverfault.com/questions /212072。关闭原始版本可能是个好主意
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种方法是编写 Solaris 设备驱动程序,确切地说是一种模拟真实磁盘的块设备,但它将与您的应用程序通信。
首先阅读设备驱动程序教程,然后查看OpenSolaris 源代码以获取真正的驱动程序代码。
或者,您可以研究将 Solaris iSCSI 目标修改为与您的应用程序的接口。同样,查看 OpenSolaris COMSTAR 将是一个好的开始。
One way would be to write a Solaris device driver, precisely a block device one emulating a real disk but that will communicate back to your application instead.
Start with reading the Device Driver Tutorial, then have a look at OpenSolaris source code for real drivers code.
Alternatively, you might investigate modifying Solaris iSCSI target to be the interface with your application. Again, looking at OpenSolaris COMSTAR will be a good start.
似乎任何文件系统上的任何固定长度文件都适合与 ZFS 一起使用的块设备。不确定重新启动是如何工作的,但我确信我们可以编写一些启动命令来解决这个问题。
编辑:固定长度文件将位于网络文件系统(例如 NFS)上。
It seems that any fixed length file on any file system will do for a block device for use with ZFS. Not sure how reboots work, but I am sure we can get write some boot up commands to work that out.
Edit: The fixed length file would be on a network file system such as NFS.