CentOS Linux release 7磁碟擴容
[root@Userv-a cl]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@Userv-a cl]#
[root@Userv-a ~]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a70d7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 209715199 103808000 8e Linux LVM
Disk /dev/mapper/cl-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cl-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cl-home: 44.1 GB, 44149243904 bytes, 86228992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@Userv-a ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@Userv-a ~]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a70d7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 209715199 103808000 8e Linux LVM
Disk /dev/mapper/cl-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cl-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cl-home: 44.1 GB, 44149243904 bytes, 86228992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@Userv-a ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.
[root@Userv-a ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 cl lvm2 a-- <99.00g 4.00m
/dev/sdb lvm2 --- 100.00g 100.00g
[root@Userv-a ~]# vgextend cl /dev/sdb
Volume group "cl" successfully extended
[root@Userv-a ~]# vgs
VG #PV #LV #SN Attr VSize VFree
cl 2 3 0 wz--n- 198.99g 100.00g
[root@Userv-a ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 cl lvm2 a-- <99.00g 4.00m
/dev/sdb cl lvm2 a-- <100.00g <100.00g
[root@Userv-a ~]# cd /dev
[root@Userv-a dev]# ls
agpgart cpu fd0 loop-control oldmem sda1 stderr tty14 tty23 tty32 tty41 tty50 tty6 ttyS2 vcs4 vfio
autofs cpu_dma_latency full mapper port sda2 stdin tty15 tty24 tty33 tty42 tty51 tty60 ttyS3 vcs5 vga_arbiter
block crash fuse mcelog ppp sdb stdout tty16 tty25 tty34 tty43 tty52 tty61 uhid vcs6 vhci
bsg disk hpet mem ptmx sg0 tty tty17 tty26 tty35 tty44 tty53 tty62 uinput vcsa vhost-net
btrfs-control dm-0 hugepages mqueue pts sg1 tty0 tty18 tty27 tty36 tty45 tty54 tty63 urandom vcsa1 vmci
cdrom dm-1 hwrng net random sg2 tty1 tty19 tty28 tty37 tty46 tty55 tty7 usbmon0 vcsa2 vsock
char dm-2 initctl network_latency raw shm tty10 tty2 tty29 tty38 tty47 tty56 tty8 vcs vcsa3 zero
cl dri input network_throughput rtc snapshot tty11 tty20 tty3 tty39 tty48 tty57 tty9 vcs1 vcsa4
console fb0 kmsg null rtc0 snd tty12 tty21 tty30 tty4 tty49 tty58 ttyS0 vcs2 vcsa5
core fd log nvram sda sr0 tty13 tty22 tty31 tty40 tty5 tty59 ttyS1 vcs3 vcsa6
[root@Userv-a dev]# cd cl
[root@Userv-a cl]# ls
home root swap
[root@Userv-a cl]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 50G 45G 5.7G 89% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 137M 3.7G 4% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 179M 836M 18% /boot
/dev/mapper/cl-home 42G 682M 41G 2% /home
tmpfs 783M 0 783M 0% /run/user/0
[root@Userv-a cl]#
[root@Userv-a cl]# lvextend -L 80g /dev/cl/root
Size of logical volume cl/root changed from 50.00 GiB (12800 extents) to 80.00 GiB (20480 extents).
Logical volume cl/root successfully resized.
[root@Userv-a cl]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 50G 45G 5.7G 89% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 137M 3.7G 4% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 179M 836M 18% /boot
/dev/mapper/cl-home 42G 682M 41G 2% /home
tmpfs 783M 0 783M 0% /run/user/0
[root@Userv-a cl]# xfs_growfs /dev/cl/root
meta-data=/dev/mapper/cl-root isize=512 agcount=4, agsize=3276800 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=13107200, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=6400, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 13107200 to 20971520
[root@Userv-a cl]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 80G 45G 36G 56% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 137M 3.7G 4% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 179M 836M 18% /boot
/dev/mapper/cl-home 42G 682M 41G 2% /home
tmpfs 783M 0 783M 0% /run/user/0
[root@Userv-a cl]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2639974/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VirtualBox擴容CentOS-7虛擬機器磁碟CentOS虛擬機
- linux 給lvm磁碟擴容LinuxLVM
- linux下 lvm 磁碟擴容LinuxLVM
- linux虛擬機器磁碟擴容Linux虛擬機
- Ubuntu 磁碟擴容過程Ubuntu
- lvm 擴充邏輯卷空間(linux的磁碟擴容)LVMLinux
- windows系統磁碟擴容/擴充套件Windows套件
- VirtualBox下Linux(centos)擴充套件磁碟空間LinuxCentOS套件
- 虛擬機器磁碟不足,新增磁碟擴容虛擬機
- 阿里雲線上擴容磁碟阿里
- 新增磁碟多連路磁碟併為ASM磁碟組擴容ASM
- ASM 磁碟組的建立及擴容ASM
- ASM磁碟組擴容操作文件ASM
- 虛擬機器磁碟擴容parted虛擬機
- liunx磁碟分割槽擴容實操
- 雲伺服器如何擴容CentOS 7系統根目錄伺服器CentOS
- 阿里雲CentOS7.x ECS雲盤線上擴容操作阿里CentOS
- linux 擴容Linux
- virtualBox centos 6.5 硬碟擴容CentOS硬碟
- CentOS虛擬機器擴容CentOS虛擬機
- centos7.x掛載磁碟CentOS
- centos7 新增lvm磁碟CentOSLVM
- CentOS7 磁碟掛載操作CentOS
- centos7 安裝ssh擴充套件控制linuxCentOS套件Linux
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- Oracle資料庫 ASM磁碟線上擴容Oracle資料庫ASM
- 阿里雲伺服器磁碟擴容阿里伺服器
- 運維必備Linux學習day4(Vmware磁碟擴容)運維Linux
- centos7 新增磁碟到/(根目錄下),擴充套件VG卷和lvCentOS套件
- Linux Swap擴容Linux
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- Windows7給C盤擴容Windows
- 給VMware下的Linux擴充套件磁碟空間(以CentOS6.5為例)Linux套件CentOS
- 如何實現CentOS伺服器的擴容??CentOS伺服器
- centos8-LVM捲動態擴容CentOSLVM
- Linux下新新增磁碟啟用未使用的硬碟空間擴容LVMLinux硬碟LVM