18video性欧美19sex,欧美高清videosddfsexhd,性少妇videosexfreexxx片中国,激情五月激情综合五月看花,亚洲人成网77777色在线播放

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

VMWare Linux系統(tǒng)磁盤(pán)擴(kuò)容

馬哥Linux運(yùn)維 ? 來(lái)源:博客園何以卿卿 ? 2025-02-17 14:01 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

VMWare Linux系統(tǒng)磁盤(pán)擴(kuò)容

當(dāng)我們?cè)赩Mware Linux虛擬機(jī)安裝軟件的時(shí)候,發(fā)現(xiàn)磁盤(pán)不夠了,可以考慮給磁盤(pán)擴(kuò)容,而不是重建虛擬機(jī)。

1. 修改磁盤(pán)容量

wKgZO2ey0SWAWQLGAAEAC_hve5A095.png

點(diǎn)擊編輯虛擬設(shè)置

wKgZPGey0SWAbmbqAACUpxjcvUc962.png

選擇磁盤(pán)=》擴(kuò)展

wKgZO2ey0SWASOC8AACziHZ01QA655.png

點(diǎn)擊“擴(kuò)展

wKgZO2ey0SWAaCE1AADJ168HfoA932.png

點(diǎn)擊確定

2. 添加分區(qū)

重新啟動(dòng)系統(tǒng)后,執(zhí)行以下操作

磁盤(pán)分區(qū)

[root@oracle ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).
 
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
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
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   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
Partition type:
   p   primary (3 primary, 0 extended, 1 free)
   e   extended
Select (default e): p
Selected partition 4
First sector (41943040-83886079, default 41943040):
Using default value 41943040
Last sector, +sectors or +size{K,M,G} (41943040-83886079, default 83886079):
Using default value 83886079
Partition 4 of type Linux and of size 20 GiB is set
 
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: Device or resource busy.
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.
 

查看新的磁盤(pán)分區(qū)類型

[root@oracle ~]# fdisk -l
 
Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x000a9a6f
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048        6143        2048   83  Linux
/dev/sda2   *        6144     2103295     1048576   83  Linux
/dev/sda3         2103296    41943039    19919872   8e  Linux LVM
/dev/sda4        41943040    83886079    20971520   83  Linux
 
Disk /dev/mapper/centos-root: 19.3 GB, 19323158528 bytes, 37740544 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/centos-swap: 1073 MB, 1073741824 bytes, 2097152 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

修改磁盤(pán)分區(qū)類型

通過(guò)fdisk -l 查看到/dev/sdb3的分區(qū)Id為8e,所以,/dev/vdb4的id也修改與其一致。

[root@oracle ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).
 
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
Command (m for help): t
Partition number (1-4, default 4):
Hex code (type L to list all codes): L
 
 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1 80  Old Minix
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
 
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: Device or resource busy.
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.
 

查看修改后分區(qū)類型

[root@oracle ~]# fdisk -l
 
Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x000a9a6f
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048        6143        2048   83  Linux
/dev/sda2   *        6144     2103295     1048576   83  Linux
/dev/sda3         2103296    41943039    19919872   8e  Linux LVM
/dev/sda4        41943040    83886079    20971520   8e  Linux LVM
 
Disk /dev/mapper/centos-root: 19.3 GB, 19323158528 bytes, 37740544 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/centos-swap: 1073 MB, 1073741824 bytes, 2097152 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

磁盤(pán)擴(kuò)容

重啟系統(tǒng)后,開(kāi)始擴(kuò)充分區(qū)

查看磁盤(pán)分區(qū)卷組

[root@oracle ~]# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root centos -wi-ao---- <18.00g
  swap centos -wi-ao----   1.00g
[root@oracle ~]# vgdisplay
  --- Volume group ---
  VG Name               centos
  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.00 GiB
  PE Size               4.00 MiB
  Total PE              4863
  Alloc PE / Size       4863 / <19.00 GiB
  Free  PE / Size       0 / 0
  VG UUID               gp2KXC-VUTG-0C01-aAed-31UC-HkVO-qi3gus
 
[root@oracle ~]#

擴(kuò)展邏輯卷

創(chuàng)建物理卷

[root@oracle ~]# pvcreate  /dev/sda4
  Physical volume "/dev/sda4" successfully created.

如果出現(xiàn) “Device /dev/sda4 not found."
可以使用partprobe命令使系統(tǒng)獲知新的分區(qū)表的情況

[root@oracle ~]# partprobe
Warning: 無(wú)法以讀寫(xiě)方式打開(kāi) /dev/sr0 (只讀文件系統(tǒng))。/dev/sr0 已按照只讀方式打開(kāi)。
[root@oracle ~]# pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created.

擴(kuò)充卷組

[root@oracle ~]# vgextend centos /dev/sda4
  Volume group "centos" successfully extended
 
 [root@oracle ~]# vgdisplay
  --- Volume group ---
  VG Name               centos
  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               38.99 GiB
  PE Size               4.00 MiB
  Total PE              9982
  Alloc PE / Size       4863 / <19.00 GiB
  Free  PE / Size       5119 / <20.00 GiB
  VG UUID               gp2KXC-VUTG-0C01-aAed-31UC-HkVO-qi3gus

擴(kuò)充邏輯卷

[root@oracle ~]# lvextend -l +100%FREE /dev/centos/root /dev/sda4
  Size of logical volume centos/root changed from <18.00 GiB (4607 extents) to <36.50 GiB (9343 extents).
  Logical volume centos/root successfully resized.

修改文件系統(tǒng)大小

查看文件系統(tǒng)類型

[root@oracle ~]# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        37G   14G   24G  37% /
devtmpfs                devtmpfs  898M     0  898M   0% /dev
tmpfs                   tmpfs     910M     0  910M   0% /dev/shm
tmpfs                   tmpfs     910M  9.6M  901M   2% /run
tmpfs                   tmpfs     910M     0  910M   0% /sys/fs/cgroup
/dev/sda2               xfs      1014M  148M  867M  15% /boot
tmpfs                   tmpfs     182M     0  182M   0% /run/user/0

修改文件系統(tǒng)大小

[root@oracle ~]# xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512    agcount=4, agsize=1179392 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=4717568, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 4717568 to 9567232

注:如果文件系統(tǒng)是ext4,使用resize2fs修改文件系統(tǒng)大小。

擴(kuò)容完畢!

本文來(lái)自博客園,作者:何以卿卿

鏈接:https://www.cnblogs.com/shiqiang-lee/p/16885421.html

聲明:本文內(nèi)容及配圖由入駐作者撰寫(xiě)或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • Linux系統(tǒng)
    +關(guān)注

    關(guān)注

    4

    文章

    608

    瀏覽量

    29451
  • 磁盤(pán)
    +關(guān)注

    關(guān)注

    1

    文章

    394

    瀏覽量

    26204
  • VMware
    +關(guān)注

    關(guān)注

    1

    文章

    301

    瀏覽量

    22891

原文標(biāo)題:Linux系統(tǒng)磁盤(pán)擴(kuò)容

文章出處:【微信號(hào):magedu-Linux,微信公眾號(hào):馬哥Linux運(yùn)維】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。

收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    安裝VMWARE+LINUX開(kāi)發(fā)平臺(tái)

    “下一步”選擇操作系統(tǒng)為“linux"和版本為“Ubuntu";點(diǎn)“下一步”輸入虛擬機(jī)名稱和選擇安裝路徑;點(diǎn)“下一步”選擇“使用橋接網(wǎng)絡(luò)”;“下一步”磁盤(pán)大小填15GB以上,勾選
    發(fā)表于 11-29 14:06

    【OK210試用體驗(yàn)】之VMware下Ubuntu磁盤(pán)空間擴(kuò)容

    虛擬機(jī)是關(guān)閉狀態(tài),然后虛擬機(jī)—>設(shè)置—>添加 根據(jù)自己需要添加所需硬盤(pán)的大小,然后啟動(dòng)Ubuntu系統(tǒng)打開(kāi)終端,通過(guò)輸入df命令,可以查看磁盤(pán)的使用情況以及文件系統(tǒng)被掛載的位置df -h然后
    發(fā)表于 10-10 00:21

    【OK210試用體驗(yàn)】之疑惑VMware下Ubuntu擴(kuò)展磁盤(pán)容量后無(wú)法啟動(dòng)

    最近在編譯和移植Qt過(guò)程產(chǎn)生了一些垃圾文件沒(méi)及時(shí)清理,感覺(jué)Ubuntu磁盤(pán)空間不夠用,于是準(zhǔn)備擴(kuò)容磁盤(pán)。因?yàn)?b class='flag-5'>VMware11支持直接設(shè)置,所以這里就直接采用虛擬機(jī)上的設(shè)置來(lái)進(jìn)行
    發(fā)表于 10-14 18:22

    【我們一起學(xué)Linux之準(zhǔn)備篇】善用佳軟Vmware安裝Linux系統(tǒng)

    Vmware安裝Linux系統(tǒng)1. 安裝VMware,此軟件現(xiàn)在更新到了12.1.0.2487,我使用的是10的版本。 1)下載方法:大家可以百度
    發(fā)表于 01-20 21:01

    esxi主機(jī)vmware無(wú)法清除磁盤(pán)解決方法

    解決esxi主機(jī)vmware 無(wú)法清除磁盤(pán)的報(bào)錯(cuò)
    發(fā)表于 09-16 11:32

    Linux系統(tǒng)磁盤(pán)管理是什么

    Linux系統(tǒng)中的磁盤(pán)管理
    發(fā)表于 05-11 15:29

    【昉·星光 2 高性能RISC-V單板計(jì)算機(jī)體驗(yàn)】三:從 nvme 磁盤(pán)啟動(dòng) VisionFive2 并對(duì)磁盤(pán)分區(qū)擴(kuò)容

    從 nvme 磁盤(pán)啟動(dòng) VisionFive2 并對(duì)磁盤(pán)分區(qū)擴(kuò)容 在之前的經(jīng)驗(yàn)貼《在 VisionFive2 上如何更快的向 nvme 硬盤(pán)安裝操作系統(tǒng)》中介紹了一種通用的向 nvme
    發(fā)表于 09-04 02:54

    Linux中的可用磁盤(pán)空間如何檢查?

    跟蹤磁盤(pán)利用率信息是系統(tǒng)管理員(和其他人)的日常待辦事項(xiàng)列表之一。Linux 有一些內(nèi)置的使用程序來(lái)幫助提供這些信息。df 命令意思是 “disk-free”,顯示 Linux
    的頭像 發(fā)表于 07-25 18:53 ?3842次閱讀
    <b class='flag-5'>Linux</b>中的可用<b class='flag-5'>磁盤(pán)</b>空間如何檢查?

    你會(huì)用VMware虛擬機(jī)安裝Linux系統(tǒng)?

    由于要搭建Oracle RAC集群需要模擬環(huán)境,所以需要利用VMware虛擬機(jī)安裝集群節(jié)點(diǎn)環(huán)境,本章節(jié)介紹如何利用VWware虛擬機(jī)安裝centos系統(tǒng)Linux)。
    發(fā)表于 05-13 10:27 ?2928次閱讀
    你會(huì)用<b class='flag-5'>VMware</b>虛擬機(jī)安裝<b class='flag-5'>Linux</b><b class='flag-5'>系統(tǒng)</b>?

    linux磁盤(pán)滿的清理方法

    Linux查看磁盤(pán)用量
    發(fā)表于 06-09 08:53 ?9055次閱讀
    <b class='flag-5'>linux</b><b class='flag-5'>磁盤(pán)</b>滿的清理方法

    linux磁盤(pán)如何清理

    Linux查看磁盤(pán)用量
    發(fā)表于 06-10 09:18 ?2812次閱讀
    <b class='flag-5'>linux</b>的<b class='flag-5'>磁盤(pán)</b>如何清理

    查看linux系統(tǒng)磁盤(pán)io情況的辦法是什么

    談到 Linux 磁盤(pán) I/O 的工作原理,我們了解到 Linux 存儲(chǔ)系統(tǒng) I/O 棧由文件系統(tǒng)層(file system layer)、
    發(fā)表于 08-01 10:14 ?2711次閱讀

    如何釋放VMware虛擬磁盤(pán)未使用空間呢?

    在Windows 11中通過(guò)VMware安裝Ubuntu 22.04做一些Linux相關(guān)的學(xué)習(xí),剛安裝的時(shí)候VMware虛擬磁盤(pán)空間也就6~7GB,但是沒(méi)用幾天,
    的頭像 發(fā)表于 08-28 10:15 ?6708次閱讀
    如何釋放<b class='flag-5'>VMware</b>虛擬<b class='flag-5'>磁盤(pán)</b>未使用空間呢?

    linux系統(tǒng)如何進(jìn)行磁盤(pán)分區(qū)?

    linux系統(tǒng)如何進(jìn)行磁盤(pán)分區(qū)? 磁盤(pán)分區(qū)是在Linux系統(tǒng)中進(jìn)行硬盤(pán)劃分的一種方法,它可以將一
    的頭像 發(fā)表于 12-19 11:35 ?1794次閱讀

    linux rhel虛擬機(jī)中如何給磁盤(pán)動(dòng)態(tài)擴(kuò)容(硬盤(pán)直接擴(kuò)展)

    Linux 擴(kuò)容
    的頭像 發(fā)表于 08-20 10:30 ?1158次閱讀
    <b class='flag-5'>linux</b> rhel虛擬機(jī)中如何給<b class='flag-5'>磁盤(pán)</b>動(dòng)態(tài)<b class='flag-5'>擴(kuò)容</b>(硬盤(pán)直接擴(kuò)展)