2009年10月21日 星期三

ubuntu 9.04(jaunty)升級至9.10(karmic)


今天心血來潮,索性把ubuntu 9.04升級到9.10,沒考慮太多,所以不怕危險的話,就彷下面步驟升級吧。
  1. 修改/etc/apt/sources.list,把裏面的jaunty改成karmic
  2. apt-get update
  3. apt-get dist-upgrade

重開機後就完成啦。

cachefilesd


由debian的說明,來看
FSCache is a generic caching manager in the Linux kernel which can be used by network and other filesystems to cache data locally. 
FSCache是linux kernel中一個通用的cache管理者,用於管理網路和其他檔案系統的cache。 

CacheFiles is an FSCache backend that's meant to use as a cache a directory on an already mounted filesystem of a local type (such as Ext3). This package installs the userspace support required by the cachefiles backend. 
在ubuntu中即便安裝了cachefilesd,nfs還是無法使用cache機制,所以要重先編譯一下kernel module。將CONFIG_NFS_FSCACHE=y才能讓nfs支援cachefilesd。
而cache所在的partition必須是ext3或ext4並支援user_xattr屬性:
 tune2fs -o user_xattr /dev/sdaX
 sudo mount /var/cache/fscache

接著將修改/etc/cachefilesd.conf(或者使用預設值)。
當要mount nfs時,必須-o fsc告訴kernel這個nfs要使用cache機制。
 sudo mount -o fsc 10.0.100.11:/opt /opt

心得: 由於常用的是compile程式,大量的小檔讀寫,使用cache並沒有帶來好處。



2009年10月19日 星期一

quota無法正常在ubuntu 9.04上的ext4運作


這是ubuntu 9.04上package的bug,下載9.10的套件裝就好啦,here
brook@ubuntu1:~$ wget http://kr.archive.ubuntu.com/ubuntu/pool/main/q/quota/quota_3.17-3ubuntu1_i386.deb
--2009-10-19 16:09:14--  http://kr.archive.ubuntu.com/ubuntu/pool/main/q/quota/quota_3.17-3ubuntu1_i386.deb
Resolving kr.archive.ubuntu.com... 143.248.234.110
Connecting to kr.archive.ubuntu.com|143.248.234.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 473516 (462K) [application/x-debian-package]
Saving to: `quota_3.17-3ubuntu1_i386.deb'

100%[======================================>] 473,516      490K/s   in 0.9s

2009-10-19 16:09:17 (490 KB/s) - `quota_3.17-3ubuntu1_i386.deb' saved [473516/473516]

brook@ubuntu1:~$ sudo dpkg --purge quota
(Reading database ... 112680 files and directories currently installed.)
Removing quota ...
 * Turning off quotas...                                                 [ OK ]
 * Stopping quota service rpc.rquotad                                    [ OK ]
Purging configuration files for quota ...
Processing triggers for man-db ...
brook@ubuntu1:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
brook@ubuntu1:~$ sudo dpkg -i quota_3.17-3ubuntu1_i386.deb
Selecting previously deselected package quota.
(Reading database ... 112624 files and directories currently installed.)
Unpacking quota (from quota_3.17-3ubuntu1_i386.deb) ...
Setting up quota (3.17-3ubuntu1) ...
 * Checking quotas...
                                                                         [ OK ]
 * Turning on quotas...                                                  [ OK ]
 * Starting quota service rpc.rquotad                                    [ OK ]

Processing triggers for man-db ...
brook@ubuntu1:~$ sudo mount -o remount /home
[sudo] password for brook:

熱門文章