UFS

共 16 篇文章。

FreeBSD基金会2012年终募捐

• Development

截止到目前为止, FreeBSD 基金会共募得本年度捐款 $461,119,距本年度的预定目标 $500,000 还差 $38,881 美元。今年 FreeBSD 基金会资助了相当多的项目,包括 Pawel Jakub Dawidek (pjd@) 的 Capsicum 框架、分布式审计服务 auditstd、与我厂一起资助了 Bjoern Zeeb (bz@) 对 FreeBSD IPv6 协议栈的性能剖析、Edward Tomasz Napierala (trasz@) 的在线 UFS 扩容,作为中介机构接受了 Semihalf 的 NAND 闪存文件系统和存储棧,并资助了与此相关的移植工作。此外,FreeBSD 基金会也资助了全球范围内与 FreeBSD 开发有关的一系列会议,包括欧洲的 EuroBSDCon、亚洲的 AsiaBSDCon、加州 MeetBSD、加拿大 BSDCan、澳大利亚的 BSDDay 等,并在硅谷和剑桥大学分别举行了 Vendor Summit 和 Developer Summit。

阅读全文… ( 本文约 471 字,阅读大致需要 1 分钟 )

远程升级 FreeBSD 系统备忘

• Cheatsheets

📜 历史文件已不具备现实意义

目前(2020)的最佳实践是使用 etcupdate 和 package。本文内容已过时。

最近两次失败记录的教训。

首先是联编 world 和 kernel (make buildworld buildkernel),这个没啥可说的。假定 / 是 UFS(即,可使用 nextboot),且配置了 watchdog,则操作步骤为:

阅读全文… ( 本文约 355 字,阅读大致需要 1 分钟 )

SU+J

• Kernel

Jeff Roberson 下周左右将会正式发表对于 UFS 的一项改进,为 Soft Updates 加入 Journal-ling,从而简化其恢复逻辑,并消除对 fsck 的依赖。

目前常见的保持元数据一致性的方法有四种:最原始的、将元数据以同步方式写盘的方法,性能非常差;常见的文件系统中使用的元数据回写日志(如ext3),缺点是无法检验日志本身的正确性,而且元数据需要写入两次因此对性能有潜在影响;Soft Updates,缺点是需要运行fsck来释放资源泄漏,而这个操作很耗时,且实现本身比较复杂;Copy-on-Write,在WAFL和ZFS中采用的技术,随着硬盘的淘汰随机存取时间不再是性能瓶颈,应该是未来的发展趋势,目前的缺点是会导致产生较多碎片。SU+J结合了Soft Updates和Journalling的优点,即,使用Soft Updates来确保写到磁盘上的数据的一致性,而使用Journalling来确保资源泄漏能够迅速回收,从而消除了fsck的必要性。

阅读全文… ( 本文约 598 字,阅读大致需要 2 分钟 )

如何:为 FreeBSD UFS2 文件系统恢复受损的主超级块

• Kernel

HOWTO: Recover damaged FreeBSD UFS2 file systems with damaged master super-block

Copyright © Xin LI, 2006.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

注意:本文介绍的方法部分,假定读者对UFS文件系统,以及FreeBSD的日常操作相当熟悉;请勿轻易执行本文介绍的操作,本文中的操作,可能导致fsck_ffs(8)无法修正的严重问题。由于在此本人已明确告知读者这一风险,据此,对于由于执行这些操作导致的任何数据损失,本人明示不承担任何责任。

阅读全文… ( 本文约 2049 字,阅读大致需要 5 分钟 )

也许可以给ufs(FFS)加个hack?

• Kernel

UFS的目录项中的文件名字段是定长的(参见sys/ufs/dir.h),这样也许我们可以把symlink的内容(如果够短的话)保存到目录项,而不是inode所指定的fragment上,从而访问symlink可以节省最多两次I/O操作。

参与评论

Solaris ZFS代码公开了

• Kernel

在 这里。ZFS提出了很多很有意思的概念,值得一看。

比较感兴趣的几个地方:(1)Solaris的byteswap实现;(2)DSL;(3)ZIL。暂时还没有仔细看ZIL,但这里有一个很有意思的设计:

阅读全文… ( 本文约 325 字,阅读大致需要 1 分钟 )

gjournal alpha released

• Kernel

gjournal is one of the Google Summer of Code projects that is FreeBSD related. It provides data journalling service that will be useful for frequent randomized area writing, just like write clustering.

Today, the first public alpha version has been released.

Please note that this is not intentional to replace SoftUpdates nor a real journalling file system, as the metadata consistency protection is different than just do data writing journalling. However, this indicates a good way of providing better performance for file systems.

阅读全文… ( 本文约 87 字,阅读大致需要 1 分钟 )

How to install FreeBSD without CD-ROM, Floppy nor PXE?

• SysAdmin

Today I have experienced how to install FreeBSD from a USB device - quite simple so you can do it yourself :-)

First, initialize the USB solid state disk with bsdlabel(8):

bsdlabel -wB /dev/da0

Then, initialize a file system:

newfs -O1 /dev/da0a

Third, copy CDROM’s /boot to it.

And you can now boot from the USB disk.

阅读全文… ( 本文约 70 字,阅读大致需要 1 分钟 )