Chinaunix

标题: OpenBSD 检查硬盘问题 [打印本页]

作者: x-fish    时间: 2011-10-17 10:55
标题: OpenBSD 检查硬盘问题
每次停电死机或什么的,总是会出现需要检测硬盘的,虽然进入单用户模式来fsck检测后可以正常,但是该OpenBSD用PF做firewall,那就比较麻烦,每次要跑去终端解决。求解。thanks.  
man fstab :


If the sixth field is not present or is zero, a value of zero is returned
     and fsck  will assume that the filesystem does not need to be checked.
---即使把/etc/fstab 里的那个参数改为0或者其他的,也还是不行,有一次还搞得启动不了,只能在单用户模式下恢复。
  1. -Automatic boot in progress: Starting file system checks.
  2. -Can't open /dev/rwd0a: Device not configured
  3. -CAN'T CHECK FILE SYSTEM.
  4. -/dev/rwd0a: UNEXPECTED INCONSISTENCY; RUN fsck_fs MANUALLY.
  5. -Automatic file system check failed; help!
  6. -Enter pathname of shell or RETURN for sh:
复制代码

作者: fender0107401    时间: 2011-10-17 11:20
服务器,总停电。
作者: x-fish    时间: 2011-10-17 11:25
莫办法,环境恶劣。= =!
作者: cnduly    时间: 2011-10-18 12:19
把/var打包和tmp,用mfs把/var,/tmp放内存里,/ 系统 用readonly filesystem  就可以啦~~~ 试试吧。很不错。。。彻底解决这问题! 我有几台机正在运行呢:wink:
作者: f5b    时间: 2011-10-19 09:00
考虑http://www.nmedia.net/flashrd/

flashrd picture of $20 8GB USB key used with flashrd
flashrd is an OpenBSD installer with an eye towards larger flash devices. The primary targets are USB key, Flash disk module, Compact Flash adapter, or hard disk.

The flashrd installation is targeted towards infrastructure equipment. It installs a complete OpenBSD system with "one-touch" upgrade capability. The system stays mounted read-only during normal operation, with writes directed towards a memory filesystem, eliminating the need for frequent disk writes. This greatly reduces the potential for both boot failure due to a dirty filesystem and for flash corruption from repeated writes. It boots from a ramdisk to make in-place upgrades easy and complete.

flashrd allows the disk filesystem to be used in a read-write manner as well. All memory filesystems can be easily eliminated from the flashrd configuration by changing parameters at the top of the flashrd script.

A flashrd image can be used in an application where many copies of the same machine run concurrently. If your servers don't experience frequent changes, the advantage of using the flashrd scheme comes once your primary flashrd upgrade image is created. With just a kernel and filesystem image, upgrades are fast and trivial across your server farm,

flashrd images can be created based on any running system, they don't have to be default OpenBSD system releases. Your setup could be as simple as mounting the filesystem tree you want to duplicate under /mnt. Then, just use /mnt as your file source.

flashrd works within 64MB RAM and 1GB flash hosting a default OpenBSD/i386 or OpenBSD/amd64 installation. To hold more than one version of a system on the flash at any given time, a 2GB or larger flash is recommended.
作者: x-fish    时间: 2011-10-19 10:19
回复 4# cnduly


    你好,我也尝试过mfs,可以的,但是现在如果有大量数据读写,mfs(ram)容量还不够。
作者: sjfff99    时间: 2011-10-19 18:21
把fsck /var /y 放到开机启动项里。每次开机修复。。。 。。。  好像也可以的吧。
作者: wosl2001    时间: 2011-11-27 21:21
你是什么版本啊 我记得4.7以上都可以解决这个问题 4.9我试过没有这个问题
作者: liaoxuebo    时间: 2011-11-28 10:33
我的4.8版本无此问题,如果fstab里面设置0,会出很多问题,还是按照官方推荐配置比较稳定
作者: ioerr    时间: 2011-12-01 11:33
4.8也碰上过断电,两次,每次fsck。有时间研究下。
作者: jvvt    时间: 2011-12-01 13:55
开soft updates也许会好一点。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2