发布时间:2020-06-16 15:20:39来源:阅读:
[root@master 桌面]# fdisk -l
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 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: 0x0004bbc1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM
Disk /dev/mapper/vg_hadoop-lv_root: 18.8 GB, 18798870528 bytes
255 heads, 63 sectors/track, 2285 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: 0x00000000
Disk /dev/mapper/vg_hadoop-lv_swap: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 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: 0x00000000
fdisk /dev/sda
Command (m for help): m //输入m查看帮助文档
Command (m for help): n //输入n新建分区
[root@master ~]# fdisk /dev/sda
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): m
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 for help): n
Command action
e extended
p primary partition (1-4)
有扩展分区和主分区,逻辑分区在扩展分区中建立。注意到括号中的1-4,最多只能建四个主分区(包括扩展分区)。这里创建扩展分区,
输入 : e #建立扩展分区
Partition number (1-4) : 3 #因为已经有sda1、sda2了
First cylinder (2611-7832, default 2611):Last cylinder, +cylinders or +size{K,M,G} (2611-7832, default 7832): #直接Enter键,默认即可
Command (m for help): p #查看分区结果
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (2611-7832, default 2611):
Using default value 2611
Last cylinder, +cylinders or +size{K,M,G} (2611-7832, default 7832):
Using default value 7832
Command (m for help): p
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 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: 0x0004bbc1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM
/dev/sda3 2611 7832 41939020 5 Extended
Command (m for help): n
输入 : l 建立逻辑分区
Command (m for help): p #查看分区结果
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (2611-7832, default 2611):
Using default value 2611
Last cylinder, +cylinders or +size{K,M,G} (2611-7832, default 7832):
Using default value 7832
Command (m for help): p
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 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: 0x0004bbc1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM
/dev/sda3 2611 7832 41939020 5 Extended
/dev/sda5 2611 7832 41938988+ 83 Linux
Command (m for help):w #保存退出
输入 reboot 重启系统生效。
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 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
fdisk -l
[root@master local]# fdisk -l
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 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: 0x0004bbc1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM
/dev/sda3 2611 7832 41939020 5 Extended
/dev/sda5 2611 7832 41938988+ 83 Linux
Disk /dev/mapper/vg_hadoop-lv_root: 18.8 GB, 18798870528 bytes
255 heads, 63 sectors/track, 2285 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: 0x00000000
Disk /dev/mapper/vg_hadoop-lv_swap: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 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: 0x00000000
pvcreate /dev/sda5
[root@master local]# pvcreate /dev/sda5
Physical volume "/dev/sda5" successfully created
pvdisplay /dev/sda5
[root@master local]# pvdisplay /dev/sda5
"/dev/sda5" is a new physical volume of "40.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda5
VG Name
PV Size 40.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID qX00lY-nkpd-4txl-HFwM-6NuT-wMqu-yEFehV
vgdisplay
[root@master local]# vgdisplay
--- Volume group ---
VG Name vg_hadoop
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc PE / Size 4994 / 19.51 GiB
Free PE / Size 0 / 0
VG UUID iQqDwB-Ft3T-aFfh-7nwK-alS3-LSMo-Uid9nz
vgextend vg_hadoop /dev/sda5
[root@master local]# vgextend vg_hadoop /dev/sda5
Volume group "vg_hadoop" successfully extended
vgdisplay
[root@master local]# vgdisplay
--- Volume group ---
VG Name vg_hadoop
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 59.50 GiB
PE Size 4.00 MiB
Total PE 15232
Alloc PE / Size 4994 / 19.51 GiB
Free PE / Size 10238 / 39.99 GiB
VG UUID iQqDwB-Ft3T-aFfh-7nwK-alS3-LSMo-Uid9nz
df -h
[root@master local]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_hadoop-lv_root 18G 12G 5.1G 70% /
tmpfs 1.9G 224K 1.9G 1% /dev/shm
/dev/sda1 485M 40M 421M 9% /boot
/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 1
lvextend -L +38G /dev/mapper/vg_hadoop-lv_root
[root@master local]# lvextend -L +38G /dev/mapper/vg_hadoop-lv_root
Extending logical volume lv_root to 55.51 GiB
Logical volume lv_root successfully resized
lvdisplay /dev/vg_hadoop/lv_root
[root@master local]# lvdisplay /dev/vg_hadoop/lv_root
--- Logical volume ---
LV Path /dev/vg_hadoop/lv_root
LV Name lv_root
VG Name vg_hadoop
LV UUID wv0vJ6-c5Dd-Su9k-7dSV-P3KE-CF88-ElqYFA
LV Write Access read/write
LV Creation host, time hadoop, 2017-07-05 18:56:16 +0800
LV Status available
# open 1
LV Size 55.51 GiB
Current LE 14210
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
resize2fs /dev/vg_hadoop/lv_root
[root@master local]# resize2fs /dev/vg_hadoop/lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_hadoop/lv_root is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 4
Performing an on-line resize of /dev/vg_hadoop/lv_root to 14551040 (4k) blocks.
The filesystem on /dev/vg_hadoop/lv_root is now 14551040 blocks long.
df -h
[root@master local]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_hadoop-lv_root 55G 12G 41G 22% /
tmpfs 1.9G 224K 1.9G 1% /dev/shm
/dev/sda1 485M 40M 421M 9% /boot
/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 1
aida32(测试软硬件系统信息的工具)v3.7 汉化版
3.37MB
ceb文件阅读器下载
42.6M
cinebench r15(电脑系统测试软件)v15.0.3.7 绿色版
108.1M
excelrecovery(文件修复软件)V3.0 免费版
378KB
gghost一键恢复(系统备份还原工具)v10.03.09 中文版
14.5M
ghost11(系统ghost工具箱)v11.0 中文版
15.8M
hwinfo32(系统信息检测工具) v7.05.4490 中文版
10.1M
msvcp110(dll文件)2021 免费版
2.6M
ntbootautofix(多系统修复软件)v2.5.7 免费版
736.6K
oa系统(办公系统)v2.2.5 官方版
2.7M
pdf合并软件(pdf文件合并工具)v1.11 官方版
209.0M
pdf解密软件(pdf文件解密软件) v2.19 免费版
2.7M
swf播放器(SWF文件播放器)v6.0.0.3 官方版
2.5MB
烁光PDF转换器(文件格式转换工具) v1.2.2.0 免费版
42.46 MB
叶根友字体10套打包
28.61 MB
MyDiskTest下载
1.1M
advanced rar password recovery下载
4.3M
d3d9下载
530.9K
everest ultimate edition下载
6.7M
msvcp100下载
133.8K
2020-07-17
golang 自学系列(四)——debug for vscode
E73、E93z、E63z Win7系统下USB3.0驱动
B305一体机在Windows XP系统下网卡驱动下载及安装过程
如何禁用指纹的开机提示
Windows 8系统开机出现致命错误 c00000022 的解决思路
ThinkPad 选件:小红点多功能蓝牙键盘介绍及使用方法(4X30K12182)
linux系统中/bin、/usr/bin/与/sbin、/usr/sbin/的区别和用途
ubuntu安装mongodb数据库服务器
在WPS表格中如何进行表格合并计算?