md:
mdadm: 将任何块设备做成RAID

模式化的命令:
1.创建模式

-C  专用选项:

-l: 级别
-n #: 设备个数
-a {yes|no}: 是否自动为其创建设备文件
-c: CHUNK大小, ^n,默认为64KB,最好为块的倍数 ,为了提高raid 0/5 的性能 mke2fs -E stride=16 -b 4096 /dev/md0
-x #: 指定空闲盘个数

3.管理模式

--add, --remove, --fail
mdadm /dev/md# --fail /dev/sda7

4.监控模式

-F

5.增长模式

-G

6.装配模式

-A

查看RAID阵列的详细信息

mdadm -D /dev/md#
--detail

停止阵列:

mdadm -S /dev/md#
--stop

删除设备文件

rm /dev/md#

创建功能:

1.创建一个空间大小为6G的RAID0设备

RAID0 6G:
  2: 3GB

首先创建2个3G大小的分区,并把类型调成read的类型

root@VM_160_34_centos:~> fdisk /dev/xvdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u'). Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 Linux
/dev/xvdb6 Linux
/dev/xvdb7 Linux
/dev/xvdb8 Linux
/dev/xvdb9 Linux Command (m for help): d
Partition number (-): Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System Command (m for help): n
Command action
e extended
p primary partition (-)
e
Partition number (-):
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ):
Using default value Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended Command (m for help): n
Command action
l logical ( or over)
p primary partition (-)
l
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ): +3G Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + Linux Command (m for help): n
Command action
l logical ( or over)
p primary partition (-)
l
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ): +3G Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + Linux
/dev/xvdb6 Linux Command (m for help): t
Partition number (-):
Hex code (type L to list codes): l Empty NEC DOS Minix / old Lin bf Solaris
FAT12 Plan Linux swap / So c1 DRDOS/sec (FAT-
XENIX root 3c PartitionMagic Linux c4 DRDOS/sec (FAT-
XENIX usr Venix OS/ hidden C: c6 DRDOS/sec (FAT-
FAT16 <32M PPC PReP Boot Linux extended c7 Syrinx
Extended SFS NTFS volume set da Non-FS data
FAT16 4d QNX4.x NTFS volume set db CP/M / CTOS / .
HPFS/NTFS 4e QNX4.x 2nd part Linux plaintext de Dell Utility
AIX 4f QNX4.x 3rd part 8e Linux LVM df BootIt
AIX bootable OnTrack DM Amoeba e1 DOS access
a OS/ Boot Manag OnTrack DM6 Aux Amoeba BBT e3 DOS R/O
b W95 FAT32 CP/M 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) OnTrackDM6 a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
OPUS Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
Hidden FAT12 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
Compaq diagnost SpeedStor a9 NetBSD f4 SpeedStor
Hidden FAT16 < GNU HURD or Sys ab Darwin boot f2 DOS secondary
Hidden FAT16 Novell Netware af HFS / HFS+ fb VMware VMFS
Hidden HPFS/NTF Novell Netware b7 BSDI fs fc VMware VMKCORE
AST SmartSleep DiskSecure Mult b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 PC/IX bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 Old Minix be Solaris boot ff BBT
1e Hidden W95 FAT1
Hex code (type L to list codes): fd
Changed system type of partition to fd (Linux raid autodetect) Command (m for help): t
Partition number (-):
Hex code (type L to list codes): fd
Changed system type of partition to fd (Linux raid autodetect) Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + fd Linux raid autodetect
/dev/xvdb6 fd Linux raid autodetect

确认一下分区已被内核识别

root@VM_160_34_centos:~> cat /proc/partitions
major minor #blocks name xvda
xvda1
xvdb
xvdb4
xvdb5
xvdb6
xvdc

执行创建命令

root@VM_160_34_centos:~> mdadm -C /dev/md0 -a yes -l  -n  /dev/xvdb{,}
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

我们 看一下 /proc/mdstat 文件, 这个文件里面记录着系统中所有启动在的raid 设备

root@VM_160_34_centos:~> cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 xvdb6[] xvdb5[]
blocks super 1.2 512k chunks unused devices: <none>

我们把它们格式化,

root@VM_160_34_centos:~> mke2fs -j /dev/md0
mke2fs 1.41. (-May-)
Filesystem label=
OS type: Linux
Block size= (log=)
Fragment size= (log=)
Stride= blocks, Stripe width= blocks
inodes, blocks
blocks (5.00%) reserved for the super user
First data block=
Maximum filesystem blocks=
block groups
blocks per group, fragments per group
inodes per group
Superblock backups stored on blocks:
, , , , , , Writing inode tables: done
Creating journal ( blocks): done
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every mounts or
days, whichever comes first. Use tune2fs -c or -i to override.

然后挂载到mnt下

root@VM_160_34_centos:~> mount /dev/md0 /mnt/
root@VM_160_34_centos:~> ll /mnt/
total
drwx------ root root Nov : lost+found

到此这个 raid 成功可以使用

创建1G的 raid1

  我们首先创建2个1G的分区,并调整它的类型

root@VM_160_34_centos:~> fdisk /dev/xvdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u'). Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + fd Linux raid autodetect
/dev/xvdb6 fd Linux raid autodetect Command (m for help): n
Command action
l logical ( or over)
p primary partition (-)
l
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ): +1G Command (m for help): n
Command action
l logical ( or over)
p primary partition (-)
l
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ): +1G Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + fd Linux raid autodetect
/dev/xvdb6 fd Linux raid autodetect
/dev/xvdb7 + Linux
/dev/xvdb8 + Linux Command (m for help): t
Partition number (-):
Hex code (type L to list codes): fd
Changed system type of partition to fd (Linux raid autodetect) Command (m for help): t
Partition number (-):
Hex code (type L to list codes): fd
Changed system type of partition to fd (Linux raid autodetect) Command (m for help): p Disk /dev/xvdb: 53.7 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xc77f92d7 Device Boot Start End Blocks Id System
/dev/xvdb4 Extended
/dev/xvdb5 + fd Linux raid autodetect
/dev/xvdb6 fd Linux raid autodetect
/dev/xvdb7 + fd Linux raid autodetect
/dev/xvdb8 + fd Linux raid autodetect Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error : Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe() or kpartx()
Syncing disks.

确保内核已经识别了我们的分区,如果没有执行 partx -a /dev/xvdb 来识别(可能需要umount 该盘其他挂载点) ,

root@VM_160_34_centos:~> mdadm -C /dev/md1 -a yes -l  -n  /dev/xvdb{,}
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90

执行创建命令

root@VM_160_34_centos:~> mdadm -C /dev/md1 -a yes -l  -n  /dev/xvdb{,}
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md1 started.

执行的时候它会问你是否需要创建, 这个是毫无疑问的.

我们查看一下它的状态

root@VM_160_34_centos:~> cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 xvdb8[] xvdb7[]
blocks super 1.2 [/] [UU]
[==========>..........] resync = 54.6% (/) finish=.0min speed=144881K/sec md0 : active raid0 xvdb6[] xvdb5[]
blocks super 1.2 512k chunks unused devices: <none>

格式化,

root@VM_160_34_centos:~> mke2fs -j /dev/md1
mke2fs 1.41. (-May-)
Filesystem label=
OS type: Linux
Block size= (log=)
Fragment size= (log=)
Stride= blocks, Stripe width= blocks
inodes, blocks
blocks (5.00%) reserved for the super user
First data block=
Maximum filesystem blocks=
block groups
blocks per group, fragments per group
inodes per group
Superblock backups stored on blocks:
, , , Writing inode tables: done
Creating journal ( blocks): done
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every mounts or
days, whichever comes first. Use tune2fs -c or -i to override.

挂载

root@VM_160_34_centos:~> mount /dev/md1 /storage/
root@VM_160_34_centos:~> ll /storage/
total
drwx------ root root Nov : lost+found

我们查看一下这个阵列的属性:

root@VM_160_34_centos:~> mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Fri Nov ::
Raid Level : raid1
Array Size : (1034.57 MiB 1084.64 MB)
Used Dev Size : (1034.57 MiB 1084.64 MB)
Raid Devices :
Total Devices :
Persistence : Superblock is persistent Update Time : Fri Nov ::
State : clean
Active Devices :
Working Devices :
Failed Devices :
Spare Devices : Name : VM_160_34_centos: (local to host VM_160_34_centos)
UUID : 4e1ea263:6297d669:9d5877af:6e5fc1e0
Events : Number Major Minor RaidDevice State
active sync /dev/xvdb7
active sync /dev/xvdb8

然后拷贝个文件进去,模拟损坏一个设备,文件照常访问

root@VM_160_34_centos:~> mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Fri Nov ::
Raid Level : raid1
Array Size : (1034.57 MiB 1084.64 MB)
Used Dev Size : (1034.57 MiB 1084.64 MB)
Raid Devices :
Total Devices :
Persistence : Superblock is persistent Update Time : Fri Nov ::
State : clean
Active Devices :
Working Devices :
Failed Devices :
Spare Devices : Name : VM_160_34_centos: (local to host VM_160_34_centos)
UUID : 4e1ea263:6297d669:9d5877af:6e5fc1e0
Events : Number Major Minor RaidDevice State
active sync /dev/xvdb7
active sync /dev/xvdb8
root@VM_160_34_centos:~> mdadm /dev/md1 -f /dev/xvdb8
mdadm: set /dev/xvdb8 faulty in /dev/md1
root@VM_160_34_centos:~> mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Fri Nov ::
Raid Level : raid1
Array Size : (1034.57 MiB 1084.64 MB)
Used Dev Size : (1034.57 MiB 1084.64 MB)
Raid Devices :
Total Devices :
Persistence : Superblock is persistent Update Time : Fri Nov ::
State : clean, degraded
Active Devices :
Working Devices :
Failed Devices :
Spare Devices : Name : VM_160_34_centos: (local to host VM_160_34_centos)
UUID : 4e1ea263:6297d669:9d5877af:6e5fc1e0
Events : Number Major Minor RaidDevice State
active sync /dev/xvdb7
removed - faulty spare /dev/xvdb8
root@VM_160_34_centos:~> cat /storage/passwd
root:x:::root:/root:/bin/bash
bin:x:::bin:/bin:/sbin/nologin
daemon:x:::daemon:/sbin:/sbin/nologin
adm:x:::adm:/var/adm:/sbin/nologin
lp:x:::lp:/var/spool/lpd:/sbin/nologin
sync:x:::sync:/sbin:/bin/sync
shutdown:x:::shutdown:/sbin:/sbin/shutdown
halt:x:::halt:/sbin:/sbin/halt
mail:x:::mail:/var/spool/mail:/sbin/nologin
uucp:x:::uucp:/var/spool/uucp:/sbin/nologin
operator:x:::operator:/root:/sbin/nologin
games:x:::games:/usr/games:/sbin/nologin
gopher:x:::gopher:/var/gopher:/sbin/nologin
ftp:x:::FTP User:/var/ftp:/sbin/nologin
nobody:x:::Nobody:/:/sbin/nologin
dbus:x:::System message bus:/:/sbin/nologin
vcsa:x:::virtual console memory owner:/dev:/sbin/nologin
abrt:x::::/etc/abrt:/sbin/nologin
haldaemon:x:::HAL daemon:/:/sbin/nologin
ntp:x::::/etc/ntp:/sbin/nologin
saslauth:x:::"Saslauthd user":/var/empty/saslauth:/sbin/nologin
postfix:x::::/var/spool/postfix:/sbin/nologin
sshd:x:::Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
tcpdump:x::::/:/sbin/nologin
nscd:x:::NSCD Daemon:/:/sbin/nologin
nslcd:x:::LDAP Client User:/:/sbin/nologin
dd:x::::/home/dd:/bin/bash
mysql:x::::/home/mysql:/sbin/nologin
vsftpd:x::::/home/vsftpd:/sbin/nologin
www:x::::/storage/www:/sbin/nologin
hadoop:x::::/home/hadoop:/bin/bash

我们替换1一个好的设备进去

root@VM_160_34_centos:~> mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Fri Nov ::
Raid Level : raid1
Array Size : (1034.57 MiB 1084.64 MB)
Used Dev Size : (1034.57 MiB 1084.64 MB)
Raid Devices :
Total Devices :
Persistence : Superblock is persistent Update Time : Fri Nov ::
State : clean, degraded
Active Devices :
Working Devices :
Failed Devices :
Spare Devices : Name : VM_160_34_centos: (local to host VM_160_34_centos)
UUID : 4e1ea263:6297d669:9d5877af:6e5fc1e0
Events : Number Major Minor RaidDevice State
active sync /dev/xvdb7
removed

添加 xvdb 9

root@VM_160_34_centos:~> mdadm /dev/md1 -a /dev/xvdb9
mdadm: added /dev/xvdb9
root@VM_160_34_centos:~> mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Fri Nov ::
Raid Level : raid1
Array Size : (1034.57 MiB 1084.64 MB)
Used Dev Size : (1034.57 MiB 1084.64 MB)
Raid Devices :
Total Devices :
Persistence : Superblock is persistent Update Time : Fri Nov ::
State : clean
Active Devices :
Working Devices :
Failed Devices :
Spare Devices : Name : VM_160_34_centos: (local to host VM_160_34_centos)
UUID : 4e1ea263:6297d669:9d5877af:6e5fc1e0
Events : Number Major Minor RaidDevice State
active sync /dev/xvdb7
active sync /dev/xvdb9

如果我们再 raid 中添加了3个设备, 那么空余那个会在其中一个设备坏了的之后制动替换掉坏掉的那个.

为了方便以后装载,我们把配置写入配置文件

将当前RAID信息保存至配置文件,以便以后进行装配:
mdamd -D --scan > /etc/mdadm.conf

创建一个 2G的 raid5(只要有冗余的都支持空闲盘,所以我们需要4个1G的设备,跟raid1的用法是一样的)

  

md RAID的更多相关文章

  1. 图文并茂 RAID 技术全解 – RAID0、RAID1、RAID5、RAID10

    RAID 技术相信大家都有接触过,尤其是服务器运维人员,RAID 概念很多,有时候会概念混淆.这篇文章为网络转载,写得相当不错,它对 RAID 技术的概念特征.基本原理.关键技术.各种等级和发展现状进 ...

  2. 【转】RAID 技术发展综述

    原文地址:https://blog.csdn.net/liuaigui/article/details/4581970   摘要 :现代企业信息化水平不断提高,数据已经取代计算成为了信息计算的中心.这 ...

  3. 图文并茂 RAID 技术全解 – RAID0、RAID1、RAID5、RAID100

    RAID 技术相信大家都有接触过,尤其是服务器运维人员,RAID 概念很多,有时候会概念混淆.这篇文章为网络转载,写得相当不错,它对 RAID 技术的概念特征.基本原理.关键技术.各种等级和发展现状进 ...

  4. RAID技术全解图解-RAID0、RAID1、RAID5、RAID100【转】

    图文并茂 RAID 技术全解 – RAID0.RAID1.RAID5.RAID100…… RAID 技术相信大家都有接触过,尤其是服务器运维人员,RAID 概念很多,有时候会概念混淆.这篇文章为网络转 ...

  5. RAID技术超详细讲解

    RAID 技术是一种多磁盘技术,面对数据的各方面有着两面性的影响,整体来说优点大于缺点的,下面我将详细介绍一下 RAID ,简称磁盘阵列技术. 一.RAID 概述 1988 年美国加州大学伯克利分校的 ...

  6. RAID 技术全解

    图文并茂 RAID 技术全解 – RAID0.RAID1.RAID5.RAID100-- RAID 技术相信大家都有接触过,尤其是服务器运维人员,RAID 概念很多,有时候会概念混淆.这篇文章为网络转 ...

  7. Linux就这个范儿 第10章 生死与共的兄弟

    Linux就这个范儿 第10章 生死与共的兄弟 就说Linux系统的开机.必须经过加载BIOS.读取MBR.Boot Loader.加载内核.启动init进程并确定运行等级.执行初始化脚本.启动内核模 ...

  8. Linux的正则表达式grep,egrep

    一.概念 正则表达式是对字符串操作的一种逻辑公式,用事先定义好的一组特殊字符,组成一个"规则字符集合",根据用户指定的文本模式对目标文件进行逐行搜索匹配,显示能被模式匹配到的结果. ...

  9. Logical Volume Manager (LVM)

    LVM 是一种可用在Linux内核的逻辑分卷管理器:可用于管理磁盘驱动器或其他类似的大容量存储设备. 本文提供如何在 Arch Linux 中配置和使用 Logical Volume Manager ...

随机推荐

  1. 2015影响因子Excel版

    现在终于有影响因子2015的Excel版了,这个版本除了还包括杂志全称和缩写等基本信息还,包括中科院分区, 应该是迄今2015影响因子最奢华的版本了吧. 看了这个版本,发现中国的SCI杂志还是不少的, ...

  2. [TimusACM][1258]程序员撞墙的问题

    (本文是从我的旧博客迁移过来的) 问题地址:http://acm.timus.ru/problem.aspx?space=1&num=1258 前几日在博客园看到这种在线测试的时候,有一种相见 ...

  3. Linux磁盘与文件系统概念理解

    磁盘级别概念     这里讲的主要是网上所谓的老式磁盘,它是由一个个盘片组成的,我们先从个盘片结构讲起.如图1所示,图中的一圈圈灰色同心圆为一条条磁道,从圆心向外画直线,可以将磁道划分为若干个弧段,每 ...

  4. ASP.Net网站部署失败

    部署站点时候,出现如下错误 “/”应用程序中的服务器错误. ---------------------------------------------------------------------- ...

  5. aspx利用cookie值来停止silverlight中的计时器

    一.silverlight与silverlight中可以利用委托(delegate)来刷新frame.Refresh() 1.在子类中定义委托捕捉关闭事件按钮 public delegate void ...

  6. (原创)LINUX_UNIX设计思想-读书笔记

    第一章 一.Unit哲学 1.小即是美 2.让每一个程序只做好一件事情 3.尽快建立原型 4.舍高效率而取可移植性 5.使用纯文本文件来存储数据 6.充分利用软件的杠杆效应 7.使用shell脚本来提 ...

  7. Laravel 5 基础(三)- 向视图传送数据

    我们在Routes.php中新建一个路由 Route::get('about', 'PagesController@about'); 在浏览器中浏览会获得一个错误,错误信息仅仅是一个提示信息,缺少细节 ...

  8. delphi的UTF8相关函数

    delphi的UTF8相关函数 AnsiToUtf8 function Converts a string encoded in Ansi to UTF-8. PUCS4Chars function ...

  9. 利用ajax在javascript中获取后台的值

    <script type="text/javascript"> function login() { var sa = WebForm1.Hello().value; ...

  10. haproxy 常用acl规则与会话保持

    一.常用的acl规则 haproxy的ACL用于实现基于请求报文的首部.响应报文的内容或其它的环境状态信息来做出转发决策,这大大增强了其配置弹性.其配置法则通常分为两 步,首先去定义ACL,即定义一个 ...