linux 磁盘管理详细介绍

linux磁盘介绍


什么是磁盘  什么是软盘  什么是硬盘 
磁盘的基本结构
盘片  
磁道  
扇区      512B
柱面  
磁头  

磁盘的相关概念
磁盘的接口:
IDE  SCSI 		# 淘汰了
SATA III    SAS         # 企业级 

SSD( SATA III    PCIE )
M2    超极本的接口标准                           MSATA   
      机械硬盘  HDD			       固态硬盘   SSD
      容量大价格低			       容量小价格贵 
      抗击打能力弱 			       抗击打能力强  
      读写速度慢				       读写速度快  
      数据损坏恢复易			       数据恢复难
      寿命一直使用			       使用期限有一定限制   

1)磁盘的命令方式

磁盘的命名方式:
/dev/sda1		# 第一块物理硬盘的第一个分区
/dev/sdb3		# 第二块物理硬盘的第三个分区 
/dev/vdc5		# 第三块虚拟硬盘的第5个分区 	
sd		        # 物理硬盘
vd		        # 虚拟硬盘 

2)磁盘的相关单位和术语

磁盘的相关单位和术语
尺寸:		2.5英寸    3.5英寸  
数据大小:	bit   B   KB   MB   GB   TB    PB    EB 
单位换算:   1024     1B=8b  
转速:	RPM    转/每分钟    5400    7200     10k     15k  
IOPS    衡量磁盘读写 IO的单位   每秒的输入输出 

两个分区表:
MBR  		适用于2TB      只能有4个主分区   扩展分区(逻辑分区 )  
		3个主分区 + 1个扩展分区( 逻辑分区...... )
MBR的位置:  0磁头0磁道1扇区      512字节  
446字节  MBR引导记录    
64字节4个主分区  
2字节分区结束标识符  

GPT		适用于2TB   128个主分区 
分区工具:
fdisk		# 适用于2TB的分区
gdisk		# 适用于2TB以上

fdisk分区

#  查看系统磁盘和分区情况
[root@localhost /mnt]# ll /dev/sd*
brw-rw---- 1 root disk 8,  0 Aug  3 10:43 /dev/sda
brw-rw---- 1 root disk 8,  1 Aug  3 10:43 /dev/sda1
brw-rw---- 1 root disk 8,  2 Aug  3 11:39 /dev/sda2
brw-rw---- 1 root disk 8,  3 Aug  3 10:43 /dev/sda3
brw-rw---- 1 root disk 8, 16 Aug  3 10:43 /dev/sdb
brw-rw---- 1 root disk 8, 17 Aug  3 10:43 /dev/sdb1
brw-rw---- 1 root disk 8, 32 Aug  3 10:45 /dev/sdc
brw-rw---- 1 root disk 8, 33 Aug  3 10:45 /dev/sdc1

#  查看磁盘分区结构详细信息
[root@localhost ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   20G  0 disk 
├─sda1   8:1    0  500M  0 part /boot
├─sda2   8:2    0    1G  0 part [SWAP]
└─sda3   8:3    0 18.5G  0 part /
sdb      8:16   0   20G  0 disk 
└─sdb1   8:17   0   10G  0 part 
sdc      8:32   0    3T  0 disk 
└─sdc1   8:33   0    3T  0 part 
sr0     11:0    1  4.3G  0 rom 

#  详细查看fdisk分区格式的分区信息
[root@localhost ~]# fdisk -l /dev/sda
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000ac22f
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048     3123199     1048576   82  Linux swap / Solaris
/dev/sda3         3123200    41943039    19409920   83  Linux

# 进行fdisk分区 创建分区
[root@localhost ~]# fdisk /dev/sdb                                   #  针对sdb磁盘进行fdisk分区
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n                                              #  n创建新分区
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p                                                # P创建主分区
Partition number (2-4, default 2): 2                                 # 2主分区的编号
First sector (20973568-41943039, default 20973568):                  # 从哪个扇区位置开始
Using default value 20973568
Last sector, +sectors or +size{K,M,G} (20973568-41943039, default 41943039):   # 给多大的空间
Using default value 41943039
Partition 2 of type Linux and of size 10 GiB is set                            # 分区成功

Command (m for help): w                                                        # 保存退出
The partition table has been altered!

Calling ioctl() to re-read partition table.                                    # 提示重新加载一下分区
Syncing disks.

# 分区创建好了需要格式化一下
[root@localhost ~]# mkfs.xfs /dev/sdb2
meta-data=/dev/sdb2              isize=512    agcount=4, agsize=655296 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=2621184, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

# 格式化好后就可以使用了 挂载目录
[root@localhost ~]# mkdir /fisk_sdb2              # 创建挂载目录
[root@localhost ~]# mount /dev/sdb2 /fisk_sdb2/   # 挂载
[root@localhost ~]# ll /fisk_sdb2
total 0
[root@localhost ~]# df -h                         # 查看磁盘挂载
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        19G  1.4G   18G   8% /
devtmpfs        900M     0  900M   0% /dev
tmpfs           910M     0  910M   0% /dev/shm
tmpfs           910M  9.5M  901M   2% /run
tmpfs           910M     0  910M   0% /sys/fs/cgroup
/dev/sda1       497M  130M  367M  27% /boot
tmpfs           182M     0  182M   0% /run/user/0
/dev/sdb2        10G   33M   10G   1% /fisk_sdb2

# 测试挂载是否可用
[root@localhost ~]# dd if=/dev/zero of=/fisk_sdb2/data bs=100M count=10
10+0 records in
10+0 records out
1048576000 bytes (1.0 GB) copied, 2.83371 s, 370 MB/s
[root@localhost ~]# ll /fisk_sdb2/data
-rw-r--r-- 1 root root 1048576000 Aug  3 16:20 /fisk_sdb2/data

# 实现永久挂载开机自动挂载
# 查看磁盘uuid号
[root@localhost ~]# blkid
/dev/sr0: UUID="2018-11-25-23-54-16-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" 
/dev/sda1: UUID="4b4a640f-2389-47bb-8318-fe69554236d5" TYPE="xfs" 
/dev/sda2: UUID="2439ad1b-794a-47c3-9715-94c2e55215af" TYPE="swap" 
/dev/sda3: UUID="8647091b-fad2-423c-898b-91fbdb48b908" TYPE="xfs" 
/dev/sdb1: UUID="07e38a19-75bf-49b9-8719-e445f7e94598" TYPE="xfs" 
/dev/sdb2: UUID="16d22521-821d-4055-a60e-f26b60d27d0a" TYPE="xfs" 
/dev/sdc1: PARTLABEL="Linux filesystem" PARTUUID="b0b79b87-d0ca-46a5-b9be-fb627fed6f83"

# 通过uuid进行永久挂载挂载
[root@localhost ~]# vim /etc/fstab
[root@localhost ~]# vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Jul  5 00:10:31 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=8647091b-fad2-423c-898b-91fbdb48b908 /                       xfs     defaults        0 0
UUID=4b4a640f-2389-47bb-8318-fe69554236d5 /boot                   xfs     defaults        0 0
UUID=2439ad1b-794a-47c3-9715-94c2e55215af swap                    swap    defaults        0 0
UUID=16d22521-821d-4055-a60e-f26b60d27d0a /fisk_sdb2              xfs     defaults        0 0

[root@localhost ~]# mount -a  # 重新加载挂载点目录


# 配置挂载文件说明
#以空白字符为分隔符,分为6列:
第一列:		挂载的设备  挂载的地址  网络设备地址  
第二列:		挂载点  挂载的目录  空目录 
第三列:		文件系统的类型   xfs 7默认的  ext4 6默认的  nfs  gfs
第四列:		挂载的参数  defaults

第五列: 	是否允许dump进行备份  
		0	# 不备份
		1	# 每天备份
		2	# 不定期备份 
		
第六列:	       是否通过fsck命令检查磁盘 
		0	# 不检查 
		1	# 检查  检查顺序  先检查 /  
		2	# 检查顺序

gdisk分区


# 安装gdisk挂载工具
[root@qls ~]# yum  install  -y  gdisk

# 查看磁盘分区层级详细信息
[root@qls ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  100G  0 disk 
├─sda1   8:1    0  500M  0 part /boot
├─sda2   8:2    0    2G  0 part [SWAP]
└─sda3   8:3    0 97.5G  0 part /
sdb      8:16   0  100G  0 disk 
├─sdb1   8:17   0   10G  0 part /fdisk01
├─sdb2   8:18   0    1K  0 part 
└─sdb5   8:21   0   20G  0 part 
sdc      8:32   0    3T  0 disk 
sr0     11:0    1  4.3G  0 rom  

# 查看gdisk分区格式的分区信息
[root@qls ~]# gdisk  -l  /dev/sdc
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present
Creating new GPT entries.
Disk /dev/sdc: 6442450944 sectors, 3.0 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2BF39D49-315B-42C3-9C9C-C5A98D1EBB71
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 6442450910
Partitions will be aligned on 2048-sector boundaries
Total free space is 6442450877 sectors (3.0 TiB)
Number  Start (sector)    End (sector)  Size       Code  Name



# 创建分区 
[root@qls ~]# gdisk    /dev/sdc
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present
Creating new GPT entries.
Command (? for help): ?
b	back up GPT data to a file
c	change a partition's name
d	delete a partition				#删除分区
i	show detailed information on a partition
l	list known partition types		#显示分区类型 
n	add a new partition				#创建一个新的分区 
o	create a new empty GUID partition table (GPT)
p	print the partition table		#打印分区表
q	quit without saving changes		#不保存退出
r	recovery and transformation options (experts only)
s	sort partitions
t	change a partition's type code
v	verify disk
w	write table to disk and exit	#保存退出 
x	extra functionality (experts only)
?	print this menu					#帮助
Command (? for help): 
Command (? for help): n		#创建分区
Partition number (1-128, default 1): 	#分区编号
First sector (34-6442450910, default = 2048) or {+-}size{KMGTP}: 		#扇区起始位置
Last sector (2048-6442450910, default = 6442450910) or {+-}size{KMGTP}: 	#扇区结束位置
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 		#选择分区类型 
Changed type of partition to 'Linux filesystem'
Command (? for help): p		#打印分区表信息
Disk /dev/sdc: 6442450944 sectors, 3.0 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2E58E6D9-4971-4B2F-A455-16D3A5115002
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 6442450910
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      6442450910   3.0 TiB     8300  Linux filesystem
Command (? for help): 
Command (? for help): w		#保存退出
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y		#是否确认 
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.

# 格式化,创建文件系统 
[root@qls ~]# mkfs.xfs   /dev/sdc1
meta-data=/dev/sdc1              isize=512    agcount=4, agsize=201326527 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=805306107, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=393215, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

# 创建挂载点,进行挂载 
[root@qls ~]# mkdir   /gdisk01
[root@qls ~]# mount  /dev/sdc1  /gdisk01
[root@qls ~]# df -h  | grep  '/gdisk01'
/dev/sdc1       3.0T   33M  3.0T   1% /gdisk01
[root@qls ~]# cp  /fdisk01/test.log   /gdisk01/
[root@qls ~]# df -h  | grep  '/gdisk01'
/dev/sdc1       3.0T  1.1G  3.0T   1% /gdisk01
[root@qls ~]# 


# 永久挂载 
[root@qls ~]# tail  -1 /etc/fstab
/dev/sdc1			          /gdisk01                xfs     defaults        0 0
[root@qls ~]# mount -a
[root@qls ~]# 

磁盘的挂载方式


在Linux系统中,所有的设备必须挂载才能使用 
mount		# 挂载的命令
选项:
	-t		# 指定文件系统     网络协议   nfs
	-o		# 指定挂载的参数 	
	-a		# 重新挂载/etc/fstab文件中的挂载列表 

umount		# 卸载 
选项:
	-l      # 强制卸载  

[root@qls fdisk01]# umount /fdisk01		# 不能在挂载的目录中进行卸载
[root@qls fdisk01]# umount  -l  /dev/sdb1       # 强制卸载挂载

# 通过uuid挂载
[root@qls ~]# mount  UUID="0668e9f1-7d37-42eb-9e79-980f6352c342"   /fdisk01/

# 以空白字符为分隔符,分为6列:
第一列:		挂载的设备  挂载的地址  网络设备地址  
第二列:		挂载点  挂载的目录  空目录 
第三列:		文件系统的类型   xfs 7默认的  ext4 6默认的  nfs  gfs
第四列:		挂载的参数  defaults

第五列:	是否允许dump进行备份  
		0	# 不备份
		1	# 每天备份
		2	# 不定期备份 
		
第六列:	是否通过fsck命令检查磁盘 
		0	# 不检查 
		1	# 检查  检查顺序  先检查 /  
		2	# 检查顺序 

虚拟内存


# pratprobe告诉操作系统内核已经发生变化


Out of memory
OOM		# 内存溢出   内存不足 

# free查看内存使用情况
[root@localhost ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1863224       85432      622216        9708     1155576     1593040
Swap:       1048572           0     1048572

虚拟内存 
# 添加一个swap分区 
# 创建一个1G的分区
# 创建一个fdisk格式分区
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x368ba5c5
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-209715199, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): +1G
Partition 1 of type Linux and of size 1 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

# 把新创建的格式分区是设置成swap文件
[root@localhost ~]# mkswap /dev/sdb1
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=97d9b776-5dbd-4068-9446-8d5e60b07a7c

# 把swap文件交给内存使用
[root@localhost ~]# swapon /dev/sdb1
[root@localhost ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1863224      129728     1588624        9688      144872     1569524
Swap:       2097144           0     2097144

# 取消swap文件
[root@localhost ~]# swapoff /dev/sdb1
[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        126M        1.5G        9.5M        141M        1.5G
Swap:          1.0G          0B        1.0

# 禁用swap
[root@localhost ~]# swapoff -a
[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        125M        1.5G        9.5M        141M        1.5G
Swap:            0B          0B          0B

# 启用swap
[root@localhost ~]# swapon -a
[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        125M        1.5G        9.5M        141M        1.5G
Swap:          1.0G          0B        1.0G


# 生成一个大文件  作为swap
[root@localhost ~]# dd if=/dev/zero of=/root/swap.txt bs=100M count=10
10+0 records in
10+0 records out
1048576000 bytes (1.0 GB) copied, 17.0654 s, 61.4 MB/s
[root@localhost ~]# ll
total 1024000
-rw-r--r-- 1 root root 1048576000 Aug  3 19:27 swap.txt

# 把文件设置成swap文件
[root@localhost ~]# mkswap ./swap.txt 
Setting up swapspace version 1, size = 1023996 KiB
no label, UUID=f80dcef6-db90-4cba-acc1-629c5e0a08f8

# 文件建议改成600权限
[root@localhost ~]# chmod 600 ./swap.txt 

# 启用该文件作为swap
[root@localhost ~]# swapon /root/swap.txt
[root@localhost ~]# free 
              total        used        free      shared  buff/cache   available
Mem:        1863224      130112      534972        9688     1198140     1545012
Swap:       2072568           0     2072568

# 开机自动挂载
vim /etc/fstab
/root/swap.txt          swap     swap    defaults        0  0

/root/swap.txt为挂载的源文件路径
swap(第2行)         为挂载的目的路径(swap为特殊的分区,不是个目录)
swap(第3行)       为文件的类型

raid基本介绍



磁盘阵列技术 
做磁盘阵列的好处:
1. 获得更高的容量 
2. 获得更高的性能  
3. 让数据更安全  冗余  

如何做RAID:
软件实现   软RAID   不推荐    mdadm  
硬件RAID    RAID卡实现的      推荐    
做RAID什么时候做:
在装系统之前做

RAID的级别:
级别	别名           硬盘数量 	容量	  性能		容错性
RAID0	条带卷	       至少两块  N*单块    读写最快	0
RAID1   镜像卷	       只能两块  损失一半  写慢 读一般    50%
RAID5	校验卷 	       至少3块   浪费一块  读写一般       N分之一 只能坏一块
RAID10	镜像阵列条带卷  至少4块   浪费一半  读写很快       50%  

LVM概述


逻辑卷管理   
PV	#物理卷    硬盘    分区   
VG	#卷组      多个硬盘 多个分区组成 
LV	#逻辑卷	分区   逻辑分区 
PE	#基本单元	  4MB     一个LV只能分配65534个PE  

磁盘故障解决

#  磁盘大文件占了空间
[root@qls ~]# echo  "123" >> /opt/file.txt
-bash: echo: write error: No space left on device      # 磁盘空间不足 

# 检查磁盘空间发现被占满
[root@qls ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        98G  6.4G   92G   7% /
devtmpfs        980M     0  980M   0% /dev
tmpfs           991M     0  991M   0% /dev/shm
tmpfs           991M  9.6M  981M   1% /run
tmpfs           991M     0  991M   0% /sys/fs/cgroup
/dev/sda1       497M  120M  378M  25% /boot
tmpfs           199M     0  199M   0% /run/user/0
/dev/sdb1        10G  1.1G  9.0G  11% /fdisk01
/dev/sdb4       2.0G  2.0G   20K 100% /opt

# 找到这个大文件  确认好之后在删  一级一级往下找 
[root@qls ~]# du  -sh  /opt/*  | grep  'G'
2.0G	/opt/test.log



# 磁盘被许多小文件占满了导致ionde号不够了
[root@qls ~]# echo  "123"  >>/opt/test.txt
-bash: /opt/test.txt: No space left on device
[root@qls ~]# 

# 检查空间磁盘
[root@qls ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        98G  6.4G   92G   7% /
devtmpfs        980M     0  980M   0% /dev
tmpfs           991M     0  991M   0% /dev/shm
tmpfs           991M  9.6M  981M   1% /run
tmpfs           991M     0  991M   0% /sys/fs/cgroup
/dev/sda1       497M  120M  378M  25% /boot
tmpfs           199M     0  199M   0% /run/user/0
/dev/sdb1        10G  1.1G  9.0G  11% /fdisk01
/dev/sdb4       2.0G  582M  1.5G  29% /opt

# 查看都是小文件
[root@qls ~]# df -i
Filesystem       Inodes   IUsed    IFree IUse% Mounted on
/dev/sda3      51123712   46093 51077619    1% /
devtmpfs         250786     417   250369    1% /dev
tmpfs            253511       1   253510    1% /dev/shm
tmpfs            253511     774   252737    1% /run
tmpfs            253511      16   253495    1% /sys/fs/cgroup
/dev/sda1        256000     326   255674    1% /boot
tmpfs            253511       1   253510    1% /run/user/0
/dev/sdb1       5242880       4  5242876    1% /fdisk01
/dev/sdb4       1048576 1048576        0  100% /opt

# 都是目录占了大多空间
[root@qls ~]# find  /opt/ -type  d   -size  +2M  | xargs  ls -lhd
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test01
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test02
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test03
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test04
drwxr-xr-x 2 root root 3.7M Aug  3 12:27 /opt/test/test05

# 找到这些小文件目录
[root@qls ~]# find  /opt/ -type  d   -size  +1M  | xargs  ls -lhd
drwxr-xr-x 2 root root 1.2M Aug  3 12:25 /opt/test/data01
drwxr-xr-x 2 root root 1.2M Aug  3 12:25 /opt/test/data02
drwxr-xr-x 2 root root 1.2M Aug  3 12:25 /opt/test/data03
drwxr-xr-x 2 root root 1.2M Aug  3 12:25 /opt/test/data04
drwxr-xr-x 2 root root 1.2M Aug  3 12:25 /opt/test/data05
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test01
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test02
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test03
drwxr-xr-x 2 root root 3.8M Aug  3 12:27 /opt/test/test04
drwxr-xr-x 2 root root 3.7M Aug  3 12:27 /opt/test/test05
[root@qls ~]# ll /opt/test/data01  | wc -l
50001

#找到之后,确认在删除  
[root@qls ~]# find  /opt/test/data01 -type  f  -delete
[root@qls ~]# rm -f  /opt/test/test01/*
-bash: /usr/bin/rm: Argument list too long
[root@qls ~]# ll  /opt/test/test01/ | wc -l
150001

创建磁盘分区过程图

创建虚拟内存过程图

posted @ 2020-08-03 19:48  nick_xm  阅读(465)  评论(0编辑  收藏  举报