linux分区 挂盘,linux分区,挂盘,LVM
1. 虚拟机可以添加sisc硬盘,添加了要重启虚拟机才能生效
重启后用fdisk -l可以查看到新添的盘,/dev/sdb是新加的第二块硬盘[[email protected] ~]# fdisk -l
Disk /dev/sdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00096eec
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 91 524288 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 91 1045 7658496 83 Linux
2. 磁盘分区
命令fdisk /dev/sdb
[[email protected]~]# fdisk /dev/sdb
Device containsneither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a newDOS disklabel with disk identifier 0x29a761e1.
Changes willremain in memory only, until you decide to write them.
After that, ofcourse, the previous content won‘t be recoverable.
Warning: invalidflag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING:DOS-compatible mode is deprecated. It‘s strongly recommended to
switch off the mode (command ‘c‘) andchange display units to
sectors (command ‘u‘).
Command (m forhelp):
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition‘s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m forhelp): p
Disk /dev/sdb:106 MB, 106954752 bytes
64 heads, 32sectors/track, 102 cylinders
Units = cylindersof 2048 * 512 = 1048576 bytes
Sector size(logical/physical): 512 bytes / 512 bytes
I/O size(minimum/optimal): 512 bytes / 512 bytes
Disk identifier:0x29a761e1
Device Boot Start End Blocks Id System
Command (m forhelp): n
Command action
e extended
p primary partition (1-4)
p
Partition number(1-4): 1
First cylinder(1-102, default 1):
Using defaultvalue 1
Last cylinder,+cylinders or +size{K,M,G} (1-102, default 102): +10m
Unsupportedsuffix: ‘m‘.
Supported: 10^N:KB (KiloByte), MB (MegaByte), GB (GigaByte)
2^N: K (KibiByte), M (MebiByte), G (GibiByte)
Last cylinder,+cylinders or +size{K,M,G} (1-102, default 102): +10M
Command (m forhelp): p
Disk /dev/sdb:106 MB, 106954752 bytes
64 heads, 32sectors/track, 102 cylinders
Units =cylinders of 2048 * 512 = 1048576 bytes
Sector size(logical/physical): 512 bytes / 512 bytes
I/O size(minimum/optimal): 512 bytes / 512 bytes
Disk identifier:0x29a761e1
Device Boot Start End Blocks Id System
/dev/sdb1 1 11 11248 83Linux
l查看分区类型
Command (m forhelp): l
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 39 Plan 9 82 Linux swap /So c1 DRDOS/sec (FAT-
2 XENIXroot 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
3 XENIXusr 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16<32M 41 PPC PReP Boot 85 Linux extended c7 Syrinx
5 Extended 42 SFS 86 NTFS volume set da Non-FSdata
6 FAT16 4d QNX4.x 87 NTFS volume set db CP/M / CTOS /.
7 HPFS/NTFS 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
8 AIX 4f QNX4.x 3rd part 8e Linux LVM df BootIt
9 AIXbootable 50 OnTrack DM 93 Amoeba e1 DOS access
#如果要修改分区类型,用t
Command (m forhelp): t
Partition number(1-8): 8
Hex code (type Lto list codes): 8e
Changed systemtype of partition 8 to 8e (Linux LVM)
#然后就可以看到Id变成了8e,即现在是lVM类型的分区了
Device Boot Start End Blocks Id System
/dev/sdb1 1 130 1044193+ 8e Linux LVM
3. 格式化分区[[email protected]~]# mkfs.ext4 -b 4096 -i 1024 /dev/sdb1
#格式化指定文件系统,inode和block,实际是默认的,不用指定
[[email protected]~]#mkfs.ext4 -T largerfile /dev/sdb1
-t: 文件系统
-T 快速格式化
4. 挂载[[email protected]~]# mount /dev/sdb1 /mnt
问题排错:如果出现如下错误:
[[email protected]~]# mount /dev/sdb1 /mnt #未格式化,无法挂载
mount: you mustspecify the filesystem type
5. 查看挂载结果
df -hT
原文:http://4951326.blog.51cto.com/4941326/1923594
linux分区 挂盘,linux分区,挂盘,LVM相关推荐
- Linux系列之fdisk 分区挂盘
2019/3/28 星期四 Linux系列之fdisk 分区挂盘 [root@hadoop04-184 ~]# df -Th Filesystem Type Size Used Avail Use% ...
- linux系统中的分区与挂载,以及使用LVM逻辑卷管理器管理物理卷,卷组,逻辑卷知识点总结
物理设备的命名规则 在Linux系统中一切都是文件,硬件设备也不例外.既然是文件,就必须有文件名称.系统内核中的udev设备管理器会自动把硬件名称规范起来,目的是让用户通过设备文件的名字可以猜出设备大 ...
- Linux基础--存储管理(逻辑卷lvm,swap交换分区,mount,raid磁盘阵列)
一.存储管理2 要点:逻辑卷lvm,swap交换分区,mount,raid磁盘阵列 盛年不重来,一日难再晨. 及时当勉励,岁月不待人. 1.逻辑卷LVM–(Logical Volume Manager ...
- linux分区 raid lvm,Linux磁盘知识,RAID,LVM
一.磁盘基础知识 1.磁盘和硬盘均是对磁盘存储系统的统一称呼.磁盘工作时,磁头悬浮在磁盘盘片上方做径向运动,互相不接触. 2.采购磁盘: (1)主轴转速速度快(r/min),5400/7200/100 ...
- linux lvm分区教程,Linux LVM入门使用教程
文章目录 [隐藏] LVM测试说明 准备磁盘分区 准备物理卷(PV) 准备卷组(VG) 创建逻辑卷(LV) 扩展一个LVM卷 缩减一个LVM卷 扩展一个卷组 逻辑卷管理LVM是一个多才多艺的硬盘系统工 ...
- linux 主分区转换 lvm,Linux磁盘管理,分区,格式化,lvm
df命令磁盘分区空间 du命令查看文件大小 磁盘分区 磁盘格式化 磁盘挂载mount 手动增加swap空间 lvm讲解 一.df命令磁盘分区空间 使用df可以查看文件系统的使用情况(即磁盘分区空间), ...
- lvm android分区合并,Linux LVM 分区扩容与多磁盘分区合并处理
1.概念描述 LVM主要在磁盘与文件系统之间创建一个层,主要用来管理多磁盘多分区进行与多文件系统的映射. 就是说N块硬盘分区后,能够把不一样硬盘之间的分区进行组卷,有了这个组卷后再从组卷的基础上分配逻 ...
- Linux单磁盘根分区扩容(非LVM)
硬件:DELL R720 系统:XEN 虚拟系统:CentOS 6.5 安装分区:总共三个/和/sawp和/boot 前言 本文适合单块磁盘扩容,比如一个物理250G的硬盘,刚开始只分配了100G,不 ...
- Linux系统之磁盘分区(基本分区和LVM逻辑卷分区)
一.磁盘简介 1.磁盘属性简介 •定义: 磁盘=硬盘=disk,与内存不一样的是容量比较大. •类型 从工作原理上分为机械硬盘和固态硬盘 机械硬盘:机械硬盘即是传统普通硬盘,主要由:盘片,磁头, ...
- linux挂载到哪个分区,Linux中直接挂载硬盘和挂载分区有什么区别?
1.问题 Linux中直接挂载硬盘和挂载分区有什么区别? 比如 /dev/sdb 的硬盘,直接mkfs.ext4 /dev/sdb 后mount 使用, 和 先fdisk 分区 ,在 mkfs ...
最新文章
- IDE之VS:利用 Visual Studio中的IDE配置python语言进行编程
- linux时间同修改,linux 系统时间修改同步
- 配置文件中的数据库连接串加密了,你以为我就挖不出来吗?
- nginx 上传 文件超时设置_Ingressnginx自定义配置文件
- 高性能滚动scroll(防抖和节流)
- 力扣-268 丢失的数字
- Python(五):list、tuple
- oracle索引index_type,oracle index索引相关笔记
- c语言iic通讯编程,I2C总线万能程序(C语言)
- 汽车“缺芯”的挑战与机遇
- C/C++笔试题(很多)
- vi使用手册(zt)
- 【PaLM2】PaLM2 大语言模型与 Bard 使用体验
- OpenLayers 之 地图图层数据来源(ol.source)详解,ps图层混合模式详解
- 【校招VIP】产品经理行测之数列题
- 36 数字组合(Combination Sum)
- 淘宝爆款打造公式(仅供参考)
- 插值法位同步 gardner算法
- vue下载文件并重命名
- 煤炭企业内部调拨物资称重问题如何管理(一)
热门文章
- Gartner:2021全球安全和风险支出将超1500亿美元
- 如何部署一个Kubernetes集群
- 如何在 Kubernetes 上配置 Jenkins?
- AI赋能红外测温助力精准防控疫情……
- Ubuntu上安装Hadoop集群
- java上传大文件_Java超大文件上传解决办法
- 网速dns怎么调快_怎么设置dns?教你快速解决网速慢的问题
- hasp运行不成功_提问:程序无报错或警告,但总是运行不成功,会卡住没反应...
- RabbitMQ集群原理介绍
- linux CentOS7最小化安装环境静默安装Oracle11GR2数据库(修改配置文件_06)