免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3999 | 回复: 10
打印 上一主题 下一主题

[OpenBSD] OpenBSD 检查硬盘问题 [复制链接]

论坛徽章:
1
技术图书徽章
日期:2014-04-16 11:36:47
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-10-17 10:55 |只看该作者 |倒序浏览
每次停电死机或什么的,总是会出现需要检测硬盘的,虽然进入单用户模式来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:
复制代码

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
2 [报告]
发表于 2011-10-17 11:20 |只看该作者
服务器,总停电。

论坛徽章:
1
技术图书徽章
日期:2014-04-16 11:36:47
3 [报告]
发表于 2011-10-17 11:25 |只看该作者
莫办法,环境恶劣。= =!

论坛徽章:
0
4 [报告]
发表于 2011-10-18 12:19 |只看该作者
把/var打包和tmp,用mfs把/var,/tmp放内存里,/ 系统 用readonly filesystem  就可以啦~~~ 试试吧。很不错。。。彻底解决这问题! 我有几台机正在运行呢:wink:

论坛徽章:
0
5 [报告]
发表于 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.

论坛徽章:
1
技术图书徽章
日期:2014-04-16 11:36:47
6 [报告]
发表于 2011-10-19 10:19 |只看该作者
回复 4# cnduly


    你好,我也尝试过mfs,可以的,但是现在如果有大量数据读写,mfs(ram)容量还不够。

论坛徽章:
0
7 [报告]
发表于 2011-10-19 18:21 |只看该作者
把fsck /var /y 放到开机启动项里。每次开机修复。。。 。。。  好像也可以的吧。

论坛徽章:
0
8 [报告]
发表于 2011-11-27 21:21 |只看该作者
你是什么版本啊 我记得4.7以上都可以解决这个问题 4.9我试过没有这个问题

论坛徽章:
0
9 [报告]
发表于 2011-11-28 10:33 |只看该作者
我的4.8版本无此问题,如果fstab里面设置0,会出很多问题,还是按照官方推荐配置比较稳定

论坛徽章:
0
10 [报告]
发表于 2011-12-01 11:33 |只看该作者
4.8也碰上过断电,两次,每次fsck。有时间研究下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP