OpenBSD 4.2, FFS2 and large disks

August 23, 2007 at 12:48 PM | categories: Technical | View Comments |

One of the major improvements in the upcoming OpenBSD 4.2 release is FFS2 support. FFS2 adds more dynamic inode allocation and theoretical support for large (greater than 2T) filesystems. Much of the work to incorporate this was done by Pedro Martelletto, with further integration into OpenBSD done by Todd Miller and Otto Moerbeek. By itself, FFS2 does not interest me especially, since large filesystems are not very practical yet - owing to the time and space (memory) requirements of fsck operations against them. However, FFS2 support spurned work on 64-bit address cleanliness throughout the kernel, which is very nice. Prior to 4.2, one could encounter issues creating filesystems on very large disks - that is disks greater than 1T in size - even if the filesystems themsevles were relatively small, and well within the FFS1 limits. With large commodity disks being cheaply available, and excellent hardware RAID support existing in OpenBSD (arc, ami, etc) it has become very feasible to have single block devices larger than 2T.

A server which a group of friend and I operate has four 750G SATA disks hooked up to an arc(4) controller in a RAID 5 configuration, giving us 2.25T total disk - although the way we have it set up, we have slightly less:

sd0 at scsibus0 targ 0 lun 0: Areca, ARC-1110-VOL#00, R001 SCSI3 0/direct fixed
sd0: 2097129MB, 63912 cyl, 140 head, 480 sec, 512 bytes/sec, 4294921728 sec total
Prior to OpenBSD 4.2, it was unclear whether or not we would run into a limitation at some level of the kernel when trying to use space in the upper areas of the 2T array. Now however, the situation is much clearer. While we don't run in a configuration with a single 2T FFS2 partition, it would likely be safe to do so. Otto Moerbeek (otto@) clarified the situation in this undeadly.org post. Note that while much of the kernel is 64-bit clean, Otto points out that a) FFS1/2 is not fully 64 bit, so there is an upper limit of 2T on the filesystem and b) not all disk drivers support large logical volume sizes.

All in all, a lot of great work has been done on filesystems and buffer cache since the 4.1 release. I look forward to continued refinement of FFS2 and perhaps one day some remedy (maybe a journal of some kind) for the time and space requirements of fsck.

Niall O'Higgins is an author and software developer. He wrote the O'Reilly book MongoDB and Python. He also develops Strider Open Source Continuous Deployment and offers full-stack consulting services at FrozenRidge.co.

blog comments powered by Disqus