[置顶] 关于 Btrfs 的一些概念和约定

摘要: https://btrfs.wiki.kernel.org/index.php/Data_Structures https://btrfs.wiki.kernel.org/index.php/File:References.pnghttps://btrfs.wiki.kernel.org/index.php/Treeshttps://btrfs.wiki.kernel.org/index.php/File:Directory-structure.pngBtrfs Terms https://btrfs.wiki.kernel.org/index.php/GlossaryDUP DUP... 阅读全文

posted @ 2012-12-03 11:09 refrag 阅读(1195) 评论(0) 推荐(0) 编辑

2012年12月29日

linux-raid (二) faulty 和 multipath

摘要: 源文件 linux/drivers/md/faulty.c linux/drivers/md/multipath.h linux/drivers/md/multipath.clinux-raid 之 faulty个人对它兴趣不大,这里简单记录一下介绍。faulty 模块实现了 fautly-device-simulator personality for md: The "faulty" module allows for a block device that occasionally returns read or write errors. It is useful 阅读全文

posted @ 2012-12-29 13:24 refrag 阅读(1759) 评论(0) 推荐(2) 编辑

2012年12月27日

linux-raid (一) md

摘要: 源文件 linux/include/uapi/linux/raid/md_p.h linux/include/uapi/linux/raid/md_u.h linux/drivers/md/md.h linux/drivers/md/md.cmd 是 multiple devices 的缩写,实现了 MD RAID Framework。它将 RAID drivers 跟上层的 block layer 连接在一起,这样可以通过 block layer 访问到底层的 RAID drivers,比如 RAID1/RAID5 driver。同时它作为一个 RAID driver 之上的抽象层,... 阅读全文

posted @ 2012-12-27 23:32 refrag 阅读(6196) 评论(1) 推荐(2) 编辑

2012年12月22日

linux-raid (四) raid0

摘要: 源文件 linux/src/drivers/md/raid0.h linux/src/drivers/md/raid0.c linux/src/drivers/md/md.h linux/src/drivers/md/md.cRAID 0 是将数据分散存放到不同磁盘上,比如有 8 个数据块大小的数据,同时有 2 块同样大小的磁盘,这 8 块数据会将 1,3,5,7 存放到第 1 块盘上,其他数据块存放到第 2 块磁盘上。如果两块盘大小不一样,则每块盘会使用最小磁盘大小的空间;最后单独使用余下盘上的空间。RAID 0 没有冗余,1 块盘坏掉,数据也就丢失了。mdadm --create ... 阅读全文

posted @ 2012-12-22 00:48 refrag 阅读(2410) 评论(0) 推荐(1) 编辑

2012年12月20日

linux-raid (三) linear mode

摘要: 源文件 linux/drivers/md/md.h linux/drivers/md/md.c linux/drivers/md/linear.h linux/drivers/md/linear.clinear raid 是将一组盘组成一个虚拟的大磁盘,写的时候,先往一块盘上写,写满之后再写另一块盘。linear raid 没有纠错机制,坏掉一块盘,这个 raid 盘就坏掉了。写时的性能有可能会有提高,比如,写的数据分布在不同盘上。linear/raid0 不支持 spare disks,也不使用 bitmap;不支持 takeover。mdadm --create /dev/mdX ... 阅读全文

posted @ 2012-12-20 21:04 refrag 阅读(2423) 评论(0) 推荐(1) 编辑

2012年12月13日

开始接触 Pexpect

摘要: http://www.noah.org/wiki/pexpect最近有些时间,就想把一部分工作自动化掉,这部分工作很大一部分是需要处理交互的。一直没有看过 Expect,打算趁这个机会系统学习一下。个人一直喜欢用 Python,就想学习 Python 版本的 Expect —— Pexpect。一开始以为 Pexpect 就是在 Expect 基础上封装出来的接口,读了介绍性文档后发现自己想错了:Pexpect is pure Python. Unlike other Expect-like modules for Python Pexpect does not require TCL or 阅读全文

posted @ 2012-12-13 09:40 refrag 阅读(444) 评论(0) 推荐(0) 编辑

2012年12月5日

关于 Btrfs 中的 RAID1 —— 了解 btrfs 的 raid1

摘要: https://btrfs.wiki.kernel.org/index.php?title=FAQhttps://btrfs.wiki.kernel.org/index.php?title=SysadminGuidehttp://marc.info/?l=linux-btrfs&m=132575546926358&w=2邮件列表里面有个比较有意思的话题: Why does Btrfs allow raid1 with mismatched drives?把里面的讨论和 btrfs wiki 中关于 RAID1 的解释总结了一下: * 创建 mkfs.btrfs -m ra... 阅读全文

posted @ 2012-12-05 13:47 refrag 阅读(3497) 评论(1) 推荐(1) 编辑

2012年11月29日

使用 msmtp 配合 git 发送补丁邮件

摘要: 首先要确保 git-email 安装上: sudo apt-get install git-email设置好 msmtp 后,配置 git 使用 msmtp: git config --global sendemail.smtpserver /usr/bin/msmtp git config --global sendemail.chainreplyto false发送邮件 git send-email --to=XXX@example.com --to=XXX --cc=XXX NNN.patch发送多个 patch,通常会编辑一个起始的... 阅读全文

posted @ 2012-11-29 15:27 refrag 阅读(1219) 评论(0) 推荐(0) 编辑

2012年11月28日

Ubuntu 下使用 mutt 和 msmtp 发送 Gmail 邮件

摘要: 参考: http://www.habadog.com/2011/11/23/send-mail-with-msmtp-mutt-linux http://www.absolutelytech.com/2010/07/17/howto-configure-msmtp-to-work-with-gmail-on-linuxmsmtp 是一款专门负责邮件发送的客户端软件,基于GPL发布,支持TLS/SSL、DNS模式、IPv6、服务器端认证、多用户等特性。其主页是 msmtp.sourceforge.net: Msmtp is an SMTP client with a sendmail... 阅读全文

posted @ 2012-11-28 22:46 refrag 阅读(4504) 评论(0) 推荐(0) 编辑

关于 fstrim,btrfs 和 SSD

摘要: 翻了一下 btrfs 的邮件列表,看到一篇关于 fstrim on Btrfs 的讨论。里面讲的很多东西还不明白,先记录下来,以后深入了再回过头来看术语 wear leveling: http://en.wikipedia.org/wiki/Wear_levelling参考 fstrim on BTRFS: http://marc.info/?l=linux-btrfs&m=132509156511214&w=21. 分析了一下 fstrim 和 btrfs fs defrag/balance 的不同,以及 SSD 的一些特点在这些操作下带来的性能影响 Q: From:... 阅读全文

posted @ 2012-11-28 20:33 refrag 阅读(2936) 评论(0) 推荐(0) 编辑

导航