久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

linux系統(tǒng)VPS擴(kuò)展硬盤的方法是什么

共計(jì) 4052 個(gè)字符,預(yù)計(jì)需要花費(fèi) 11 分鐘才能閱讀完成。

本篇內(nèi)容介紹了“l(fā)inux 系統(tǒng) VPS 擴(kuò)展硬盤的方法是什么”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓丸趣 TV 小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

[root@cloud ~]# df -hal 查看擴(kuò)容后磁盤情況。

文件系統(tǒng) 容量 已用 可用 已用 %% 掛載點(diǎn)

/dev/mapper/vg_cloud-lv_root

7.5G 7.5G 0 100% /

proc 0 0 0 – /proc

sysfs 0 0 0 – /sys

devpts 0 0 0 – /dev/pts

tmpfs 494M 0 494M 0% /dev/shm

/dev/sda1 485M 33M 427M 8% /boot

none 0 0 0 – /proc/sys/fs/binfmt_misc

sunrpc 0 0 0 – /var/lib/nfs/rpc_pipefs

[root@cloud wwwroot]# fdisk - l 查看分區(qū)情況。這里看到 /dev/sdc 為剛才加上的沒(méi)有分區(qū)的盤。

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: 0x00051f5f

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: 53.7 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 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_cloud-lv_root: 8128 MB, 8128561152 bytes

255 heads, 63 sectors/track, 988 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_cloud-lv_swap: 2080 MB, 2080374784 bytes

255 heads, 63 sectors/track, 252 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

[root@cloud ~]# fdisk /dev/sdb 進(jìn)行分區(qū)。fdisk 進(jìn)行硬盤分區(qū)從實(shí)質(zhì)上說(shuō)就是對(duì)硬盤的一種格式化。

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklable

Building a new DOS disklabel with disk identifier 0x3c59d1a9.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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 #新建分區(qū)

Command action

e extended

p primary partition (1-4)

p #設(shè)置為主分區(qū)

Partition number (1-4): 1 #主分區(qū)號(hào)

First cylinder (1-2610, default 1):1 #開(kāi)始扇區(qū)(直接默認(rèn)回車)

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):2610

Using default value 2610 #結(jié)束扇區(qū)(直接默認(rèn)回車)

Command (m for help): t #指定分區(qū)類型

Selected partition 1 #選擇 1 號(hào)分區(qū)

Hex code (type L to list codes): 8e #8e 為 LVM

Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w #保存

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@cloud ~]# reboot

======================================================

重啟中

======================================================

[root@cloud ~]# vgs

VG #PV #LV #SN Attr VSize VFree

vg_cloud 1 2 0 wz–n- 9.51g 0

[root@cloud ~]# pvcreate /dev/sdb1

Physical volume /dev/sdb1 successfully created

[root@cloud ~]# vgextend vg_cloud /dev/sdb1

Volume group vg_cloud successfully extended

[root@cloud ~]# vgdisplay

— Volume group —

VG Name vg_cloud

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 15233

Alloc PE / Size 2434 / 9.51 GiB

Free PE / Size 12799 / 50.00 GiB

VG UUID I5k6GO-mjni-7dO0-O4TF-RUxH-RNcI-bnWFY3

[root@cloud ~]# lvresize -L +49.900G /dev/vg_cloud/lv_root

Rounding size to boundary between physical extents: 49.90 GiB

Extending logical volume lv_root to 57.47 GiB

Logical volume lv_root successfully resized

[root@cloud ~]# resize2fs /dev/vg_cloud/lv_root

resize2fs 1.41.12 (17-May-2010)

Filesystem at /dev/vg_cloud/lv_root is mounted on /; on-line resizing required

old desc_blocks = 1, new_desc_blocks = 4

Performing an on-line resize of /dev/vg_cloud/lv_root to 15066112 (4k) blocks.

The filesystem on /dev/vg_cloud/lv_root is now 15066112 blocks long.

[root@cloud ~]# df -hal

文件系統(tǒng) 容量 已用 可用 已用 %% 掛載點(diǎn)

/dev/mapper/vg_cloud-lv_root

57G 7.5G 47G 14% /

proc 0 0 0 – /proc

sysfs 0 0 0 – /sys

devpts 0 0 0 – /dev/pts

tmpfs 494M 0 494M 0% /dev/shm

/dev/sda1 485M 33M 427M 8% /boot

none 0 0 0 – /proc/sys/fs/binfmt_misc

sunrpc 0 0 0 – /var/lib/nfs/rpc_pipefs

======================================================

擴(kuò)展成功

======================================================

“l(fā)inux 系統(tǒng) VPS 擴(kuò)展硬盤的方法是什么”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注丸趣 TV 網(wǎng)站,丸趣 TV 小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

正文完
 
丸趣
版權(quán)聲明:本站原創(chuàng)文章,由 丸趣 2023-08-04發(fā)表,共計(jì)4052字。
轉(zhuǎn)載說(shuō)明:除特殊說(shuō)明外本站除技術(shù)相關(guān)以外文章皆由網(wǎng)絡(luò)搜集發(fā)布,轉(zhuǎn)載請(qǐng)注明出處。
評(píng)論(沒(méi)有評(píng)論)
主站蜘蛛池模板: 北流市| 新密市| 漾濞| 三亚市| 齐河县| 江都市| 嘉荫县| 拜泉县| 康马县| 邛崃市| 广昌县| 东丽区| 宜州市| 库伦旗| 博罗县| 万载县| 洛南县| 普兰店市| 江永县| 台北市| 河曲县| 成武县| 安顺市| 合阳县| 收藏| 嘉义县| 乌拉特前旗| 合江县| 浏阳市| 息烽县| 大姚县| 威远县| 类乌齐县| 陕西省| 达日县| 吴川市| 咸宁市| 淮南市| 鹤山市| 玉门市| 许昌县|