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 ...
随机推荐
- less 基础+ flex
1.less 中的变量 @ 符号 引入 /*普通变量*/ @color:pinker; .styles{ color:@color; } /*选择器变量*/ @I:img; @{I}{ width: ...
- Python全栈-magedu-2018-笔记1
第一章 - Python 环境搭建 操作系统准备 准备Linux最小系统即可. 如果在虚拟机中克隆,MAC地址会变. 这里使用CentOS 6.5+ Pyenv 安装 安装git yum instal ...
- Robot Framework 自动化测试 Selenium2Library 库 用法
Robot Framework自动化测试Selenium2Library库详细用法 一.浏览器驱动 通过不同的浏览器执行脚本. Open Browser Htpp://www.xxx.com ...
- Git 提示fatal: remote origin already exists 错误解决办法
今天使用git 添加远程github仓库的时候提示错误:fatal: remote origin already exists. 最后找到解决办法如下: 1.先删除远程 Git 仓库 $ git re ...
- 本地浏览器Websql数据库操作
前几天看到一个小姐姐问我一个添加修改的我看了一下案例弄了一个出来.... 参考案例:HTML5本地数据库(WebSQL)[转] - 狂流 - 博客园 https://www.cnblogs.com/ ...
- B-Tree与B+Tree简明扼要的区别
原文:https://blog.csdn.net/zhuanzhe117/article/details/78039692 看了很多讲B树和B+树的文章,大多都是围绕各自的特性讲的,第一,树中每个结点 ...
- jqgrid 插件的使用
首先设定table的id和分页 <div id=”gridList”></div> //table名称 <div id=”page”></div> ...
- 插值代码17个---MATLAB
函数名 功能Language 求已知数据点的拉格朗日插值多项式Atken 求已知数据点的艾特肯插值多项式Newton 求已知数据点的均差形式的牛顿插值多项式Newtonforward 求已知数据点的前 ...
- Linux 下如何修改用户名(同时修改用户组名和家目录)
有时候,由于某些原因,我们可能会需要重命名用户名.我们可以很容易地修改用户名以及对应的家目录和 UID.-- Shusain 本文导航◈ 修改用户名12%◈ 修改家目录43%◈ 更改用户 UID52% ...
- tensorflow training result