加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux 扩展文件系统

发布时间:2020-12-14 01:57:45 所属栏目:Linux 来源:网络整理
导读:1. 创建新分区 [[email?protected] ~]# fdisk - l Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical /physical): 512 bytes / 512 bytesI /O size (minimum/optimal): 512 bytes /

1. 创建新分区

[[email?protected] ~]# fdisk -l

Disk /dev/sda: 32.2 GB,32212254720 bytes,62914560 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: 0x000a8293

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648    20971519    10279936   8e  Linux LVM

Disk /dev/mapper/cl-root: 8376 MB,8376025088 bytes,16359424 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/cl-swap: 2147 MB,2147483648 bytes,4194304 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

[[email?protected] ~]# 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): n
Partition type:
   p   primary (2 primary,0 extended,2 free)
   e   extended
Select (default p): p Partition number (3,4,default 3): 3
First sector (20971520-62914559,default 20971520): 
Using default value 20971520 Last sector,+sectors or +size{K,M,G} (20971520-62914559,default 62914559): +2G
Partition 3 of type Linux and of size 2 GiB is set

Command (m for help): p

Disk /dev/sda: 32.2 GB,62914560 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: 0x000a8293

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648    20971519    10279936   8e  Linux LVM
/dev/sda3        20971520    25165823     2097152   83  Linux

Command (m for help): t   # 修改文件系统类型
Partition number (1-3,default 3): 3 Hex code (type L to list all codes): 8e
Changed type of partition Linux to Linux LVM Command (m for help): p

Disk /dev/sda: 32.2 GB,62914560 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: 0x000a8293

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648    20971519    10279936   8e  Linux LVM
/dev/sda3        20971520    25165823     2097152   8e  Linux LVM

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

?

2. 创建 pv

[[email?protected] ~]# pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created.
[[email?protected] ~]# pvdisplay   
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               cl
  PV Size               9.80 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              2509
  Free PE               0
  Allocated PE          2509
  PV UUID               vBCY0m-syaR-HKNJ-FNlW-G7Ql-2eru-4ccPC6
   
  "/dev/sda3" is a new physical volume of "2.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda3
  VG Name               
  PV Size               2.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               kRvof2-gzMz-raeu-njD7-vujG-N45B-yJemBd

?

3. 将 pv 添加到 vg

[[email?protected] ~]# vgextend cl /dev/sda3 
  Volume group "cl" successfully extended
[[email?protected] ~]# vgs
  VG #PV #LV #SN Attr   VSize  VFree
  cl   2   2   0 wz--n- 11.80g 2.00g
[[email?protected] ~]# pvs
  PV         VG Fmt  Attr PSize PFree
  /dev/sda2  cl lvm2 a--  9.80g    0 
  /dev/sda3  cl lvm2 a--  2.00g 2.00g

?

4. 扩展 lv

[[email?protected] ~]# lvextend /dev/cl/root /dev/sda3
  Size of logical volume cl/root changed from 7.80 GiB (1997 extents) to 9.80 GiB (2508 extents).
  Logical volume cl/root successfully resized.

?

5. 扩展文件系统的逻辑边界

[[email?protected] ~]# xfs_growfs /dev/cl/root
meta-data=/dev/mapper/cl-root    isize=512    agcount=4,agsize=511232 blks
         =                       sectsz=512   attr=2,projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=2044928,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 2044928 to 2568192 [[email?protected] ~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  9.8G 1021M  8.8G  11% /
devtmpfs             1.9G     0  1.9G   0% /dev
tmpfs                1.9G     0  1.9G   0% /dev/shm
tmpfs                1.9G  8.6M  1.9G   1% /run
tmpfs                1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1            197M  117M   81M  60% /boot
tmpfs                378M     0  378M   0% /run/user/0
[[email?protected] ~]# 

?



Command (m for help): ^C[[email?protected] ~]# fdisk -l
Disk /dev/sda: 32.2 GB,32212254720 bytes,62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000a8293
? ?Device Boot? ? ? Start? ? ? ? ?End? ? ? Blocks? ?Id? System/dev/sda1? ?*? ? ? ? 2048? ? ? 411647? ? ? 204800? ?83? Linux/dev/sda2? ? ? ? ? 411648? ? 20971519? ? 10279936? ?8e? Linux LVM
Disk /dev/mapper/cl-root: 8376 MB,8376025088 bytes,16359424 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/cl-swap: 2147 MB,2147483648 bytes,4194304 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
[[email?protected] ~]# fdisk /dev/sdaWelcome 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): nPartition type:? ?p? ?primary (2 primary,0 extended,2 free)? ?e? ?extendedSelect (default p): pPartition number (3,4,default 3):? 3Value out of range.Partition number (3,default 3): 3First sector (20971520-62914559,default 20971520):?Using default value 20971520Last sector,+sectors or +size{K,G} (20971520-62914559,default 62914559): +2GPartition 3 of type Linux and of size 2 GiB is set
Command (m for help): p
Disk /dev/sda: 32.2 GB,62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000a8293
? ?Device Boot? ? ? Start? ? ? ? ?End? ? ? Blocks? ?Id? System/dev/sda1? ?*? ? ? ? 2048? ? ? 411647? ? ? 204800? ?83? Linux/dev/sda2? ? ? ? ? 411648? ? 20971519? ? 10279936? ?8e? Linux LVM/dev/sda3? ? ? ? 20971520? ? 25165823? ? ?2097152? ?83? Linux
Command (m for help): tPartition number (1-3,default 3): 3Hex code (type L to list all codes): 8eChanged type of partition ‘Linux‘ to ‘Linux LVM‘
Command (m for help): p
Disk /dev/sda: 32.2 GB,62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000a8293
? ?Device Boot? ? ? Start? ? ? ? ?End? ? ? Blocks? ?Id? System/dev/sda1? ?*? ? ? ? 2048? ? ? 411647? ? ? 204800? ?83? Linux/dev/sda2? ? ? ? ? 411648? ? 20971519? ? 10279936? ?8e? Linux LVM/dev/sda3? ? ? ? 20971520? ? 25165823? ? ?2097152? ?8e? Linux LVM
Command (m for help): w^HmThe 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 atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks.[[email?protected] ~]# m-bash: m: command not found[[email?protected] ~]# partprobeWarning: Unable to open /dev/sr0 read-write (Read-only file system).? /dev/sr0 has been opened read-only.[[email?protected] ~]# fdisk -l
Disk /dev/sda: 32.2 GB,62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000a8293
? ?Device Boot? ? ? Start? ? ? ? ?End? ? ? Blocks? ?Id? System/dev/sda1? ?*? ? ? ? 2048? ? ? 411647? ? ? 204800? ?83? Linux/dev/sda2? ? ? ? ? 411648? ? 20971519? ? 10279936? ?8e? Linux LVM/dev/sda3? ? ? ? 20971520? ? 25165823? ? ?2097152? ?8e? Linux LVM
Disk /dev/mapper/cl-root: 8376 MB,4194304 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
[[email?protected] ~]# pvdisplay? --- Physical volume ---? PV Name? ? ? ? ? ? ? ?/dev/sda2? VG Name? ? ? ? ? ? ? ?cl? PV Size? ? ? ? ? ? ? ?9.80 GiB / not usable 3.00 MiB? Allocatable? ? ? ? ? ?yes (but full)? PE Size? ? ? ? ? ? ? ?4.00 MiB? Total PE? ? ? ? ? ? ? 2509? Free PE? ? ? ? ? ? ? ?0? Allocated PE? ? ? ? ? 2509? PV UUID? ? ? ? ? ? ? ?vBCY0m-syaR-HKNJ-FNlW-G7Ql-2eru-4ccPC6? ?[[email?protected] ~]# amnpvcreate-bash: amnpvcreate: command not found[[email?protected] ~]#?[[email?protected] ~]# man pvcreate[[email?protected] ~]# pvcreate /dev/sda3? Physical volume "/dev/sda3" successfully created.[[email?protected] ~]# pvdisplay? --- Physical volume ---? PV Name? ? ? ? ? ? ? ?/dev/sda2? VG Name? ? ? ? ? ? ? ?cl? PV Size? ? ? ? ? ? ? ?9.80 GiB / not usable 3.00 MiB? Allocatable? ? ? ? ? ?yes (but full)? PE Size? ? ? ? ? ? ? ?4.00 MiB? Total PE? ? ? ? ? ? ? 2509? Free PE? ? ? ? ? ? ? ?0? Allocated PE? ? ? ? ? 2509? PV UUID? ? ? ? ? ? ? ?vBCY0m-syaR-HKNJ-FNlW-G7Ql-2eru-4ccPC6? ?? "/dev/sda3" is a new physical volume of "2.00 GiB"? --- NEW Physical volume ---? PV Name? ? ? ? ? ? ? ?/dev/sda3? VG Name? ? ? ? ? ? ? ?? PV Size? ? ? ? ? ? ? ?2.00 GiB? Allocatable? ? ? ? ? ?NO? PE Size? ? ? ? ? ? ? ?0? ?? Total PE? ? ? ? ? ? ? 0? Free PE? ? ? ? ? ? ? ?0? Allocated PE? ? ? ? ? 0? PV UUID? ? ? ? ? ? ? ?kRvof2-gzMz-raeu-njD7-vujG-N45B-yJemBd? ?[[email?protected] ~]# pvdisplay /dev/sda3? "/dev/sda3" is a new physical volume of "2.00 GiB"? --- NEW Physical volume ---? PV Name? ? ? ? ? ? ? ?/dev/sda3? VG Name? ? ? ? ? ? ? ?? PV Size? ? ? ? ? ? ? ?2.00 GiB? Allocatable? ? ? ? ? ?NO? PE Size? ? ? ? ? ? ? ?0? ?? Total PE? ? ? ? ? ? ? 0? Free PE? ? ? ? ? ? ? ?0? Allocated PE? ? ? ? ? 0? PV UUID? ? ? ? ? ? ? ?kRvof2-gzMz-raeu-njD7-vujG-N45B-yJemBd? ?[[email?protected] ~]# pvs? PV? ? ? ? ?VG Fmt? Attr PSize PFree? /dev/sda2? cl lvm2 a--? 9.80g? ? 0?? /dev/sda3? ? ?lvm2 ---? 2.00g 2.00g[[email?protected] ~]# man pvs[[email?protected] ~]# ^C[[email?protected] ~]# vgvgcfgbackup? ? vgcfgrestore? ?vgchange? ? ? ?vgck? ? ? ? ? ?vgconvert? ? ? vgcreate? ? ? ?vgdisplay? ? ? vgexport? ? ? ?vgextend? ? ? ?vgimport? ? ? ?vgimportclone? vgmerge? ? ? ? vgmknodes? ? ? vgreduce? ? ? ?vgremove? ? ? ?vgrename? ? ? ?vgs? ? ? ? ? ? vgscan? ? ? ? ?vgsplit? ? ? ??[[email?protected] ~]# vgvgcfgbackup? ? vgcfgrestore? ?vgchange? ? ? ?vgck? ? ? ? ? ?vgconvert? ? ? vgcreate? ? ? ?vgdisplay? ? ? vgexport? ? ? ?vgextend? ? ? ?vgimport? ? ? ?vgimportclone? vgmerge? ? ? ? vgmknodes? ? ? vgreduce? ? ? ?vgremove? ? ? ?vgrename? ? ? ?vgs? ? ? ? ? ? vgscan? ? ? ? ?vgsplit? ? ? ??[[email?protected] ~]# man vgextend?[[email?protected] ~]# vgextend ^C[[email?protected] ~]#?[[email?protected] ~]#?[[email?protected] ~]# lvdisplay? --- Logical volume ---? LV Path? ? ? ? ? ? ? ? /dev/cl/swap? LV Name? ? ? ? ? ? ? ? swap? VG Name? ? ? ? ? ? ? ? cl? LV UUID? ? ? ? ? ? ? ? fXT6fu-BoAz-0KaZ-rTH5-mHa6-l2uj-K8RCyh? LV Write Access? ? ? ? read/write? LV Creation host,time localhost.localdomain,2019-03-17 11:27:45 +0800? LV Status? ? ? ? ? ? ? available? # open? ? ? ? ? ? ? ? ?2? LV Size? ? ? ? ? ? ? ? 2.00 GiB? Current LE? ? ? ? ? ? ?512? Segments? ? ? ? ? ? ? ?1? Allocation? ? ? ? ? ? ?inherit? Read ahead sectors? ? ?auto? - currently set to? ? ?8192? Block device? ? ? ? ? ?253:1? ?? --- Logical volume ---? LV Path? ? ? ? ? ? ? ? /dev/cl/root? LV Name? ? ? ? ? ? ? ? root? VG Name? ? ? ? ? ? ? ? cl? LV UUID? ? ? ? ? ? ? ? srKRrd-Izbt-g00h-XiiR-vahV-CVCP-lRzOit? LV Write Access? ? ? ? read/write? LV Creation host,2019-03-17 11:27:46 +0800? LV Status? ? ? ? ? ? ? available? # open? ? ? ? ? ? ? ? ?1? LV Size? ? ? ? ? ? ? ? 7.80 GiB? Current LE? ? ? ? ? ? ?1997? Segments? ? ? ? ? ? ? ?1? Allocation? ? ? ? ? ? ?inherit? Read ahead sectors? ? ?auto? - currently set to? ? ?8192? Block device? ? ? ? ? ?253:0? ?[[email?protected] ~]# vgextend cl? ?/dev/sda3?? Volume group "cl" successfully extended[[email?protected] ~]# vgs? VG #PV #LV #SN Attr? ?VSize? VFree? cl? ?2? ?2? ?0 wz--n- 11.80g 2.00g[[email?protected] ~]# pvs? PV? ? ? ? ?VG Fmt? Attr PSize PFree? /dev/sda2? cl lvm2 a--? 9.80g? ? 0?? /dev/sda3? cl lvm2 a--? 2.00g 2.00g[[email?protected] ~]# pvdisplay? ?/dev/sda3?? --- Physical volume ---? PV Name? ? ? ? ? ? ? ?/dev/sda3? VG Name? ? ? ? ? ? ? ?cl? PV Size? ? ? ? ? ? ? ?2.00 GiB / not usable 4.00 MiB? Allocatable? ? ? ? ? ?yes?? PE Size? ? ? ? ? ? ? ?4.00 MiB? Total PE? ? ? ? ? ? ? 511? Free PE? ? ? ? ? ? ? ?511? Allocated PE? ? ? ? ? 0? PV UUID? ? ? ? ? ? ? ?kRvof2-gzMz-raeu-njD7-vujG-N45B-yJemBd? ?[[email?protected] ~]# df -hFilesystem? ? ? ? ? ?Size? Used Avail Use% Mounted on/dev/mapper/cl-root? 7.8G 1021M? 6.8G? 13% /devtmpfs? ? ? ? ? ? ?1.9G? ? ?0? 1.9G? ?0% /devtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /dev/shmtmpfs? ? ? ? ? ? ? ? 1.9G? 8.6M? 1.9G? ?1% /runtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /sys/fs/cgroup/dev/sda1? ? ? ? ? ? 197M? 117M? ?81M? 60% /boottmpfs? ? ? ? ? ? ? ? 378M? ? ?0? 378M? ?0% /run/user/0[[email?protected] ~]# man lvextend?[[email?protected] ~]# lvextend -L +2G /dev/mapper/cl-root? Insufficient free space: 512 extents needed,but only 511 available[[email?protected] ~]# lvextend -L +2G /dev/mapper/cl-root^C[[email?protected] ~]# man lvextend?[[email?protected] ~]# lvextend /dev/vg01/lvol01 /dev/sdk3? Volume group "vg01" not found? Cannot process volume group vg01[[email?protected] ~]# vgs? VG #PV #LV #SN Attr? ?VSize? VFree? cl? ?2? ?2? ?0 wz--n- 11.80g 2.00g[[email?protected] ~]# vgdisplay? --- Volume group ---? VG Name? ? ? ? ? ? ? ?cl? 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? ? ? ? ? ? ? ?11.80 GiB? PE Size? ? ? ? ? ? ? ?4.00 MiB? Total PE? ? ? ? ? ? ? 3020? Alloc PE / Size? ? ? ?2509 / 9.80 GiB? Free? PE / Size? ? ? ?511 / 2.00 GiB? VG UUID? ? ? ? ? ? ? ?xGCNuQ-UlO9-2Pdv-wnXq-11Ft-4SlA-5YU3kw? ?[[email?protected] ~]# lvextend /dev/cl/root? New size of 0 not permitted.[[email?protected] ~]# lvextend /dev/cl/root /dev/sda3? Size of logical volume cl/root changed from 7.80 GiB (1997 extents) to 9.80 GiB (2508 extents).? Logical volume cl/root successfully resized.[[email?protected] ~]# df -hFilesystem? ? ? ? ? ?Size? Used Avail Use% Mounted on/dev/mapper/cl-root? 7.8G 1021M? 6.8G? 13% /devtmpfs? ? ? ? ? ? ?1.9G? ? ?0? 1.9G? ?0% /devtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /dev/shmtmpfs? ? ? ? ? ? ? ? 1.9G? 8.6M? 1.9G? ?1% /runtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /sys/fs/cgroup/dev/sda1? ? ? ? ? ? 197M? 117M? ?81M? 60% /boottmpfs? ? ? ? ? ? ? ? 378M? ? ?0? 378M? ?0% /run/user/0[[email?protected] ~]# df -hFilesystem? ? ? ? ? ?Size? Used Avail Use% Mounted on/dev/mapper/cl-root? 7.8G 1021M? 6.8G? 13% /devtmpfs? ? ? ? ? ? ?1.9G? ? ?0? 1.9G? ?0% /devtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /dev/shmtmpfs? ? ? ? ? ? ? ? 1.9G? 8.6M? 1.9G? ?1% /runtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /sys/fs/cgroup/dev/sda1? ? ? ? ? ? 197M? 117M? ?81M? 60% /boottmpfs? ? ? ? ? ? ? ? 378M? ? ?0? 378M? ?0% /run/user/0[[email?protected] ~]# df -hFilesystem? ? ? ? ? ?Size? Used Avail Use% Mounted on/dev/mapper/cl-root? 7.8G 1021M? 6.8G? 13% /devtmpfs? ? ? ? ? ? ?1.9G? ? ?0? 1.9G? ?0% /devtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /dev/shmtmpfs? ? ? ? ? ? ? ? 1.9G? 8.6M? 1.9G? ?1% /runtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /sys/fs/cgroup/dev/sda1? ? ? ? ? ? 197M? 117M? ?81M? 60% /boottmpfs? ? ? ? ? ? ? ? 378M? ? ?0? 378M? ?0% /run/user/0[[email?protected] ~]# bgs-bash: bgs: command not found[[email?protected] ~]# vgs? VG #PV #LV #SN Attr? ?VSize? VFree? cl? ?2? ?2? ?0 wz--n- 11.80g? ? 0?[[email?protected] ~]# lvs? LV? ?VG Attr? ? ? ?LSize Pool Origin Data%? Meta%? Move Log Cpy%Sync Convert? root cl -wi-ao---- 9.80g? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? swap cl -wi-ao---- 2.00g? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??[[email?protected] ~]# vgdisplay? --- Volume group ---? VG Name? ? ? ? ? ? ? ?cl? System ID? ? ? ? ? ? ?? Format? ? ? ? ? ? ? ? lvm2? Metadata Areas? ? ? ? 2? Metadata Sequence No? 5? 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? ? ? ? ? ? ? ?11.80 GiB? PE Size? ? ? ? ? ? ? ?4.00 MiB? Total PE? ? ? ? ? ? ? 3020? Alloc PE / Size? ? ? ?3020 / 11.80 GiB? Free? PE / Size? ? ? ?0 / 0? ?? VG UUID? ? ? ? ? ? ? ?xGCNuQ-UlO9-2Pdv-wnXq-11Ft-4SlA-5YU3kw? ?[[email?protected] ~]# lvs? LV? ?VG Attr? ? ? ?LSize Pool Origin Data%? Meta%? Move Log Cpy%Sync Convert? root cl -wi-ao---- 9.80g? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? swap cl -wi-ao---- 2.00g? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??[[email?protected] ~]# resizeresize2fs? ?resizecons? resizepart??[[email?protected] ~]# man resize2fs[[email?protected] ~]# man xfs_growfs[[email?protected] ~]# xfs_growfs /dev/cl/rootmeta-data=/dev/mapper/cl-root? ? isize=512? ? agcount=4,agsize=511232 blks? ? ? ? ?=? ? ? ? ? ? ? ? ? ? ? ?sectsz=512? ?attr=2,projid32bit=1? ? ? ? ?=? ? ? ? ? ? ? ? ? ? ? ?crc=1? ? ? ? finobt=0 spinodes=0data? ? ?=? ? ? ? ? ? ? ? ? ? ? ?bsize=4096? ?blocks=2044928,imaxpct=25? ? ? ? ?=? ? ? ? ? ? ? ? ? ? ? ?sunit=0? ? ? swidth=0 blksnaming? ?=version 2? ? ? ? ? ? ? bsize=4096? ?ascii-ci=0 ftype=1log? ? ? =internal? ? ? ? ? ? ? ?bsize=4096? ?blocks=2560,version=2? ? ? ? ?=? ? ? ? ? ? ? ? ? ? ? ?sectsz=512? ?sunit=0 blks,lazy-count=1realtime =none? ? ? ? ? ? ? ? ? ?extsz=4096? ?blocks=0,rtextents=0data blocks changed from 2044928 to 2568192[[email?protected] ~]# df -hFilesystem? ? ? ? ? ?Size? Used Avail Use% Mounted on/dev/mapper/cl-root? 9.8G 1021M? 8.8G? 11% /devtmpfs? ? ? ? ? ? ?1.9G? ? ?0? 1.9G? ?0% /devtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /dev/shmtmpfs? ? ? ? ? ? ? ? 1.9G? 8.6M? 1.9G? ?1% /runtmpfs? ? ? ? ? ? ? ? 1.9G? ? ?0? 1.9G? ?0% /sys/fs/cgroup/dev/sda1? ? ? ? ? ? 197M? 117M? ?81M? 60% /boottmpfs? ? ? ? ? ? ? ? 378M? ? ?0? 378M? ?0% /run/user/0[[email?protected] ~]#?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读