linux 扩展文件系统
1. 创建新分区
[root@localhost ~]# fdisk -l Disk /dev/sda: 32.2 GB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk label type: dos
Disk identifier: 0x000a8293 Device Boot Start End Blocks Id System
/dev/sda1 * Linux
/dev/sda2 8e Linux LVM Disk /dev/mapper/cl-root: MB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes Disk /dev/mapper/cl-swap: MB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes [root@localhost ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Command (m for help): n
Partition type:
p primary ( primary, extended, free)
e extended
Select (default p): p
Partition number (,, default ):
First sector (-, default ):
Using default value
Last sector, +sectors or +size{K,M,G} (-, default ): +2G
Partition of type Linux and of size GiB is set Command (m for help): p Disk /dev/sda: 32.2 GB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk label type: dos
Disk identifier: 0x000a8293 Device Boot Start End Blocks Id System
/dev/sda1 * Linux
/dev/sda2 8e Linux LVM
/dev/sda3 Linux Command (m for help): t # 修改文件系统类型
Partition number (-, default ):
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM' Command (m for help): p Disk /dev/sda: 32.2 GB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk label type: dos
Disk identifier: 0x000a8293 Device Boot Start End Blocks Id System
/dev/sda1 * Linux
/dev/sda2 8e Linux LVM
/dev/sda3 8e Linux LVM Command (m for help): w
The partition table has been altered!
2. partprobe
[root@localhost named]# partprobe
3. 创建 pv
[root@localhost ~]# pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created.
[root@localhost ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name cl
PV Size 9.80 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE
Free PE
Allocated PE
PV UUID vBCY0m-syaR-HKNJ-FNlW-G7Ql-2eru-4ccPC6 "/dev/sda3" is a new physical volume of "2.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda3
VG Name
PV Size 2.00 GiB
Allocatable NO
PE Size
Total PE
Free PE
Allocated PE
PV UUID kRvof2-gzMz-raeu-njD7-vujG-N45B-yJemBd
4. 将 pv 添加到 vg
[root@localhost ~]# vgextend cl /dev/sda3
Volume group "cl" successfully extended
[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
cl wz--n- .80g .00g
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 cl lvm2 a-- .80g
/dev/sda3 cl lvm2 a-- .00g .00g
5. 扩展 lv
[root@localhost ~]# lvextend /dev/cl/root /dev/sda3
Size of logical volume cl/root changed from 7.80 GiB ( extents) to 9.80 GiB ( extents).
Logical volume cl/root successfully resized.
6. 扩展文件系统的逻辑边界
[root@localhost ~]# xfs_growfs /dev/cl/root
meta-data=/dev/mapper/cl-root isize= agcount=, agsize= blks
= sectsz= attr=, projid32bit=
= crc= finobt= spinodes=
data = bsize= blocks=, imaxpct=
= sunit= swidth= blks
naming =version bsize= ascii-ci= ftype=
log =internal bsize= blocks=, version=
= sectsz= sunit= blks, lazy-count=
realtime =none extsz= blocks=, rtextents=
data blocks changed from to
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root .8G 1021M .8G % /
devtmpfs .9G .9G % /dev
tmpfs .9G .9G % /dev/shm
tmpfs .9G 8.6M .9G % /run
tmpfs .9G .9G % /sys/fs/cgroup
/dev/sda1 197M 117M 81M % /boot
tmpfs 378M 378M % /run/user/
[root@localhost ~]#
linux 扩展文件系统的更多相关文章
- 如何扩展Linux虚拟内存文件系统
		
由于ArcGIS GeoAnalystics Server和Raster Analytics Server大数据分析平台都是基于Spark分析平台的,其部署服务器除了要求具有高内存特点外,也需要确保相 ...
 - chattr - 修改文件在Linux第二扩展文件系统(E2fs)上的特有属性
		
SYNOPSIS(总览) chattr [ -RV ] [ -v version ] [ mode ] files... DESCRIPTION(描述) chattr 修改文件在Linux第二扩展文件 ...
 - lsattr - 显示文件在Linux第二扩展文件系统上的特有属性
		
SYNOPSIS(总览) lsattr [ -RVadv ] [ files... ] DESCRIPTION(描述) lsattr 显示文件在Linux第二扩展文件系统上的特有属性 OPTIONS( ...
 - Linux及文件系统基本介绍
		
Linux及文件系统基本介绍 1 互联网行业现状 在服务器端市场: 超级计算机 2014年11月的数据显示前500系统中的485个系统都在运行着 Linux 的发布系统,而仅仅只有一台运行着 Wi ...
 - linux ext2 文件系统学习
		
Linux ext2文件系统理解 硬盘组成: 硬盘由多个圆形硬盘片组成.按照硬盘片能够容纳的数据量分为单盘和多盘.硬盘的数据读取主要靠机械手臂上的磁头,在机械手臂上有多个磁头.机械手臂不动硬盘旋转一 ...
 - linux下文件系统类型的学习
		
1. 以超级用户权限登陆Linux,进入 /lib/modules/2.6.32--504.el6.x86_64/kernel/fs目录执行 ls 命令(不同Linux发行版本的Fs目录有些不同你可 ...
 - linux的文件系统及节点表
		
linux的文件系统及节点表 一 linux的文件系统1 我们都知道当我们安装linux时会首先给系统分区,然后我们会把分区格式化成EXT3格式的文件系统.那么在linux系统中还有没有其他的文件系 ...
 - linux分区,文件系统,目录结构概述
		
1.Linux中如何表示硬盘,分区 Linux内核读取光驱,硬盘等资源时均通过“设备文件”的形式进行,因此在linux系统中,将硬 盘和分区表示为不同的文件.具体表述形式如下: 硬盘:对于IDE接口的 ...
 - 比起Windows,怎样解读Linux的文件系统与目录结构?
		
比起Windows,怎样解读Linux的文件系统与目录结构? Linux 和Windows的文件系统有些不同,在学习使用 Linux 之前,若能够了解这些不同,会有助于后续学习. 本文先对Window ...
 
随机推荐
- JavaScript(四)
			
条件语句 通过条件来控制程序的走向,就需要用到条件语句. 运算符 1.算术运算符: +(加). -(减). *(乘). /(除). %(求余)2.赋值运算符:=. +=. -=. *=. /=. %= ...
 - idea使用配置
			
一,打开窗口多行显示, Window→Editor Tabs→Tabs Placement→Show Tabs in Single Row 取消选中后即可在多行显示 2 .还可以自行设置打开文件窗口数 ...
 - jmeter--接口自动化jmeter+ant+jenkins
			
的 一.介绍 接口自动化工具:jmeter+ant+jenkins 流程: -1.jmeter已录制或手动设置好脚本后 -2.配置ant,使用Ant工具,进行批量执行jmeter的脚本 -3.使用Je ...
 - redis日志格式
			
在redis.conf中,在大概65行左右有个loglevel # 指定日志记录级别# Redis总共支持四个级别:debug.verbose.notice.warning,默认为verbose# d ...
 - CentOS裸机环境下安装php-7.3.1
			
安装步骤如下 安装必要的软件 获取源码 编译安装 安装过程可能遇到的一些问题 编译参数详解 安装步骤如下 安装必要的软件 yum install -y autoconf automake libtoo ...
 - hdfs 路径不支持‘:’
			
hdfs 路径不支持‘:’,但Linux支持. -put: Pathname /public/platform/control_center/file_center/weiflow/core-user ...
 - linux 中数据库的常用操作
			
1-连接数据库: mysql -h localhost -u jiangbiao -p xxxxx@xxx:~$ mysql -h localhost -u jiangbiao -p Enter pa ...
 - AVL树的Java实现
			
AVL树:平衡的二叉搜索树,其子树也是AVL树. 以下是我实现AVL树的源码(使用了泛型): import java.util.Comparator; public class AVLTree< ...
 - 自动化脚本测试,postman使用沉淀
			
// 服务器地址 var server = 'XXXXXXXXXXXX'; //秘钥Key var secretKey = 'XXXXXXXXXXXX'; //获取当前时间 function crea ...
 - 2018-2019-2 20165317《网络对抗技术》Exp1 PC平台逆向破解
			
2018-2019-2 20165317<网络对抗技术>Exp1 PC平台逆向破解 实验目的 掌握NOP, JNE, JE, JMP, CMP汇编指令的机器码 NOP:无作用,英文&quo ...