Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

docs:linuxeries:xfs [2012/03/15 15:32]
127.0.0.1 édition externe
docs:linuxeries:xfs [2013/10/28 11:57] (version actuelle)
Ligne 1: Ligne 1:
-====== Activation des quotas projets ======+====== XFS ======
-===== Creation des fichiers de confs ===== 
-==== /etc/projects ====+===== Activation des quotas projets ===== 
 + 
 +==== Creation des fichiers de confs ==== 
 + 
 +=== /etc/projects ===
  *Format   *Format
Ligne 13: Ligne 16:
ls /home | while read login; do id=`id -u $login`; echo $id:/home/$login; done >/etc/projects ls /home | while read login; do id=`id -u $login`; echo $id:/home/$login; done >/etc/projects
</xtermrtf> </xtermrtf>
-==== /etc/projid ====+=== /etc/projid ===
  *Format   *Format
Ligne 28: Ligne 31:
  - pour etre en mode expert, il faut lancer la commande xfs_quota avec un x pour parametre   - pour etre en mode expert, il faut lancer la commande xfs_quota avec un x pour parametre
  - Attention, si votre install est en francais je vous recommande un LANG=C avant l'appel a xfs_quota   - Attention, si votre install est en francais je vous recommande un LANG=C avant l'appel a xfs_quota
 +  - Attention, selon certaines sources les quotas groupes sont incompatibles avec les quotas projets
 +  - Ne pas oublier de configurer le /etc/fstab avec le bon parametre (//pquota//)
 +  - Rebooter la machine est necessaire, sinon les quotas projects ne sauront s'initaliser correctement
<xtermrtf> <xtermrtf>
# LANG=C xfs_quota -x -c 'project -s adlp' # LANG=C xfs_quota -x -c 'project -s adlp'
Ligne 35: Ligne 41:
En plus funcky En plus funcky
<xtermrtf> <xtermrtf>
-ls | while read login; do LANG=C xfs_quota -x -c "project -s $login"; done+ls /home| while read login; do LANG=C xfs_quota -x -c "project -s $login"; done
</xtermrtf> </xtermrtf>
 +Verification que les quotas sont bien activés
<xtermrtf> <xtermrtf>
-root@mpc-web01:~# LANG=C xfs_quota -x -c "disable -u" /home +root@wurzel:~# LANG=C xfs_quota -x -c "state" /home 
-XFS_QUOTAOFF: File exists +User quota state on /home (/dev/mapper/wurzel-home)
-root@mpc-web01:~# LANG=C xfs_quota -x -c "state" /home +
-User quota state on /home (/dev/mapper/mpc--web01-home) +
-  Accounting: ON +
-  Enforcement: OFF +
-  Inode: #240773 (5 blocks, 4 extents) +
-Group quota state on /home (/dev/mapper/mpc--web01-home) +
-  Accounting: OFF +
-  Enforcement: OFF +
-  Inode: #18446744073709551615 (0 blocks, 0 extents) +
-Project quota state on /home (/dev/mapper/mpc--web01-home) +
-  Accounting: OFF +
-  Enforcement: OFF +
-  Inode: #18446744073709551615 (0 blocks, 0 extents) +
-Blocks grace time: [7 days 00:00:30] +
-Inodes grace time: [7 days 00:00:30] +
-Realtime Blocks grace time: [7 days 00:00:30] +
-root@mpc-web01:~# LANG=C xfs_quota -x -c "off -u" /home +
-root@mpc-web01:~# LANG=C xfs_quota -x -c "state" /home +
-User quota state on /home (/dev/mapper/mpc--web01-home)+
  Accounting: OFF   Accounting: OFF
  Enforcement: OFF   Enforcement: OFF
  Inode: #240773 (5 blocks, 4 extents)   Inode: #240773 (5 blocks, 4 extents)
-Group quota state on /home (/dev/mapper/mpc--web01-home)+Group quota state on /home (/dev/mapper/wurzel-home)
  Accounting: OFF   Accounting: OFF
  Enforcement: OFF   Enforcement: OFF
  Inode: #18446744073709551615 (0 blocks, 0 extents)   Inode: #18446744073709551615 (0 blocks, 0 extents)
-Project quota state on /home (/dev/mapper/mpc--web01-home)+Project quota state on /home (/dev/mapper/wurzel-home)
  Accounting: OFF   Accounting: OFF
  Enforcement: OFF   Enforcement: OFF
Ligne 75: Ligne 62:
Realtime Blocks grace time: [7 days 00:00:30] Realtime Blocks grace time: [7 days 00:00:30]
</xtermrtf> </xtermrtf>
 +
 +
 +===== Lecture des quotas =====
 +NB: pour la lecture des quota groupes, la meme commande est efficace !!
 +
 +  root@mpe-storage01:/var/log# xfs_quota -x -c 'report -h'
 +  Utilisateur quota on /data (/dev/mapper/mpe--storage01--data-data)
 +                          Blocs
 +  Utilisateur ID   Used   Soft   Hard Warn/Grace
 +  --------------- ---------------------------------
 +  root                 0      0      0  00 [------]
 +  vmail              12K      0      0  00 [------]
 +  lan_admin         188K      0      0  00 [------]
 +  local_admin       188K      0      0  00 [------]
 +  
 +  Groupe quota on /data (/dev/mapper/mpe--storage01--data-data)
 +                          Blocs
 +  Groupe ID    Used   Soft   Hard Warn/Grace
 +  ---------- ---------------------------------
 +  root            0      0      0  00 [------]
 +  vmail         12K      0      0  00 [------]
 +  lan          188K      0      0  00 [------]
 +  local        188K      0      0  00 [------]
 +
 +====== LessFS ======
 +  * ||http://www.lessfs.com/wordpress/?page_id=577]]
docs/linuxeries/xfs.1331821942.txt.gz · Dernière modification: 2012/03/16 11:14 (édition externe)
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki