🖖 I’m a system archi|

没有猫的猫奴

园龄:4年7个月粉丝:1关注:3

Linux 数据盘在线扩容

1、卸载数据盘
[root@localhost ~]# umount /dev/sda1

2、使用fdisk /dev/sda 对数据盘分区操作
[root@localhost ~]# fdisk /dev/sda

WARNING: The size of this disk is 3.0 TB (3000034656256 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).

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

Disk /dev/sdb: 3000.0 GB, 3000034656256 bytes, 5859442688 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: 0x000b6f25

Device Boot Start End Blocks Id System
/dev/sdb1 2048 1048578047 524288000 83 Linux

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-4294967295, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-4294967294, default 4294967294): +1300G
Partition 1 of type Linux and of size 1.3 TiB is set

Command (m for help): p

Disk /dev/sdb: 3000.0 GB, 3000034656256 bytes, 5859442688 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: 0x000b6f25

Device Boot Start End Blocks Id System
/dev/sdb1 2048 2726299647 1363148800 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

3、检查文件系统
e2fsck -f /dev/sda1
e2fsck 1.42.9 (28-Dec-2013)
/dev/sda1 is mounted.
e2fsck: Cannot continue, aborting.

4、变更文件系统大小
resize2fs /dev/sda1
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/sda1 is mounted on /data; on-line resizing required
old_desc_blocks = 13, new_desc_blocks = 63
The filesystem on /dev/sda1 is now 131071744 blocks long.

5.重新挂载
mount -a
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 47G 3.8G 44G 8% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 9.2M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/vda1 1014M 145M 870M 15% /boot
tmpfs 781M 0 781M 0% /run/user/0
/dev/sda1 493G 5.7G 466G 2% /data

参考至:https://www.cnblogs.com/chengtai/p/7389284.html

本文作者:没有猫的猫奴

本文链接:https://www.cnblogs.com/cat1/p/15206370.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   没有猫的猫奴  阅读(286)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
展开
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.

作曲 : Reol

作词 : Reol

fade away...do over again...

fade away...do over again...

歌い始めの一文字目 いつも迷ってる

歌い始めの一文字目 いつも迷ってる

どうせとりとめのないことだけど

伝わらなきゃもっと意味がない

どうしたってこんなに複雑なのに

どうしたってこんなに複雑なのに

噛み砕いてやらなきゃ伝わらない

ほら結局歌詞なんかどうだっていい

僕の音楽なんかこの世になくたっていいんだよ

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

僕は気にしない 君は気付かない

何処にももういないいない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

忘れていく 忘れられていく

We don't know,We don't know.

目の前 広がる現実世界がまた歪んだ

目の前 広がる現実世界がまた歪んだ

何度リセットしても

僕は僕以外の誰かには生まれ変われない

「そんなの知ってるよ」

気になるあの子の噂話も

シニカル標的は次の速報

麻痺しちゃってるこっからエスケープ

麻痺しちゃってるこっからエスケープ

遠く遠くまで行けるよ

安定なんてない 不安定な世界

安定なんてない 不安定な世界

安定なんてない きっと明日には忘れるよ

fade away...do over again...

fade away...do over again...

そうだ世界はどこかがいつも嘘くさい

そうだ世界はどこかがいつも嘘くさい

綺麗事だけじゃ大事な人たちすら守れない

くだらない 僕らみんなどこか狂ってるみたい

本当のことなんか全部神様も知らない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

僕は気にしない 君は気付かない

何処にももういないいない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

忘れていく 忘れられていく

We don't know,We don't know.