分页: 1 / 1

OpenBSD 大硬盘 fsck 注意了!!

发表于 : 2010-03-02 7:20
wkx9dragon
今早读了些电邮,我觉得很有用哦。由于历史上对Fsck做了并行优化,对大硬盘小内存的电脑,进行FSCk 时可能会出现问题。具体解决方法有两条。

原文如下:
From: Bohdan Tashchuk <btashchuk@...>
To: <misc@...>
Subject: another hint for fsck for large filesystems
Date: Tuesday, January 5, 2010 - 7:43 pm


Sorry I'm not subscribed to the misc@ list, I read on a web archive. So I can't reply directly to the recent discussion about how to do newfs / fsck etc on large file systems (memory issue).
I have one box with relatively limited memory and had to make a change directly to /etc/rc (yes, horrors)!.
The change is
fsck -p -l 1
This keeps fsck from checking more than one disk in parallel.

From: Alexander Hall <alexander@...>
To: Bohdan Tashchuk <btashchuk@...>
Cc: <misc@...>

Subject: Re: another hint for fsck for large filesystems
Date: Wednesday, January 6, 2010 - 3:24 pm


Bohdan Tashchuk wrote:
quoted text> Sorry I'm not subscribed to the misc@ list, I read on a web archive.> So I can't reply directly to the recent discussion about how to do> newfs / fsck etc on large file systems (memory issue).>> I have one box with relatively limited memory and had to make a> change directly to /etc/rc (yes, horrors)!.>> The change is>> fsck -p -l 1>> This keeps fsck from checking more than one disk in parallel. You should be able to get the same result using proper values for
fs_passno in /etc/fstab.
$ man fstab
/passno
/Alexander

From: Bohdan Tashchuk <btashchuk@...>
To: Alexander Hall <alexander@...>
Cc: <misc@...>

Subject: Re: another hint for fsck for large filesystems
Date: Friday, January 8, 2010 - 7:34 am


--- On Wed, 1/6/10, Alexander Hall wrote:
quoted text> You should be able to get the same result> using proper values for fs_passno in /etc/fstab. One would hope so, but I don't think that's the case.
First, the man page says
the root filesystem should be specified with
a fs_passno of 1, and other filesystems
should have a fs_passno of 2. Filesystems
within a drive will be checked sequentially,
but filesystems on different drives will be
checked at the same time to utilize
parallelism available in the hardware.
Second, in fsck/preen.c I see a construct like this
for (passno = 1; passno <= 2; passno++) {
...
... if (passno == 2 && fs->fs_passno > 1) {
For some reason, many years ago, fsck was "optimized" to run in parallel for "efficiency". It's unfortunate that the fstab file can't be used to provide better control over the parallelism.

发表于 : 2010-03-02 8:59
leo
你的英语水平一点问题没有哦。