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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

ubuntu下安装linux分区大小,增加安装Ubuntu的分区大小?

發布時間:2024/9/27 linux 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu下安装linux分区大小,增加安装Ubuntu的分区大小? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

SSH到系統,切換到root并運行cfdisk#cfdisk

退出cfdisk后

# fdisk -l /dev/sda

Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 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

Disklabel type: dos

Disk identifier: 0xc8b647ff

Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 999423 997376 487M 83 Linux

/dev/sda2 1001470 16775167 15773698 7.5G 5 Extended

/dev/sda3 16775168 41943039 25167872 12G 8e Linux LVM (***** See new partition /dev/sda3*****)

/dev/sda5 1001472 16775167 15773696 7.5G 8e Linux LVM

在下一步之前重新啟動系統(否則您可能會獲得Device

/dev/sda3 not found (or ignored by filtering))

# shutdown now -r

初始化新卷

# pvcreate /dev/sda3

Physical volume "/dev/sda3" successfully created

獲取要擴展的卷的名稱

# vgdisplay

--- Volume group ---

VG Name linuxetc1-vg (***** this is vg i'm extending*****)

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 7.52 GiB

PE Size 4.00 MiB

Total PE 1925

Alloc PE / Size 1925 / 7.52 GiB

Free PE / Size 0 / 0

...

擴展卷組

# vgextend linuxetc1-vg /dev/sda3

Volume group "linuxetc1-vg" successfully extended

擴展根目錄

# lvextend -l+100%FREE /dev/linuxetc1-vg/root

Size of logical volume linuxetc1-vg/root changed from 6.52 GiB (1669 extents) to 18.52 GiB (4741 extents).

Logical volume root successfully resized.

Or if you only wanted to give 5 more GB to root

# lvextend -L +5g /dev/linuxetc1-vg/root

獲取下一步的文件系統名稱

# df -h

Filesystem Size Used Avail Use% Mounted on

udev 477M 0 477M 0% /dev

tmpfs 100M 4.6M 95M 5% /run

/dev/mapper/linuxetc1--vg-root 6.3G 2.5G 3.5G 42% / (***** this line*****)

tmpfs 497M 0 497M 0% /dev/shm

tmpfs 5.0M 0 5.0M 0% /run/lock

tmpfs 497M 0 497M 0% /sys/fs/cgroup

/dev/sda1 472M 105M 343M 24% /boot

tmpfs 100M 0 100M 0% /run/user/1000

擴展文件系統

# resize2fs /dev/mapper/linuxetc1--vg-root

resize2fs 1.42.13 (17-May-2015)

Filesystem at /dev/mapper/linuxetc1--vg-root is mounted on /; on-line resizing required

old_desc_blocks = 1, new_desc_blocks = 2

The filesystem on /dev/mapper/linuxetc1--vg-root is now 4854784 (4k) blocks long.

看到增加的尺寸

# df -h

Filesystem Size Used Avail Use% Mounted on

udev 477M 0 477M 0% /dev

tmpfs 100M 4.6M 95M 5% /run

/dev/mapper/linuxetc1--vg-root 19G 2.5G 15G 15% / (***** this line*****)

tmpfs 497M 0 497M 0% /dev/shm

tmpfs 5.0M 0 5.0M 0% /run/lock

tmpfs 497M 0 497M 0% /sys/fs/cgroup

/dev/sda1 472M 105M 343M 24% /boot

tmpfs 100M 0 100M 0% /run/user/1000

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的ubuntu下安装linux分区大小,增加安装Ubuntu的分区大小?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。