Wed, 23 Apr 2008

[1] 2 3 4 5 6  >>

:: 文件系统选择

文件系统选择

1. Solaris 的FS决择

节译:Solaris Filesystem Choices 50%

OpenSolaris 10 已经给用户提供了一大堆存储相关的支持,而且秉承UNIX的一贯习俗, 都是经过严格测试了的,这里就四种通用文件系统进行分析,希望可以就部署方面给读者提供足够的信息以便最终选择:

1.1. UFS

UFS 忒有历史凫,从80年代开始就是BSD等UNIX系統的默认FS; 类似于 ext3 在 GNU/Linux 体系中的地位; Solaris 中的UFS来自 SunOS,而SunOS 中的UFS来自 BSD;

不久前,UFS还是Solaris 中唯一的FS,不同于HP, IBM, SGI, 以及 DEC; SUN直到90年代也没有自主发展下一代的FS; 原因有两:

  1. 多数情况下开发者需要第三方代码来支持新FS,而这需要许可
  2. 多数可以交易来的FS都是 Veritas 许可的(嘛意思?)

Solaris10 只能从UFS启动,未来将允许从ZFS启动;在OpenSolaris 已经可以了; 但是当前,所有Solaris 还是得至少有一个UFS分区;

UFS虽然是个技术,但是贵在稳定和足够快; 而且Sun 在其最后基础上进行了多方的优化; 从Solaris 7 开始支持日志,进入本世纪,从Solaris 9 开始成为了默认特性; 原先卷級日志是种效率不好的模型,但是有趣的是FreeBSD又重新加入了这种特性.

UFS已经加入了对RAID支持良好的Solaris卷管理.

2008UFSd准备进行什么修订? 除作启动之外,UFS足够好用了,将来可由ZFS替代, 当然看,UFS 对于数据库是个好选择(有普遍的基于文件系统权限控制的DB); 同时对于保守的有固定工作且不想花时间太多时间配置的SA也是个好选择;

1.2. ZFS

对ZFS 已经有N多报道了,同时也收到了从Linux 阵营习惯性的嘲笑.

ZFS 不是魔法,但是足够COOL 了. 我喜欢将 UFS/ext3 视作首代UNIX文件系统, 而 VxFS和XFS 视作二代FS, 那未 ZFS 就是第一个三代UNIX FS!

ZFS已不仅仅是个文件系统了. 实际算是混合文件系统+卷管理器. 以上功能的集成赋予了ZFS极大的灵活性. 同时也是著名的"rampant layering violation"来源. 不过千万记住,这只是开发特性.我从来没有在打开文件时见过"layering violation"

ZFS的混合意味着你可以管理不同传统方案中的存储. 你能将文件系统映射到分区,同时可以将另一个映射成逻辑巻,每个逻辑巻又涉及一个或是多个硬盘. 在ZFS 中所有硬盘分配在一个存储池中. 每个ZFS文件系统从池中使用所有硬盘,且文件系统不分卷,可以使用全部空间. 这样没有重定分区大小的烦恼,一切是自动调整的, 不断增长/收缩的文件系统不是靠谱的管理方式。

ZFS同时在文件系统级别提供了可靠性检验. 所有数据读/写都可以使用认证(提供了最严厉的SHA256), 失败时双备份是支持的(元数据是在单一硬盘,而数据是经典的RAID结构),

ZFS provides the most robust error checking of any filesystem available. All data and metadata is checksummed (SHA256 is available for the paranoid), and the checksum is validated on every read and write. If it fails and a second copy is available (metadata blocks are replicated even on single disk pools, and data is typically replicated by RAID), the second block is fetched and the corrupted block is replaced. This protects against not just bad disks, but bad controllers and fibre paths. On-disk changes are committed transactionally, so although traditional journaling is not used, on-disk state is always valid. There is no ZFS fsck program. ZFS pools may be scrubbed for errors (logical and checksum) without unmounting them.

The copy-on-write nature of ZFS provides for nearly free snapshot and clone functionality. Snapshotting a filesystem creates a point in time image of that filesystem, mounted on a dot directory in the filesystem's root. Any number of different snapshots may be mounted, and no separate logical volume is needed, as would be for LVM style snapshots. Unless disk space becomes tight, there is no reason not to keep your snapshots forever. A clone is essentially a writable snapshot and may be mounted anywhere. Thus, multiple filesystems may be created based on the same dataset and may then diverge from the base. This is useful for creating a dozen virtual machines in a second or two from an image. Each new VM will take up no space at all until it is changed.

These are just a few interesting features of ZFS. ZFS is not a perfect replacement for traditional filesystems yet - it lacks per-user quota support and performs differently than the usual UFS profile. But for typical applications, I think it is now the best option. Its administrative features and self-healing capability (especially when its built in RAID is used) are hard to beat.

1.3. SAM and QFS

SAM and QFS are different things but are closely coupled. QFS is Sun's cluster filesystem, meaning that the same filesystem may be simultaneously mounted by multiple systems. SAM is a hierarchical storage manager; it allows a set of disks to be used as a cache for a tape library. SAM and QFS are designed to work together, but each may be used separately.

QFS has some interesting features. A QFS filesystem may span multiple disks with no extra LVM needed to do striping or concatenation. When multiple disks are used, data may be striped or round-robined. Round-robin allocation means that each file is written to one or two disks in the set. This is useful since, unlike striping, participation by all disks is not needed to fetch a file - each disk may seek totally independently. QFS also allows metadata to be separated from data. In this way, a few disks may serve the random metadata workload while the rest serve a sequential data workload. Finally, as mentioned before, QFS is an asymmetric cluster filesystem.

QFS cannot manage its own RAID, besides striping. For this, you need a hardware controller, a traditional volume manager, or a raw ZFS volume.

SAM makes a much larger backing store (typically a tape library) look like a regular UNIX filesystem. This is accomplished by storing metadata and often-referenced data on disk, and migrating infrequently used data in and out of the disk cache as needed. SAM can be configured so that all data is staged out to tape, so that if the disk cache fails, the tapes may be used like a backup. Files staged off of the disk cache are stored in tar-like archives, so that potentially random access of small files can become sequential. This can make further backups much faster.

QFS may be used as a local or cluster filesystem for large-file intensive workloads like Oracle. SAM and QFS are often used for huge data sets such as those encountered in supercomputing. SAM and QFS are optional products and are not cheap, but they have recently been released into OpenSolaris.

1.4. VxFS

The Veritas filesystem and volume manager have their roots in a fault-tolerant proprietary minicomputer built by Veritas in the 1980s. They have been available for Solaris since at least 1993 and have been ported to AIX and Linux. They are integrated into HP-UX and SCO UNIX, and Veritas Volume Manager code has been used (and extensively modified) in Tru64 UNIX and even in Windows. Over the years, Veritas has made a lot of money licensing their tech, and not because it is cheap, but because it works.

VxFS has never been part of Solaris but, when UFS was the only option, it was a popular addition. VxVM and VxFS are tightly integrated. Through vxassist, one may shrink and grow filesystems and their underlying volumes with minimal trouble. VxVM provides online RAID relayout. If you have a RAID5 and want to turn it into a RAID10, no problem, no downtime. If you need more space, just convert it back to a RAID5. VxVM has a reputation for being cryptic, and to some extent it is, but it's not so bad and the flexibility is impressive.

VxFS is a fast, extent based, journaled, clusterable filesystem. In fact, it essentially introduced these features to the world, along with direct IO. Newer versions of VxFS and VxVM have the ability to do cross-platform disk sharing. If you ever wanted to unmount a volume from your AIX box and mount it on Linux or Solaris, now you can.

VxFS and VxVM are still closed source. A version is available from Symantec that is free on small servers, with limitations, but I imagine that most users still pay. Pricing starts around $2500 and can be shocking for larger machines. VxFS and VxVM are solid choices for critical infrastructure workloads, including databases.

2. 结论

Conclusion

These are the four major choices in the Solaris on-disk filesystem world. Other filesystems, such as ext2, have some degree of support in OpenSolaris, and FUSE is also being worked on. But if you are deploying a Solaris server, you are going to be using one or more of these four. I hope that you enjoyed this overview, and if you have any corrections or tales of UNIX filesystem history, please let me know.

About the Author

John Finigan is a Computer Science graduate student and IT professional specializing in backup and recovery technology. He is especially interested in the history of enterprise computing and in Cold War technology.

3. TODO


动力源自::txt2tags

,OpenSource ,Ubuntu

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Mon, 21 Apr 2008

[1] 2 3 4 5 6  >>

:: FF3

FF3

1. FF3

看周围M$ 用户都主动升迁到 FF2.0.0.14 超级稳定版本了,

但是Ubuntu7.10 的源中依然是 2.0.0.13+,有点郁rz..

1.1. SwiftFox 3.0pre

不过 SwiftFox 已到了 3.0pre! 通过 apt 立即可以使用:

1.2. 探查

但是插件不能使用Nightly Tester Tools 轻易全开... 使用 安全模式::

swiftfox -safe-mode
  • 关闭所有 扩展和插件后,逐一尝试,确认最小可用组合::

1.2.1. 配置

启用扩展: [16]

1.3. 成了!

开始快乐的使用!

. ;


动力源自::txt2tags

OpenSource ,Mozilla ,FireFox

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Tue, 15 Apr 2008

[1] 2 3 4 5 6  >>

:: Hardy Heron

Hardy Heron

1. 期待,但不等待

升级!需要理由嘛?

  • 不需要嘛?
    • 需要嘛?! ...

其实只是心理原因;-)
  • 7.10 使用非常舒服
  • 8.04 也没有ZFS哪
  • 考虑FreeBSD ing..
  • 不过,不跳票的 Ubuntu HH 还是非常想的,如果:
    • 字体更加好了
    • FF3支持所有主要插件了
    • 输入法默认是 bridge-scim 了
    • ...

      . ;

动力源自::txt2tags

,OpenSource ,Ubuntu

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Mon, 22 Oct 2007

[1] 2 3 4 5 6  >>

:: FF2GG

FF2GG

1. 很好,很强大!

升级!需要理由嘛?

  • 不需要嘛?
    • 需要嘛?! ...

其实因为忍不住哪!
  • 19号下载到CD版本的,
  • 当天HP 520(GQ349AA)也配发到手里
  • 为了20号的会课先忍了一下
  • 21号回来就说不得要安装,将原先的 红旗Linux 洗掉~瞧着尽力伪装成M$ 的樣子就想吐

1.1. 流水

硬盘:
  • 原来以为是简单的先清后win2k3 再Ubuntu 的事儿,结果,没有那么简单!
  • 不删除 红旗,win2k3 不认硬盘,使用Ubuntu Alternate 分区重写后,依然!
  • 罢了,直接来!
  • Ubuntu 7.10 GG 的Alternate 好象不完整在安装到89%时报错退出!
  • 只有使用 Ubuntu 7.04 FF 的DVD 先安装成功,然后升级了 ;(

分区,最终规划:
  • 其中前200Mb 有问题,无法格式化,只好让掉... . ;
升级:
  • 通过Alternate CD升级,1小时50分钟,也下载了将近100Mb的东西,平顺完成!
  • 很智能,将原先的一些定制源也都自动替换成了 GG 的!!

1.2. 惊喜

SETI@home:
  • 直接包含在源中了!
    :~$ acs boinc
    boinc-app-seti - SETI@home application for the BOINC client
    boinc-client - core client for the BOINC distributed computing infrastructure
    boinc-dbg - debugging symbols for BOINC binaries
    boinc-dev - development files to build applications for BOINC projects
    boinc-manager - GUI to control and monitor the BOINC core client
    kboincspy - monitoring utility for the BOINC client
    kboincspy-dev - development files for KBoincSpy plugins
    .
    

3D特效:
  • 内置的非常足够 COOL 了!!

2. 结论

Ubuntu 越來越贴近用户的实际需求了,反应的快,强大的趋势明显

3. TODO

  1. WiFi 怎么也不能连接到公司的AP中,研究中;家里的 6.06 也得整了...p2p下载已经停了些日子了...
  2. VBox 带个能用网银的系统,也得整! 不想再多系统启动了,就Ubuntu!
  3. XFS 是个蒙事儿的主,还是得经典的FS才成哪! 周末准备回写成 ReiserFS

动力源自::txt2tags

,OpenSource ,Ubuntu

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Mon, 15 Oct 2007

[1] 2 3 4 5 6  >>

:: SVN 无法识别的url方案

SVN 无法识别的url方案

1. 现象

突然之间访问不能:
svn: 无法识别的URL方案(一般需要svn://,http://,file://等开头)
“http://svn.rdev.kingsoft.net/kdoc/tangle/KsPIG/Zoom.Quiet/S5”

1.1. 原因

根据:
  • http://blog.yesky.com/223/sxy519/1716723.shtml 建议的一看才知道...
    $ svn --version
    svn,版本 1.4.3 (r23084)
       编译于 Oct 12 2007,13:28:55
    
    版权所有 (C) 2000-2007 CollabNet。
    Subversion 是开放源代码软件,请参阅 http://subversion.tigris.org/
    此产品包含由 CollabNet (http://www.Collab.Net/)开发的软件。
    
    可使用以下的仓库存取 (RA) 模块:
    
    * ra_svn : 使用svn网络协议访问仓库的模块。
      - 处理“svn”方案
    * ra_local : 访问本地磁盘的仓库模块。
      - 处理“file”方案
    
  • FT! Ubuntu自动升级时,没有完整的升级SVN哪!

1.2. 解决

使用新立得:
  • 重新安装SVN 相关所有
  • 问题依然...
编译!
  • GNU/Linux 下面一般就这板斧招了!
    $ wget -c http://subversion.tigris.org/downloads/subversion-deps-1.4.5.tar.bz2 &
    $ wget -c http://subversion.tigris.org/downloads/subversion-1.4.5.tar.bz2 &
    $ tar xjvf subversion-1.4.5.tar.bz2 
    $ tar xjvf subversion-deps-1.4.5.tar.bz2 
    $ cd subversion-1.4.5
    $ ./configure
    $ make
    $ sudo make install clean
    ...
    
  • FT!!怎么还是没有ra_dav模块?!
    $ whereis svn
    svn: /usr/bin/svn /usr/X11R6/bin/svn /usr/bin/X11/svn /usr/local/bin/svn /usr/share/man/man1/svn.1.gz
    $ /usr/local/bin/svn --version
    svn,版本 1.4.5 (r25188)
       编译于 Oct 15 2007,11:03:39
    
    版权所有 (C) 2000-2007 CollabNet。
    Subversion 是开放源代码软件,请参阅 http://subversion.tigris.org/
    此产品包含由 CollabNet (http://www.Collab.Net/)开发的软件。
    
    可使用以下的仓库访问模块: 
    
    * ra_dav : 通过WebDAV(DeltaV)协议访问仓库的模块。
      - 处理“http”方案
    * ra_svn : 使用svn网络协议访问仓库的模块。
      - 处理“svn”方案
    * ra_local : 访问本地磁盘的仓库模块。
      - 处理“file”方案
    
解决:
  • 原来默认的/usr/bin/svn 还是原先安装的 1.4.3 版本
  • 手工处理一下
    $ sudo mv /usr/bin/svn /usr/bin/svn143
    $ sudo ln -s /usr/local/bin/svn /usr/bin/svn
    
  • 哗,世界恢复正当!

1.3. 心得

  1. 确认现象
  2. 搜索资料
  3. 编译
  4. 测试调整

    嗯嗯嗯~自由世界中的不二法典哪!解决问题的...

动力源自::txt2tags

OpenSource ,Subversion

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Fri, 15 Jun 2007

[1] 2 3 4 5 6  >>

:: 文件系统惊魂

文件系统惊魂

1. 事件

* Mounting local filesystem....

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

1.1. 处理

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

1.2. fsck

  • 幸好随身带着Ubuntu 的DVD!
  • 启动进入后:
    $sudo su -
    #ls /dev | grep sda
    sda 
    ...
    sda11
    
  • 幸好重装机器时详细的记录了分区信息:
  • 所以优先檢查对启动有影响的 /; /usr ;/home

1.3. 幸运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! 熟悉的界面回来了,没有任何不稳....

2. 经验.教训

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

动力源自::txt2tags

,OpenSource ,Ubuntu

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT

Fri, 11 May 2007

[1] 2 3 4 5 6  >>

:: 从Dapper到Feisty 的征程

从Dapper到Feisty 的征程

1. 为什么要升级

升级!需要理由嘛?

  • 不需要嘛?
    • 需要嘛?! ...

其实俺是被廹的...
  • 原本Dapper 使用的非常的好,而且进行了巨量的配置,根本不想升级的
  • 但是,人在江湖身不由已哪...
    E: Problem with MergeList /var/lib/apt/lists/ \
        ubuntu.cn99.com_ubuntu-cn_dists_dapper_main_binary-i386_Packages
    E: 无法解析或打开软件包的列表或是状态文件。
    
  • 这种软件包重新时的错误已经烦了快一个月了
  • 为了稳定高效的考虑,还是要升级
而且!

2. 升级?!

但是!

3. 重装升级!

幸好相关DVD早就准备好,而且对于分区也有万全的策略,重装非常顺畅

3.1. 流水

  1. 重启,安装!值得注意的是将分区根据过往使用体验进一步合理化:
  2. 50分钟快速从DVD 就安装完成了Gnome 环境,因为保存了/home以及/opt目录,90%的定制就继承了下来,笑;-)
  3. 重新进入桌面后进行后期定制,1小时以内恢复工作状态:
    1. 更新源
      # beryl release
      ### wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
      deb http://ubuntu.beryl-project.org feisty main
      deb-src http://ubuntu.beryl-project.org feisty main
      
      ### zoomq::070510 for ies4linux
      # wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
      deb http://us.archive.ubuntu.com/ubuntu feisty universe
      deb http://wine.budgetdedicated.com/apt feisty main
      
      # 电信用户首选国内源--cn99!
      deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
      deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
      deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
      deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
      deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
      deb-src http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
      deb-src http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
      deb-src http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
      deb-src http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
      deb-src http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
      
    2. sudo 化:
      #修订/etc/sudoers 相关行为
      %admin ALL=(ALL) NOPASSWD:ALL
      
    3. 显示及数字板支持:WACOM,915resolution 都是源自有的,直接安装就好
    4. 字体美化!

      . ;
    5. SCIM 配置并加载最爱的zqBXM2006
    6. 多媒体配置,安装最爱的 mocp^在命令行播放音乐^ + mplayer^全能媒体播放^ 立即就可以恢复音乐背景环境了! . ;

KO!其它的就可以随用随装了,已经可以投入到无限的为人民服务的日常生活中了,是也乎^__^

3.2. 惊喜

  1. Gnome 2.18.1 果然强悍的多,不用什么 Xfce4 ,本身就非常快速了...
  2. 默认是Python2.5了! 而且配合的Tk8.4 居然也可以支持中文输入了 . ;
    • 单为这,也值得重装了哪!
  3. 另外 inkscape 也终于可以保存了 -- crash in dapper when read file
  4. 最大的惊喜是桌面特效的稳定丰富爽直的获取!
  5. 终于可以正常挂起了!
    • 不过,默认配置,笔记本屏幕关上后过段时间就会关闭显示,而且无法重新激活!
    • 基于前人的经验 Thinkpad上安装Ubuntu笔记配置后问题依然
    • 最后使用Ctrl+Alt+l 手工锁屏幕就好
    • 另外电源配置时使用 挂起

3.2.1. 但是...

键盘布局
  • 但是,没有左边的Alt,Ctrl 支持...

多媒体支持:
  • 著名的w32codes 最终还是从源里清除了...
  • 有人贡献了经验:ubuntu 7.04 下播放rm
  • 快速解决之!

字体惊魂
  • 原先以上的字体设定是为了追求象OSX环境,结果发现有中文标点被显示为类似阿位伯文字的现象
  • 又受到友人蛊惑尝试黑体解决方案
  • 结果X 都启动不起来了
  • 寒了半天恢复后,发现被Session 过的程序菜单都出不来了,折腾半天才发现,不能使用字体配置中的LCD 专用配置!! 最好的配置如下

4. 结论

GNU/Linux 下面的重装和M$的重装云泥之差哪!

  • 没有注册表,都是配置文件,只要配置文件在,一切都在
  • 没有分区,只有目录,只要系统是同一系列的,各种软件都在固定的地方,不用重新配置什么,重装后,原先的配置直接可用!
  • 但是!毕竟每个发行版本以及自个儿的定制差别是极其大的,每周积累的升级也是非常多的,不破不立,该重装时就重装!

动力源自::txt2tags

,OpenSource ,Ubuntu

[1] 2 3 4 5 6  >>
::Wed, 23 Apr 2008 13:43 GMT
[PyBlosxom]1.4.3 01/10/2008 | [Python] | [FreeBSD] | [Apache]
一切内容使用
Creative Commons License
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License .