该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

1.5.7 直接设置配额:setquota

[root@rhce ~]# setquota -h

setquota: Usage:

setquota [-u|-g] [-rm] [-F quotaformat]

-a|...

setquota [-u|-g] [-rm] [-F quotaformat] -a|...

setquota [-u|-g] [-rm] [-F quotaformat] -b[-c] -a|...

setquota [-u|-g] [-F quotaformat] -t -a|...

setquota [-u|-g] [-F quotaformat] -T-a|...

-u, --user set limits for user

-g, --group set limits for group

-a, --all set limits for allfilesystems

--always-resolve alwaystryto resolve name, even if is

composed onlyofdigits

-F, --format=formatname operate on specific quota format

-p, --prototype=protoname copy limits from user/group

-b, --batch read limits from standard input

-c, --continue-batch continue in input processing in caseofan error

-r, --remote set remote quota (via RPC)

-m, --no-mixed-pathnames trim leading slashes fromNFSv4mountpoints

-t, --edit-period edit grace period

-T, --edit-times edit grace times for user/group

-h, --help display this help text andexit

-V, --version display version informationandexit

Bugs to: jack@suse.cz

[root@rhce ~]#

二. 配额使用示例

2.1 创建分区并mount到目录

[root@rhce /]# fdisk /dev/sdc

Device contains neither a validDOSpartition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel withdiskidentifier 0x1e051117.

Changes will remain in memory only,untilyou decide to write them.

After that, of course, the previouscontentwon*t be recoverable.

Warning: invalid flag 0x0000 ofpartitiontable 4 will be corrected by w(rite)

WARNING: DOS-compatible mode isdeprecated.It*s strongly recommended to

switch off the mode (command *c*) and change display units to

sectors (command *u*).

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-652, default 1):

Using default value 1

Last cylinder, +cylinders or+size{K,M,G}(1-652, default 652):

Using default value 652

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@rhce /]# fdisk -l

Disk /dev/sdc: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 cylinders

Units = cylinders of 16065 * 512 =8225280bytes

Sector size (logical/physical): 512 bytes/512 bytes

I/O size (minimum/optimal): 512 bytes /512bytes

Disk identifier: 0x1e051117

Device Boot Start End Blocks Id System

/dev/sdc1 1 652 5237158+ 83 Linux

[root@rhce /]# mkfs -t ext3 /dev/sdc1

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

327680 inodes, 1309289 blocks

65464 blocks (5.00%) reserved for thesuperuser

First data block=0

Maximum filesystem blocks=1342177280

40 block groups

32768 blocks per group, 32768 fragmentspergroup

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystemaccountinginformation: done

This filesystem will beautomaticallychecked every 30 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@rhce /]#

[root@rhce /]# mount/dev/sdc1 /dave

[root@rhce /]# vim /etc/fstab

/dev/sdc1 /dave ext3 defaults 0 0

我们这里将/dev/sdc1映射到了目录/dave.

2.2 创建2个测试用户

[root@rhce /]# groupadd grp01

[root@rhce /]# groupadd grp02

[root@rhce /]# cat /etc/group|grep grp0*

grp01:x:503:

grp02:x:504:

[root@rhce /]#

[root@rhce /]# useradd dave01 -g grp01

[root@rhce /]# useradd dave02 -g grp02

[root@rhce /]# passwd dave01

Changing password for user dave01.

New password:

BAD PASSWORD: it is too short

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokensupdatedsuccessfully.

[root@rhce /]# passwd dave02

Changing password for user dave02.

New password:

BAD PASSWORD: it is too short

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokensupdatedsuccessfully.

[root@rhce /]#

2.3 修改分区表启用配额限制

[root@rhce ~]# cat /etc/fstab

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/sdc1 /dave ext3 defaults,usrquota,grpquot 0 0

[root@rhce ~]#

/etc/fstab 文件的第四个字段是装载文件系统是使用的选项:

(1)实现基于用户的磁盘配额,就加入usrquota关键字,

(2)实现基于组的磁盘配额,就加入grpqouta关键字,如果两者都需要,就全写入,中间可以用逗号分隔。

注意:请特别注意这里的拼写,是usrquota和grpquota,不要写成userquota和groupquota。

2.4 重新Remount 分区

[root@rhce ~]# mount

/dev/sda3 on / type ext4 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts(rw,gid=5,mode=620)

tmpfs on /dev/shm typetmpfs(rw,rootcontext="system_u:object_r:tmpfs_t:s0")

/dev/sda1 on /boot type ext4 (rw)

none on /proc/sys/fs/binfmt_misctypebinfmt_misc (rw)

none on /sys/kernel/config typeconfigfs(rw)

sunrpc on /var/lib/nfs/rpc_pipefstyperpc_pipefs (rw)

gvfs-fuse-daemon on /root/.gvfstypefuse.gvfs-fuse-daemon (rw,nosuid,nodev)

/dev/sdc1 on /dave typeext3 (rw)

centos7桌面能看到计算机,【14-10-29】 【总结】教你怎么将centos7打造成桌面系统。。。...相关推荐

  1. 基于神威·太湖之光的超大规模图计算系统“神图” 2019-12-16 14:10:29 作者:Fma

    林恒博士拥有清华大学计算机科学博士学位(2018 年获得)和中山大学数学专业学士学位(2011 年获得),费马科技公司联合创始人.其研究兴趣包括异构体系结构.图计算和大规模计算.他基于神威·太湖之光开 ...

  2. 桌面上计算机就是我的电脑吗,详细教您win10如何显示我的电脑在桌面

    新安装Win10后,桌面默认仅有回收站图标,却没有我的电脑,win10和之前两个版本Windows一样安装好以后就一个回收站,我的电脑还有网络这两个图标都没有.对于很多用户来说,都不是怎么回事,如何解 ...

  3. 计算机恢复出厂设置xp,教你几个步骤就可以学会xp系统恢复出厂设置

    最近网上很多小伙伴私信我说自己的电脑xp系统需要恢复出厂设置,但是自己却不会,很苦恼,自己上网查资料也不全,也不敢就直接自己动手操作,所以进来询问小编我找答案,小编这边还真就有xp系统恢复出厂设置的方 ...

  4. 把计算机固定在桌面,怎么把计算机图标放到桌面 - 卡饭网

    Win8如何设置让计算机图标返回桌面默认桌面没有显示 Win8如何设置让计算机图标返回桌面默认桌面没有显示 教你设置计算机图标回归Win 8桌面,Windows 8是由微软下一代操作系统,相比以往的操 ...

  5. 远程桌面 域计算机,在AD中实现仅普通域用户可通过远程桌面控制自身计算机

    一用户可以使用远程桌面连接计算机的要求 1.1使用户可以使用远程桌面的四个要求 要想让域用户可以通过远程桌面的功能远程连接计算机,必须满足几个条件: 1.客户端计算机必须开启"允许远程桌面& ...

  6. 桌面中计算机作用,云桌面技术在计算机机房管理中的作用研究

    林朝晖 摘   要:对于探讨云桌面技术在计算机机房管理中作用,文章首先分析云桌面技术的内涵和应用优势,然后分析云桌面技术在计算机机房管理中的作用,包括:设计思路作用.系统虚拟化软件和软件服务云的作用. ...

  7. win10桌面计算机怎么显示不出来的,win10系统桌面不显示计算机图标的恢复技巧...

    win10系统使用久了,好多网友反馈说win10系统桌面不显示计算机图标的问题,非常不方便.有什么办法可以永久解决win10系统桌面不显示计算机图标的问题,面对win10系统桌面不显示计算机图标的图文 ...

  8. Ubuntu 14.04~14.10 Linux 3D桌面完全教程,显卡驱动安装方法,compiz特效介绍,常见问题解答

    首先秀一下我的3D桌面效果(视频)  点击打开原文链接 虽然这段视频是在2008年时使用Ubuntu 8.04版录制的,Ubuntu版本已经更新了多次,但至今大部分3D特效仍是一样的效果. 酷6  h ...

  9. 滴滴KDD2017论文:基于组合优化的出租车分单模型 By 机器之心2017年8月14日 10:29 数据挖掘顶会 KDD 2017 已经开幕,国内有众多来自产业界的论文被 KDD 2017 接收。

    滴滴KDD2017论文:基于组合优化的出租车分单模型 By 机器之心2017年8月14日 10:29 数据挖掘顶会 KDD 2017 已经开幕,国内有众多来自产业界的论文被 KDD 2017 接收.本 ...

  10. linux桌面服务器系统下载,Ubuntu 14.10 中文桌面版/服务器正式版下载

    一说到 Linux,就不得不提目前最红火的 Ubuntu 发行版了!它拥有绚丽的界面,甚至跟以时尚为卖点的 Mac OSX 相比也有过之而无不及,相信当你试过这款操作系统之后,你会对 Linux 的印 ...

最新文章

  1. Guava中针对集合的 filter和过滤功能
  2. Silverlight学习笔记之页面跳转
  3. 结构体对齐,#pragma pack
  4. vue-awesome-swiper缩略图无法联动的问题
  5. STL源码剖析 priority_queue
  6. REDIS 关键配置简述
  7. 1075. PAT Judge (25)
  8. humid vs wet vs moist
  9. CAD软件查看.dwg、.dxf、.dwf、.jpeg、.jpg、.png、.gif等文件
  10. GitHub的安装与配置
  11. 人人开源快速搭建脚手架工程
  12. navicat的注册出现提示No All Pattern Found! File Already Patched?
  13. Everything To Byte And To Tensor -- Welcome to age of AI
  14. SpringBoot基础
  15. 记录一下通过QQ发送apk安装失败原因。
  16. 可靠的运输层协议,如何抵抗“剪网线”的降维打击?(rdt协议的的总结与思考)
  17. 对BLOG皮肤的具体修改
  18. 硬件产品经理的学习之路(一)
  19. ubuntu16.04解决tensorflow提示未编译使用SSE3、SSE4.1、SSE4.2、AVX、AVX2、FMA的问题【转】...
  20. MySQL数据库介绍及特点

热门文章

  1. 网络游戏客户端通信模块简单实现
  2. Linux系统用什么翻译软件,Linux安装翻译软件StarDict的步骤(自己的操作总结)
  3. 笔记之Wishart 矩阵和特征值变量的积分变换
  4. abaqus对应python版本_abaqus with python 小问题罗列(持续更新)
  5. 关于Jetsonnano底层板和TF拓展卡jetpack相关版本的相关错误问题。【解决某些系统进入失败问题】
  6. 在 Ubuntu 18.04 中配置静态 IP 地址及灵活切换IP的办法
  7. mape的matlab,如何在MATLAB中計算MAPE和DS
  8. html5的table及td单元格的圆形边框
  9. 安徽招生考试网计算机考试成绩查询入口,安徽高考成绩查询系统入口:安徽省教育招生考试院...
  10. 怎么使用_许昌防裂贴使用方法,怎么使用