centos lvm 擴(kuò)容

vvilog@centos /h/vvilog> /sbin/vgdisplay

--- Volume group ---

VG Name?????????????? centos

System ID

Format??????????????? lvm2

Metadata Areas??????? 1

Metadata Sequence No? 4

VG Access???????????? read/write

VG Status???????????? resizable

MAX LV??????????????? 0

Cur LV??????????????? 3

Open LV?????????????? 3

Max PV??????????????? 0

Cur PV??????????????? 1

Act PV??????????????? 1

VG Size?????????????? <110.81 GiB

PE Size?????????????? 4.00 MiB

Total PE????????????? 28367

Alloc PE / Size?????? 28367 / <110.81 GiB

Free? PE / Size?????? 0 / 0

VG UUID?????????????? Nt91Zx-Haal-LOPL-fDJF-XGjk-SvaA-yl9hgL

vvilog@centos /h/vvilog> /sbin/vgdisplay

--- Volume group ---

VG Name?????????????? centos

System ID

Format??????????????? lvm2

Metadata Areas??????? 1

Metadata Sequence No? 4

VG Access???????????? read/write

VG Status???????????? resizable

MAX LV??????????????? 0

Cur LV??????????????? 3

Open LV?????????????? 3

Max PV??????????????? 0

Cur PV??????????????? 1

Act PV??????????????? 1

VG Size?????????????? <110.81 GiB

PE Size?????????????? 4.00 MiB

Total PE????????????? 28367

Alloc PE / Size?????? 28367 / <110.81 GiB

Free? PE / Size?????? 0 / 0

VG UUID?????????????? Nt91Zx-Haal-LOPL-fDJF-XGjk-SvaA-yl9hgL

vvilog@centos /h/vvilog> /sbin/lvdisplay

--- Logical volume ---

LV Path??????????????? /dev/centos/root

LV Name??????????????? root

VG Name??????????????? centos

LV UUID??????????????? NUekJb-ZCIc-mwcL-ExzX-ROYd-bD7T-HmPqql

LV Write Access??????? read/write

LV Creation host, time centos, 2018-07-11 19:47:08 +0800

LV Status????????????? available

# open???????????????? 1

LV Size??????????????? 60.00 GiB

Current LE???????????? 15360

Segments?????????????? 1

Allocation???????????? inherit

Read ahead sectors???? auto

- currently set to???? 256

Block device?????????? 253:0

--- Logical volume ---

LV Path? /dev/centos/home

LV Name??????????????? home

VG Name??????????????? centos

LV UUID??????????????? eShHQo-MewK-xN7H-ZqBu-GIV6-KMQI-YA606U

LV Write Access??????? read/write

LV Creation host, time centos, 2018-07-11 19:47:09 +0800

LV Status????????????? available

# open???????????????? 1

LV Size??????????????? 48.00 GiB

Current LE???????????? 12288

Segments?????????????? 1

Allocation???????????? inherit

Read ahead sectors???? auto

- currently set to???? 256

Block device?????????? 253:2

--- Logical volume ---

LV Path /dev/centos/swap

LV Name??????????????? swap

VG Name??????????????? centos

LV UUID??????????????? hwO7J7-gmbh-jgiT-vFLA-jsdI-8241-CSHEM8

LV Write Access??????? read/write

LV Creation host, time centos, 2018-07-11 19:47:10 +0800

LV Status????????????? available

# open???????????????? 2

LV Size??????????????? <2.81 GiB

Current LE???????????? 719

Segments?????????????? 1

Allocation???????????? inherit

Read ahead sectors???? auto

- currently set to???? 256

Block device?????????? 253:1

vvilog@centos /h/vvilog>/sbin/fdisk /dev/sda

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

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

Partition type (type L to list all types): 8e

Type of partition 4 is unchanged: Linux filesystem

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.

vvilog@centos /h/vvilog> /sbin/partprobe

vvilog@centos /h/vvilog> /sbin/fdisk /dev/sda

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

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/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk label type: gpt

Disk identifier: 30B84C4D-0A79-4BAE-8950-8C0FDF86949E

#???????? Start????????? End??? Size? Type??????????? Name

1???????? 2048????? 1026047??? 500M? EFI System????? EFI System Partition

2????? 1026048????? 2050047??? 500M? Microsoft basic

3????? 2050048??? 234440703? 110.8G? Linux LVM

4??? 234440704?? 1953523711? 819.7G? Linux filesyste

Command (m for help): t

Partition number (1-4, default 4): 4

Partition type (type L to list all types): l

?? 19 Linux swap???????????????????? 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F

?31 Linux LVM????????????????????? E6D6D379-F507-44C2-A23C-238F2A3DF928

Partition type (type L to list all types): t

Type of partition 4 is unchanged: Linux filesystem

Command (m for help): t

Partition number (1-4, default 4): 4

Partition type (type L to list all types): 31

Changed type of partition 'Linux filesystem' 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.

vvilog@centos /h/vvilog> /sbin/partprobe

vvilog@centos /h/vvilog> /usr/sbin/vgextend centos /dev/sda4

Volume group "centos" successfully extended

vvilog@centos /h/vvilog> whereis? lvextend

lvextend: /usr/sbin/lvextend /usr/share/man/man8/lvextend.8.gz

vvilog@centos /h/vvilog> /sbin/lvextend -L +760g /dev/centos/home

Size of logical volume centos/home changed from 48.00 GiB (12288 extents) to 808.00 GiB (206848 extents).

Logical volume centos/home successfully resized.

vvilog@centos /h/vvilog> df -lh

Filesystem?????????????? Size? Used Avail Use% Mounted on

/dev/mapper/centos-root?? 60G? 5.5G?? 55G? 10% /

devtmpfs???????????????? 1.7G???? 0? 1.7G?? 0% /dev

tmpfs??????????????????? 1.7G???? 0? 1.7G?? 0% /dev/shm

tmpfs??????????????????? 1.7G? 9.6M? 1.7G?? 1% /run

tmpfs??????????????????? 1.7G???? 0? 1.7G?? 0% /sys/fs/cgroup

/dev/sda2??????????????? 497M? 178M? 320M? 36% /boot

/dev/sda1??????????????? 500M? 9.8M? 490M?? 2% /boot/efi

/dev/mapper/centos-home?? 48G? 5.6G?? 43G? 12% /home

tmpfs??????????????????? 344M?? 12K? 344M?? 1% /run/user/1000

vvilog@centos /h/vvilog> /sbin/resize2fs /dev/centos/home

resize2fs 1.42.9 (28-Dec-2013)

/sbin/resize2fs: Bad magic number in super-block while trying to open /dev/centos/home

Couldn't find valid filesystem superblock.

vvilog@centos /h/vvilog>/sbin/xfs_growfs /dev/centos/home

meta-data=/dev/mapper/centos-home isize=512??? agcount=4, agsize=3145728 blks

=?????????????????????? sectsz=512?? attr=2, projid32bit=1

=?????????????????????? crc=1??????? finobt=0 spinodes=0

data???? =?????????????????????? bsize=4096?? blocks=12582912, imaxpct=25

=?????????????????????? sunit=0????? swidth=0 blks

naming?? =version 2????????????? bsize=4096?? ascii-ci=0 ftype=1

log????? =internal?????????????? bsize=4096?? blocks=6144, version=2

=?????????????????????? sectsz=512?? sunit=0 blks, lazy-count=1

realtime =none?????????????????? extsz=4096?? blocks=0, rtextents=0

data blocks changed from 12582912 to 211812352

vvilog@centos /h/vvilog> df -lh

Filesystem?????????????? Size? Used Avail Use% Mounted on

/dev/mapper/centos-root?? 60G? 5.5G?? 55G? 10% /

devtmpfs???????????????? 1.7G???? 0? 1.7G?? 0% /dev

tmpfs??????????????????? 1.7G???? 0? 1.7G?? 0% /dev/shm

tmpfs??????????????????? 1.7G? 9.6M? 1.7G?? 1% /run

tmpfs??????????????????? 1.7G???? 0? 1.7G?? 0% /sys/fs/cgroup

/dev/sda2??????????????? 497M? 178M? 320M? 36% /boot

/dev/sda1??????????????? 500M? 9.8M? 490M?? 2% /boot/efi

/dev/mapper/centos-home? 808G? 5.6G? 803G?? 1% /home

tmpfs??????????????????? 344M?? 12K? 344M?? 1% /run/user/1000

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末蛇更,一起剝皮案震驚了整個(gè)濱河市缎岗,隨后出現(xiàn)的幾起案子击奶,更是在濱河造成了極大的恐慌碍舍,老刑警劉巖锡宋,帶你破解...
    沈念sama閱讀 221,820評(píng)論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件敷鸦,死亡現(xiàn)場(chǎng)離奇詭異玛界,居然都是意外死亡照皆,警方通過(guò)查閱死者的電腦和手機(jī)急鳄,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,648評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門谤民,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人疾宏,你說(shuō)我怎么就攤上這事张足。” “怎么了坎藐?”我有些...
    開封第一講書人閱讀 168,324評(píng)論 0 360
  • 文/不壞的土叔 我叫張陵为牍,是天一觀的道長(zhǎng)哼绑。 經(jīng)常有香客問(wèn)我,道長(zhǎng)碉咆,這世上最難降的妖魔是什么抖韩? 我笑而不...
    開封第一講書人閱讀 59,714評(píng)論 1 297
  • 正文 為了忘掉前任,我火速辦了婚禮疫铜,結(jié)果婚禮上茂浮,老公的妹妹穿的比我還像新娘。我一直安慰自己壳咕,他們只是感情好励稳,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,724評(píng)論 6 397
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著囱井,像睡著了一般。 火紅的嫁衣襯著肌膚如雪趣避。 梳的紋絲不亂的頭發(fā)上庞呕,一...
    開封第一講書人閱讀 52,328評(píng)論 1 310
  • 那天,我揣著相機(jī)與錄音程帕,去河邊找鬼住练。 笑死,一個(gè)胖子當(dāng)著我的面吹牛愁拭,可吹牛的內(nèi)容都是我干的讲逛。 我是一名探鬼主播,決...
    沈念sama閱讀 40,897評(píng)論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼岭埠,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼盏混!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起惜论,我...
    開封第一講書人閱讀 39,804評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤许赃,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后馆类,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體混聊,經(jīng)...
    沈念sama閱讀 46,345評(píng)論 1 318
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,431評(píng)論 3 340
  • 正文 我和宋清朗相戀三年乾巧,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了句喜。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,561評(píng)論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡沟于,死狀恐怖咳胃,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情旷太,我是刑警寧澤拙绊,帶...
    沈念sama閱讀 36,238評(píng)論 5 350
  • 正文 年R本政府宣布,位于F島的核電站,受9級(jí)特大地震影響标沪,放射性物質(zhì)發(fā)生泄漏榄攀。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,928評(píng)論 3 334
  • 文/蒙蒙 一金句、第九天 我趴在偏房一處隱蔽的房頂上張望檩赢。 院中可真熱鬧,春花似錦违寞、人聲如沸贞瞒。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,417評(píng)論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)军浆。三九已至,卻和暖如春挡闰,著一層夾襖步出監(jiān)牢的瞬間乒融,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,528評(píng)論 1 272
  • 我被黑心中介騙來(lái)泰國(guó)打工摄悯, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留赞季,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,983評(píng)論 3 376
  • 正文 我出身青樓奢驯,卻偏偏與公主長(zhǎng)得像申钩,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子瘪阁,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,573評(píng)論 2 359

推薦閱讀更多精彩內(nèi)容