文件系统惊魂
-- 幸运的Reiserfs选择！


%! Target  : xhtml
%! Encoding: UTF-8
%! Options : --toc --css-sugar --enum-title




= 事件 =
``* Mounting local filesystem....``

: 惊慌:
 - 稳定运行一周的DELL D620 Laptop under Ubuntu7.04
 - 一回到家开机就停在上述情况不再有反应


== 处理 ==

- 幸好有系统管理员的朋友依然在线
- 幸好家里的 AMD 兼容机 under Ubuntu 6.04 依然工作
- 询问,得知得``fsck`` 一下


== fsck ==

- 幸好随身带着Ubuntu 的DVD!
- 启动进入后:
```
$sudo su -
#ls /dev | grep sda
sda 
...
sda11
```
- 幸好重装机器时详细的记录了分区信息:
 - [升级Ubuntu http://wiki.woodpecker.org.cn/moin/ZoomQuiet/2007-05-08]
 - [从Dapper到Feisty 的征程 http://blog.zoomquiet.org/pyblosxom/FLOSS/Ubuntu/upgrade-into-feisty-2007-05-11-13-43]
  - [/pybimage/070511_myUbuntu_partition_scrot.png]
- 所以优先檢查对启动有影响的 **/**; **/usr** ;**/home**


== 幸运ReiserFS ==
```
#fsck -t reiserfs /dev/sda2
#fsck -t reiserfs /dev/sda11
```
- 果然 ``/usr`` 檢查出问题提示进行``--rebuild-tree``
```
#fsck -t reiserfs --rebuild-tree /dev/sda11
```
- 结果不行?! Google 一下,晕的!原来有专用的
```
reiserfsck 
Usage: reiserfsck [mode] [options]  device

Modes:
  --check                       consistency checking (default)
  --fix-fixable                 fix corruptions which can be fixed without 
                                --rebuild-tree
  --rebuild-sb                  super block checking and rebuilding if needed
                                (may require --rebuild-tree afterwards)
  --rebuild-tree                force fsck to rebuild filesystem from scratch
                                (takes a long time)
  --clean-attributes            clean garbage in reserved fields in StatDatas 
Options:
  -j | --journal device         specify journal if relocated
  -B | --badblocks file         file with list of all bad blocks on the fs
  -l | --logfile file           make fsck to complain to specifed file
  -n | --nolog                  make fsck to not complain
  -z | --adjust-size            fix file sizes to real size
  -q | --quiet                  no speed info
  -y | --yes                    no confirmations
  -V                            prints version and exits
  -a and -p                     some light-weight auto checks for bootup
  -f and -r                     ignored
Expert options:
  --no-journal-available        do not open nor replay journal
  -S | --scan-whole-partition   build tree of all blocks of the device
``` 
- KO! 经过检测,恢复目录树,再小心检查其它目录,没有隐患...
- reboot! 熟悉的界面回来了,没有任何不稳....



= 经验.教训 =
+ 在GNU/Linux 中千万别慌!一切都有着的！
+ 不论作者如何``ReiserFS`` 绝对是个人用户的守护神哪！
+ 不论多没可能使用，系统的DVD 光盘一定要带在身边！特别是Ubuntu 系统安装DVD，紧急情况下可以作为LiveCD 直接进行工作的！



------------------------------
- t2t渲染:: %%date(%Y-%m-%d %I:%M:%S)
- 动力源自::**[txt2tags http://txt2tags.sf.net]**

% Leo 4.7.1 final, build 3005: 编辑


[/pybimage/technorati-over.gif]
    ,[OpenSource http://www.technorati.com/tags/OpenSource]
    ,[Ubuntu http://www.technorati.com/tags/Ubuntu]

