]
トップ «前の日記(2004-11-28) 最新 次の日記(2004-11-30)» 編集

Yukiharu YABUKI の tDiary



このtDiaryを検索します。

2004-11-29 [長年日記]

_ 天気

はれ

_ あさごはん

ササノ・ベーカリーにて,ツナサンド, クリームパン

_ scan

lab247.ee.auth.gr から.

_ xchatが

最近
yab@hrestol:~/plum$ The program 'xchat' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 15744916 error_code 1 request_code 0 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
といってたまに落ちるのでloquiを試してみる.

_ [Debian] quota

ikuya氏のribbon(Debian woody)にアカウントを作ってもらう.ooo-build(Debian Sarge)でメインの検証.

_ おひる

きょうも はがくれ でした. 天おろし うどん.私がかかえているアンビバレンツの心を叶えてくれる.

_ [Debian] qouta(2)

OOo-build:~# apt-get install quota quotatool 
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  quota quotatool
0 upgraded, 2 newly installed, 0 to remove and 46 not upgraded.
Need to get 436kB of archives.
After unpacking 1204kB of additional disk space will be used.
Get:1 http://ggl.good-day.net sarge/main quota 3.12-3 [419kB]
Get:2 http://ggl.good-day.net sarge/main quotatool 1.4.4-1 [16.6kB]
Fetched 436kB in 0s (766kB/s)  
Preconfiguring packages ...
Selecting previously deselected package quota.
(Reading database ... 33877 files and directories currently installed.)
Unpacking quota (from .../archives/quota_3.12-3_i386.deb) ...
Selecting previously deselected package quotatool.
Unpacking quotatool (from .../quotatool_1.4.4-1_i386.deb) ...
Setting up quota (3.12-3) ...
 
Setting up quotatool (1.4.4-1) ...
OOo-build:~# 

_ quota(3)

AA
 +------------+                      +-----------------+
 |ooo-build   |                      |hrestol          |
 +------------+                      +-----------------+
 |Disk        |                      |                 |
 | quota [rpc.rquotad] -------------- [quotaコマンド]  |
 | NFS Server  ======================= NFS client      |
 +------------+                      +-----------------+

_ [Debian] rpc.rquotad

というのがある /etc/init.d/quotarpc から起動できる.設定前なので,こんな感じ
OOo-build:/usr/share/doc/quota# /etc/init.d/quotarpc start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ NAME=rpc.rquotad
+ DESC=quota service
+ DAEMON=/usr/sbin/rpc.rquotad
+ test -f /etc/exports
+ grep -q '^[^#]*quota' /etc/fstab
+ need_rquotad=0
+ test -f /usr/sbin/rpc.rquotad
+ test -f /etc/default/quota
+ . /etc/default/quota
++ run_warnquota=true
+ set -e
+ '[' -x /usr/sbin/rpc.rquotad ']'
+ '[' 0 = 1 ']'
+ exit 0
テスト機はこんな構成 cfdiskの出力なので単位はMBです.
 hda1 Primary Linux ext2       131.61         
 hda3 Primary Linux ext2      5996.23         
 hda4 Primary Linux ext2     53382.07         
 hda5 Logical Linux swap       509.97         
vi /etc/fstab
/dev/hda4       /home   ext2    defaults                        0       2
/dev/hda4       /home   ext2    defaults,usrquota,grpquota      0       2
上記の行を下記の行に変更した.で次のステップ
OOo-build:~# cd /home/
OOo-build:/home# ls
ikuya  lost+found  shutta  yabuki
OOo-build:/home# touch quota.user quota.group
OOo-build:/home# ls -la
total 36
drwxrwsr-x   6 ikuya  ikuya   4096 Nov 29 16:06 .
drwxr-xr-x  21 root   root    4096 Nov  5 13:13 ..
drwxr-xr-x  34 ikuya  ikuya   4096 Nov 29 13:20 ikuya
drwx------   2 ikuya  ikuya  16384 Feb 29  2004 lost+found
-rw-r--r--   1 root   ikuya      0 Nov 29 16:06 quota.group
-rw-r--r--   1 root   ikuya      0 Nov 29 16:06 quota.user
drwxr-xr-x   2 ikuya  ikuya   4096 Sep  7 18:31 shutta
drwxr-xr-x   2 yabuki yabuki  4096 Nov 29 13:21 yabuki
OOo-build:/home# chmod 600 quota.user quota.group
OOo-build:/home# quotacheck -avug
quotacheck: Can't find filesystem to check or filesystem not mounted with quota option.
OOo-build:/home# sync
OOo-build:/home# 
マウントをやりなおして,quotacheck -avug を実行.チェックが終了するのにコーヒーを飲む時間ぐらいかかった.
OOo-build:/home# sync
OOo-build:/home# mount /home/
mount: /dev/hda4 already mounted or /home busy
mount: according to mtab, /dev/hda4 is already mounted on /home
OOo-build:/home# mount -o remount  /home/
OOo-build:/home# quotacheck -avug
quotacheck: WARNING - Quotafile /home/quota.user was probably truncated. Can't save quota settings...
quotacheck: WARNING - Quotafile /home/quota.group was probably truncated. Can't save quota settings...
quotacheck: Scanning /dev/hda4 [/home] done
quotacheck: Checked 99957 directories and 1148885 files
OOo-build:/home# 
ということで,quotarpcデーモンを動かしてみる
OOo-build:/home# /etc/init.d/quotarpc start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ NAME=rpc.rquotad
+ DESC=quota service
+ DAEMON=/usr/sbin/rpc.rquotad
+ test -f /etc/exports
+ grep -q '^[^#]*quota' /etc/fstab
+ grep -q '^/' /etc/exports
+ need_rquotad=1
+ test -f /usr/sbin/rpc.rquotad
+ test -f /etc/default/quota
+ . /etc/default/quota
++ run_warnquota=true
+ set -e
+ '[' -x /usr/sbin/rpc.rquotad ']'
+ '[' 1 = 1 ']'
+ echo -n 'Starting quota service: '
Starting quota service: + start-stop-daemon --start --quiet --exec /usr/sbin/rpc.rquotad --
+ echo rpc.rquotad.
rpc.rquotad.
+ exit 0
OOo-build:/home# 
クライアントの方からも,反応が返るようになりました.設定前
yab@hrestol:~$ quota
quota: : error while getting quota from ooo-build.exsample.com:/home/ikuya for 1000: 接続を拒否されました
設定後
yab@hrestol:~$ quota
Disk quotas for user yab (uid 1000): none
yab@hrestol:~$ 
ここで,チョットだけ確認:わたしのhrestolでのuidは,
yab@hrestol:~$ id
uid=1000(yab) gid=1000(yab) 所属グループ=1000(yab),0(root),4(adm),6(disk),24(cdrom),25(floppy),29(audio),40(src),50(staff),100(users),109(uml-net)
です.これに対応するooo-buildでのuid=1000は,/etc/passwdで確認した所,yabukiでした.
yabuki@OOo-build:~$ id
uid=1000(yabuki) gid=1000(yabuki) groups=1000(yabuki)
だったが,テストの都合上 /etc/groupsを見て,vipwを実行してgroupをstaff(50)へ変更した.
edquota -u yabuki
ooo-build側は
Disk quotas for user yabuki (uid 1000):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/hda4                    531504          0          0       7025        0        0
Disk quotas for user yabuki (uid 1000):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/hda4                    531504          0          0       7025       20       25
としてみた.(わざと,超過させてみた)
yab@hrestol:~$ quota 
Disk quotas for user yab (uid 1000): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace ooo-build.exsample.com:/home/ikuya
                 531504       0       0            7025*     20      2
OOo-build:/home# repquota -a
*** Report for user quotas on device /dev/hda4
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
ikuya     -- 23845752       0       0        1241814     0     0       
yabuki    -+  531504       0       0           7025    20    25  6days
次は直したもの
Disk quotas for user yabuki (uid 1000):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/hda4                    531504          0          0       7025     7035     7045
OOo-build:/home# repquota -a
*** Report for user quotas on device /dev/hda4
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
ikuya     -- 23845752       0       0        1241814     0     0       
yabuki    --  531504       0       0           7025  7035  7045       
Userの次の -+が--になったり,graceにカウントダウンがなくなったりと気が付かれた人も多いと思う.

_ quota -t

default が,7days なので,極端な値として, quota -ug -t で1secondsを設定

_ 大切なことを忘れていた.

/etc/init.d/quota start

_ 21:15

天王寺