ext3格式下的quota的實現(轉)
ext3格式下的quota的實現(轉)[@more@] ext3是由開放資源社群開發的日誌檔案系統,ext3被設計成是ext2的升級版本,ext3在ext2的基礎上加入了記錄後設資料的日誌功能,努力保持向前和向後的相容性。這個檔案系統被稱為ext2的下一個版本。
ext3fs最大的優點是向下相容ext2,而且ext3fs還支援非同步的日誌,這意味著它的效能可能比ext2還好。但是使用ext3檔案系統時不支援磁碟限量功能。
red hat從kernel2.4.17-pre8以後支援ext3的磁碟quota,我選擇了更為穩定的kernel2.4.18來實現。
<1.原始檔>
kernel-2.4.18:
quota:
把檔案放在/home/src下
2-1-2)kernel升級過程:
#cd /home/src
#mkdir kernel_update
#cp ./linux-2.4.18.tar.gz ./kernel_update
#cd kernel_update
#tar zxvf linux-2.4.18.tar.gz
#cd linux
#make menuconfig
此時出現Linux Kernel v2.4.18 Configuration的視窗
Processor type and features --->
General setup --->
Memory Technology Devices (MTD) --->
Parallel port support --->
Plug and Play configuration --->
Block devices --->
Multi-device support (RAID and LVM) --->
Networking options --->
Telephony Support --->
ATA/IDE/MFM/RLL support --->
SCSI support --->
Fusion MPT device support --->
I2O device support --->
Network device support --->
Amateur Radio support --->
IrDA (infrared) support --->
ISDN subsystem --->
Old CD-ROM drivers (not SCSI, not IDE) --->
Input core support --->
Character devices --->
Multimedia devices --->
File systems --->
Console drivers --->
Sound --->
USB support --->
Kernel hacking --->
---
Load an Alternate Configuration File
Save Configuration to an Alternate File
以下都是kernel裡的選項,可以根據server硬體的不同自行選擇
與quota有關的設定如下
找到File systems ---> 的字樣 (第22行) 按空格鍵
把第一行的Quota support前打上*號
Quota support
Kernel automounter support
Kernel automounter version 4 support (also supports v3)
Reiserfs support
Ext3 journalling file system support (EXPERIMENTAL)
JBD (ext3) debugging support
DOS FAT fs support
Compressed ROM file system support
Virtual memory file system support (former shm fs)
Simple RAM-based file system support
ISO 9660 CDROM file system support
[ ] Microsoft Joliet CDROM extensions
[ ] Transparent decompression extension
Minix fs support
FreeVxFS file system support (VERITAS VxFS(TM) compatible)
NTFS file system support (read only)
OS/2 HPFS file system support
/proc file system support
/dev/pts file system for Unix98 PTYs
ROM file system support
Second extended fs support
System V/Xenix/V7/Coherent file system support
UDF file system support (read only)
UFS file system support (read only)
Network File Systems --->
選定以後選擇exit退出。
出現以下:
┌──────────────────────────────────────────────────────────┐
│ Do you wish to save your new kernel configuration? │
├──────────────────────────────────────────────────────────┤
│ │
└──────────────────────────────────────────────────────────┘
選擇yes
然後出現以下字樣:
Saving your kernel configuration...
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.
2-1-2)編譯kernel
#make dep
#make clean
#make bzImage
#make modules
#make modules_install
2-1-3)cp新的kernel到啟動區
#cp /home/src/kernel_update/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.18
#mkinitrd /boot/initrd-2.4.18.img 2.4.18
#vi /etc/lilo.conf
在最後新增以下
image=/boot/vmlinuz-2.4.18 <= kernel的路徑
label=newkernel <= 啟動時的卷標
initrd=/boot/initrd-2.4.18.img <= kernelimg的路徑
read-only
root=/dev/hda2 <= / 所在的區
#/sbin/lilo -m /boot/map
2-1-4)重新啟動server
#reboot
重新啟動進入時在redhat lilo的選擇介面選擇newkernel進入
2-2)設定quota
2-2-1)安裝quota。
#cd /home/src
#rpm -ivv quota-3.03-1.i386.rpm
2-2-2)設定quota,以home為例
#vi /etc/fstab
把
LABEL=/home /home ext3 defaults 1 2
改成
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
重啟server
#/sbin/reboot
2-2-3)設定使用者限定
#quotacheck -uvg /home
#edquota -u test
Disk quotas for user chenc (uid 694):
Filesystem blocks soft hard inodes soft hard
/dev/hda5 6000 5000 6000 3 5000 6000
在soft和hard下添上需要限制的磁碟大小(單位是K)
#edquota -t
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem Block grace period Inode grace period
/dev/hda5 1minutes 1minutes
設定soft quota和hard quota之間的時間。
啟動quota
#quotaon -av
用test帳號用ftp進行測試,當test目錄達到了5M時,提示Disk quota exceeded。
ext3fs最大的優點是向下相容ext2,而且ext3fs還支援非同步的日誌,這意味著它的效能可能比ext2還好。但是使用ext3檔案系統時不支援磁碟限量功能。
red hat從kernel2.4.17-pre8以後支援ext3的磁碟quota,我選擇了更為穩定的kernel2.4.18來實現。
<1.原始檔>
kernel-2.4.18:
quota:
把檔案放在/home/src下
2-1-2)kernel升級過程:
#cd /home/src
#mkdir kernel_update
#cp ./linux-2.4.18.tar.gz ./kernel_update
#cd kernel_update
#tar zxvf linux-2.4.18.tar.gz
#cd linux
#make menuconfig
此時出現Linux Kernel v2.4.18 Configuration的視窗
Processor type and features --->
General setup --->
Memory Technology Devices (MTD) --->
Parallel port support --->
Plug and Play configuration --->
Block devices --->
Multi-device support (RAID and LVM) --->
Networking options --->
Telephony Support --->
ATA/IDE/MFM/RLL support --->
SCSI support --->
Fusion MPT device support --->
I2O device support --->
Network device support --->
Amateur Radio support --->
IrDA (infrared) support --->
ISDN subsystem --->
Old CD-ROM drivers (not SCSI, not IDE) --->
Input core support --->
Character devices --->
Multimedia devices --->
File systems --->
Console drivers --->
Sound --->
USB support --->
Kernel hacking --->
---
Load an Alternate Configuration File
Save Configuration to an Alternate File
以下都是kernel裡的選項,可以根據server硬體的不同自行選擇
與quota有關的設定如下
找到File systems ---> 的字樣 (第22行) 按空格鍵
把第一行的Quota support前打上*號
Kernel automounter support
Kernel automounter version 4 support (also supports v3)
Reiserfs support
Ext3 journalling file system support (EXPERIMENTAL)
DOS FAT fs support
Compressed ROM file system support
Simple RAM-based file system support
ISO 9660 CDROM file system support
[ ] Microsoft Joliet CDROM extensions
[ ] Transparent decompression extension
Minix fs support
FreeVxFS file system support (VERITAS VxFS(TM) compatible)
NTFS file system support (read only)
OS/2 HPFS file system support
ROM file system support
Second extended fs support
System V/Xenix/V7/Coherent file system support
UDF file system support (read only)
UFS file system support (read only)
Network File Systems --->
選定以後選擇exit退出。
出現以下:
┌──────────────────────────────────────────────────────────┐
│ Do you wish to save your new kernel configuration? │
├──────────────────────────────────────────────────────────┤
│ │
└──────────────────────────────────────────────────────────┘
選擇yes
然後出現以下字樣:
Saving your kernel configuration...
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.
2-1-2)編譯kernel
#make dep
#make clean
#make bzImage
#make modules
#make modules_install
2-1-3)cp新的kernel到啟動區
#cp /home/src/kernel_update/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.18
#mkinitrd /boot/initrd-2.4.18.img 2.4.18
#vi /etc/lilo.conf
在最後新增以下
image=/boot/vmlinuz-2.4.18 <= kernel的路徑
label=newkernel <= 啟動時的卷標
initrd=/boot/initrd-2.4.18.img <= kernelimg的路徑
read-only
root=/dev/hda2 <= / 所在的區
#/sbin/lilo -m /boot/map
2-1-4)重新啟動server
#reboot
重新啟動進入時在redhat lilo的選擇介面選擇newkernel進入
2-2)設定quota
2-2-1)安裝quota。
#cd /home/src
#rpm -ivv quota-3.03-1.i386.rpm
2-2-2)設定quota,以home為例
#vi /etc/fstab
把
LABEL=/home /home ext3 defaults 1 2
改成
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
重啟server
#/sbin/reboot
2-2-3)設定使用者限定
#quotacheck -uvg /home
#edquota -u test
Disk quotas for user chenc (uid 694):
Filesystem blocks soft hard inodes soft hard
/dev/hda5 6000 5000 6000 3 5000 6000
在soft和hard下添上需要限制的磁碟大小(單位是K)
#edquota -t
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem Block grace period Inode grace period
/dev/hda5 1minutes 1minutes
設定soft quota和hard quota之間的時間。
啟動quota
#quotaon -av
用test帳號用ftp進行測試,當test目錄達到了5M時,提示Disk quota exceeded。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-948723/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux下的磁碟配額quotaLinux
- Linux Quota的配置實戰Linux
- VC中實現多格式影像的靈活轉換 (轉)
- js實現的陣列和CSV格式的相互轉換JS陣列
- java 實現文字格式轉換Java
- ext3 ext4 格式下 rm 誤刪恢復工具 extundeletedelete
- js實現字串轉JSON格式字串JSON
- Linux下VLAN功能的實現 (轉)Linux
- Linux磁碟配額(Quota)(轉)Linux
- HDF格式遙感影像批次轉為TIFF格式:ArcPy實現
- JScript下Singleton模式的實現。 (轉)JS模式
- FTP方式實現BS下的WORD操作 (轉)FTP
- Javascript日期格式化指定格式的字串實現JavaScript字串
- FreeBSD下的可執行程式格式(轉)行程
- 恢復EXT3下被刪除的檔案
- 音樂格式轉換:java程式碼實現Java
- Python 實現Excel和TXT文字格式之間的相互轉換PythonExcel
- Linux下軟體RAID的實現 (轉)LinuxAI
- 認識Linux下Ext2與Ext3檔案系統的區別(轉)Linux
- EXT2和EXT3的詳細區別(轉)
- 分割槽,檔案系統的擴大與縮小,檔案系統格式轉換(ext2,ext3)
- NIS下solaris和linxu的client實現AutoFS(轉)client
- RH9下最簡單的WebMail的實現方案(轉)WebAI
- Oracle的表空間quota詳解Oracle
- oracle的表空間quota詳講Oracle
- | / - 的旋轉效果實現(轉)
- 【C】EM卡韋根32/24格式卡號轉換的實現
- c++實現輸出指定的格式的資料C++
- quota 筆記筆記
- 安裝及使用quota管理磁碟配額(轉)
- jquery實現將字串轉換為json格式物件jQuery字串JSON物件
- Matlab批量實現圖片檔案格式轉換Matlab
- Python 實現Excel XLS和XLSX格式相互轉換PythonExcel
- 日期格式的轉換
- Passport 你的網站(在你的WebSite上實現MS Passport )下 (轉)Passport網站Web
- 關於在linux下磁碟定額的實現(轉)Linux
- ASP環境下輕鬆實現報表的列印 (轉)
- 實現Linux下的區域網遠端接入(轉)Linux