ReiserFS套件更新
下載套件:yum install reiserfs-utils
格式化:mkfs.reiserfs -qf /dev/game/king
掛載:mount -t reiserfs /dev/game/king /home/king
===========================================
建立LVM
建立PV: pvcreate /dev/hdb /dev/hdc
建立VG:vgcreate game /dev/hdb /dev/hdc
建立LV:lvcreate -L 40G -n king game
格式化:mkfs.reiserfs -qf /dev/game/king
掛載: mount -t reiserfs /dev/game/king /home/king
目錄權限:chmod 777 /home/king
===========================================
/opt/login.sh
#!/bin/bash
SNAPNAME=$1
umount /home/share/$SNAPNAME
rmdir /home/share/$SNAPNAME
lvremove -f /dev/game/$SNAPNAME
lvcreate -L2000M -s -n $SNAPNAME /dev/game/king
mkdir /home/share/$SNAPNAME
mount /dev/game/$SNAPNAME /home/share/$SNAPNAME
chmod 777 /home/share/$SNAPNAME
===========================================
smb.conf
[share$]
path = /home/share/%m
root preexec = /opt/login.sh %m #%m=電腦名稱
vfs objects = shadow_copy
oplocks = yes
level2 oplocks = yes
share modes = yes
browseable = no
public = yes
writable = yes
create mode = 0777
directory mode = 0777
veto oplock files = /*.ldb/*.dat/
[king$]
path = /home/king
browseable = no
public = yes
writable = yes
create mode = 0777
directory mode = 0777
veto oplock files = /*.ldb/*.dat/
===========================================
2007年10月11日 星期四
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言