日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > linux >内容正文

linux

linux 逻辑卷扩展

發(fā)布時(shí)間:2024/4/15 linux 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 逻辑卷扩展 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

例如想擴(kuò)展 / 分區(qū)

[root@mysql mapper]# df -h
Filesystem??????????????????? Size? Used Avail Use% Mounted on
/dev/mapper/vg_mysql-lv_root?? 24G? 8.4G?? 14G? 39% /
tmpfs???????????????????????? 499M? 224K? 498M?? 1% /dev/shm
/dev/sda1???????????????????? 485M?? 35M? 426M?? 8% /boot
[root@mysql mapper]#fdik -l? 查看可用的磁盤

添加邏輯卷

[root@mysql mapper]# fdisk /dev/sdb

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):n

Command action
?? l?? logical (5 or over)
?? p?? primary partition (1-4)
l
First cylinder (1961-2610, default 1961):
Using default value 1961
Last cylinder, +cylinders or +size{K,M,G} (1961-2610, default 2610):
Using default value 2610

Command (m for help):w 保存

[root@mysql mapper]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x000b6c05

?? 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??????? 1306???? 9972736?? 8e? Linux LVM

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x3eb0062a

?? Device Boot????? Start???????? End????? Blocks?? Id? System
/dev/sdb1?????????????? 1??????? 2610??? 20964793+?? 5? Extended
/dev/sdb5?????????????? 1??????? 1306??? 10490382?? 83? Linux
/dev/sdb6??????????? 1307??????? 1960???? 5253223+? 83? Linux
/dev/sdb7??????????? 1961??????? 2610???? 5221093+? 83? Linux -----?新增邏輯卷

[root@mysql mapper]# partx -a /dev/sdb7
[root@mysql mapper]# pvcreate /dev/sdb7? 創(chuàng)建PV

[root@mysql mapper]# vgs??? 查看你需要擴(kuò)展的VG
? VG?????? #PV #LV #SN Attr?? VSize? VFree
? vg_mysql?? 3?? 2?? 0 wz--n- 24.52g 8.00m
[root@mysql mapper]#vgextend vg_mysql /dev/sdb6 擴(kuò)展VG

[root@mysql mapper]#lvextend -L +5G /dev/mapper/vg_mysql-lv_root 擴(kuò)展LV
[root@mysql mapper]#resize2fs /dev/mapper/vg_mysql-lv_root? 重置vg大小

?

?

?


?


?

轉(zhuǎn)載于:https://blog.51cto.com/xxmspace/1557818

總結(jié)

以上是生活随笔為你收集整理的linux 逻辑卷扩展的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。