8.3 Job

RAID disk management
[root@localhost ~]# mdadm -Cv /dev/md5 -l5 -n3 /dev/sdb[123]
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: size set to 20954112K
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md5 started.
[root@localhost ~]# pvscan
  PV /dev/sda2   VG centos          lvm2 [<39.00 GiB / 4.00 MiB free]
  Total: 1 [<39.00 GiB] / in use: 1 [<39.00 GiB] / in no VG: 0 [0   ]
[root@localhost ~]# pvcreate /dev/md5
  Physical volume "/dev/md5" successfully created.
[root@localhost ~]# pvscan
  PV /dev/sda2   VG centos          lvm2 [<39.00 GiB / 4.00 MiB free]
  PV /dev/md5                       lvm2 [<39.97 GiB]
  Total: 2 [78.96 GiB] / in use: 1 [<39.00 GiB] / in no VG: 1 [<39.97 GiB]
[root@localhost ~]# vgcreate myvg /dev/md5
  Volume group "myvg" successfully created
[root@localhost ~]# lvscan
  ACTIVE            '/dev/centos/swap' [2.50 GiB] inherit
  ACTIVE            '/dev/centos/root' [36.49 GiB] inherit
[root@localhost ~]# lvcreate -L 30G -n mylv myvg
  Logical volume "mylv" created.
[root@localhost ~]# mkfs.ext4 /dev/myvg/mylv
mke2fs 1.42.9 (28-Dec-2013)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=128 blocks, Stripe width=256 blocks
1966080 inodes, 7864320 blocks
393216 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=2155872256
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
 
Allocating group tables: 完成                           
正在写入inode表: 完成                           
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成  
[root@localhost ~]# mount /dev/myvg/mylv /usr/local/apache/htdocs
[root@localhost ~]# mount -o remount,usrquota,grpquota /usr/local/apache/htdocs
[root@localhost ~]# mount |grep /usr/local/apache/htdocs
/dev/mapper/myvg-mylv on /usr/local/apache/htdocs type ext4 (rw,relatime,seclabel,quota,usrquota,grpquota,stripe=256,data=ordered)
[root@localhost ~]# vim /etc/fstab
/dev/myvg/mylv     /usr/local/apache/htdocs     ext4    defaults,usrquota,grpquota       0 0
[root@localhost htdocs]# vi index.thml
[root@localhost htdocs]# cd
[root@localhost ~]# lynx 127.0.0.1
 
 
 
[root @ localhost ~] # the quotacheck -avug
the quotacheck: Your Kernel Probably the Supports Journaled quota But you are not the Consider Switching to a using IT Journaled quota to Avoid running the quotacheck the After the shutdown AN unclean..
the quotacheck: Scanning / dev / Mapper / myvg-mylv [/ usr / local / the Apache / htdocs] DONE
the quotacheck: Old STAT the User quota of Can not file /usr/local/apache/htdocs/aquota.user: no such file or directory by Will not BE Subtracted Usage..
the quotacheck: Old Group of Can not STAT quota file /usr/local/apache/htdocs/aquota.group: no such file or directory by Will not BE Subtracted Usage..
the quotacheck: Old STAT of Can not file /usr/local/apache/htdocs/aquota.user the User quota: not that file or directory. Usage will not be subtracted.
quotacheck: Cannot stat old group quota file /usr/local/apache/htdocs/aquota.group: 没有那个文件或目录. Usage will not be subtracted.
quotacheck: Checked 3 directories and 1 files
quotacheck: Old file not found.
quotacheck: Old file not found.
[root@localhost ~]# ll /usr/local/apache/htdocs/a*
-rw-------. 1 root root 6144 8月   3 17:11 /usr/local/apache/htdocs/aquota.group
-rw-------. 1 root root 6144 8月   3 17:11 /usr/local/apache/htdocs/aquota.user
[root@localhost ~]# quotaon -avug
/dev/mapper/myvg-mylv [/usr/local/apache/htdocs]: group quotas turned on
/dev/mapper/myvg-mylv [/usr/local/apache/htdocs]: user quotas turned on
[root@localhost ~]# edquota -u douyanru
  / Dev / folders / myvg-mylv 0 8,000 10,000 0 80,100

 

Guess you like

Origin www.cnblogs.com/lvhemu/p/11299324.html