一、普通磁盘分区管理方式

1.对磁盘进行分区
列出磁盘
# fdisk -l

# fdisk /dev/vdb
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.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x4765885b.

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

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

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

Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x635e6c7d

Device Boot      Start         End      Blocks   Id  System
/dev/vda1            2048    83886079    41942016   83  Linux

Disk /dev/vdb: 1073.7 GB, 1073741824000 bytes, 2097152000 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: 0x4765885b

Device Boot      Start         End      Blocks   Id  System
/dev/vdb1            2048  2097151999  1048574976   83  Linux

2.对磁盘格式化成ext4格式
# mkfs.ext4 /dev/vdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536000 inodes, 262143744 blocks
13107187 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2409627648
8000 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

3.将新的磁盘挂载在/data目录下
mkdir /data
# mount /dev/vdb1 /data

查看是否挂载成功
# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/vda1      ext4       40G  1.3G   37G   4% /
devtmpfs       devtmpfs   32G     0   32G   0% /dev
tmpfs          tmpfs      32G     0   32G   0% /dev/shm
tmpfs          tmpfs      32G  292K   32G   1% /run
tmpfs          tmpfs      32G     0   32G   0% /sys/fs/cgroup
tmpfs          tmpfs     6.3G     0  6.3G   0% /run/user/0
/dev/vdb1      ext4      985G   77M  935G   1% /data

4.添加自动挂载,重启系统后依然生效

vim /etc/fstab
/dev/vdb1 /data ext4 defaults 0 0

二、逻辑卷的方式

安装逻辑卷管理、vim、unzip、iftop等工具
yum install -y lvm2 vim unzip iftop

# fdisk -l

Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x635e6c7d

Device Boot      Start         End      Blocks   Id  System
/dev/vda1            2048    83886079    41942016   83  Linux

Disk /dev/vdb: 2147.5 GB, 2147483648000 bytes, 4194304000 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

# fdisk /dev/vdb
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.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x31ab9b87.

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

# 更加规范的做法是在分区时需要一个修改磁盘分区格式为linux lvm 代码为8e的操作

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

Calling ioctl() to re-read partition table.
Syncing disks.
# cat /proc/partitions
major minor  #blocks  name

11        0    1048575 sr0
 253        0   41943040 vda
 253        1   41942016 vda1
 253       16 2097152000 vdb
 253       17 2097150976 vdb1

# pvcreate /dev/vdb1
  Physical volume "/dev/vdb1" successfully created.
# vgcreate myvg /dev/vdb1
  Volume group "myvg" successfully created
# vgdisplay 
  --- Volume group ---
  VG Name               myvg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.95 TiB
  PE Size               4.00 MiB
  Total PE              511999
  Alloc PE / Size       0 / 0   
  Free  PE / Size       511999 / 1.95 TiB
  VG UUID               RpMeCU-gIV2-kEe5-fe6C-8iVI-xe0i-vf4ocp
   
# lvcreate -L 1.95T -n mylv myvg
  Rounding up size to full physical extent 1.95 TiB
  Logical volume "mylv" created.
# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/myvg/mylv
  LV Name                mylv
  VG Name                myvg
  LV UUID                e1nL7K-0qyc-BHt8-x9oO-1gGC-6qWn-a52o6x
  LV Write Access        read/write
  LV Creation host, time iZ2ze47of4mpxkhhzcgjheZ, 2017-01-07 12:18:26 +0800
  LV Status              available
  # open                 0
  LV Size                1.95 TiB
  Current LE             511181
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0
   
# mke2fs -t ext4 -b 2048 /dev/myvg/mylv 
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=2048 (log=1)
Fragment size=2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks
130863104 inodes, 1046898688 blocks
52344934 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1315438592
63898 block groups
16384 blocks per group, 16384 fragments per group
2048 inodes per group
Superblock backups stored on blocks: 
16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816, 1327104, 
2048000, 3981312, 5619712, 10240000, 11943936, 35831808, 39337984, 
51200000, 107495424, 256000000, 275365888, 322486272, 967458816

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

# mkdir /data
# mount /dev/myvg/mylv /data
# df -Th
Filesystem            Type      Size  Used Avail Use% Mounted on
/dev/vda1             ext4       40G  1.3G   37G   4% /
devtmpfs              devtmpfs   32G     0   32G   0% /dev
tmpfs                 tmpfs      32G     0   32G   0% /dev/shm
tmpfs                 tmpfs      32G  356K   32G   1% /run
tmpfs                 tmpfs      32G     0   32G   0% /sys/fs/cgroup
tmpfs                 tmpfs     6.3G     0  6.3G   0% /run/user/0
/dev/mapper/myvg-mylv ext4      2.0T   24M  1.9T   1% /data

开机自启动挂载分区
vim /etc/fstab
加入以下内容:
/dev/myvg/mylv /data ext4 defaults,noatime 0 0

# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Tue May  3 13:48:10 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=80b9b662-0a1d-4e84-b07b-c1bf19e72d97 /                       ext4    defaults        1 1
/dev/myvg/mylv /data ext4 defaults,noatime 0 0

 

示例

新购买的ECS数据盘1T,用了阿里云的400G数据盘作为模板
登录进去后数据盘只有400G,在控制台关闭ECS,重新初始化磁盘

[root@eus-timed-task01:~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 79G 9.0G 66G 13% /
tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
[root@eus-timed-task01:~]# mount -a
[root@eus-timed-task01:~]# mount
/dev/vda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

# 想通过格式化/dev/vdb1 成ext4

[root@eus-timed-task01:~]# mkfs.ext4 /dev/vdb1
mke2fs 1.41.12 (17-May-2010)
/dev/vdb1 is apparently in use by the system; will not make a filesystem here!

解决办法:
[root@eus-timed-task01:~]# dmsetup status
VG_Data-lv_data: 0 838852608 linear
[root@eus-timed-task01:~]# dmsetup remove_all
[root@eus-timed-task01:~]# demesup status
-bash: demesup: command not found
[root@eus-timed-task01:~]# dmsetup status
No devices found
[root@eus-timed-task01:~]# pvcreate /dev/vdb1
Physical volume "/dev/vdb1" successfully created

# lvm分区
[root@eus-timed-task01:~]# vgcreate /dev/vdb1
Please enter a physical volume path.
Run `vgcreate --help' for more information.
[root@eus-timed-task01:~]# vgcreate myvg /dev/vdb1
Volume group "myvg" successfully created
[root@eus-timed-task01:~]# vgdisplay
--- Volume group ---
VG Name myvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 1000.00 GiB
PE Size 4.00 MiB
Total PE 255999
Alloc PE / Size 0 / 0
Free PE / Size 255999 / 1000.00 GiB
VG UUID oeMYkq-8l6C-dHZx-In5b-3m8m-3jj5-dihQ3M

--- Volume group ---
VG Name VG_Data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 400.00 GiB
PE Size 4.00 MiB
Total PE 102399
Alloc PE / Size 102399 / 400.00 GiB
Free PE / Size 0 / 0
VG UUID 6dlcbY-mLx3-spKv-DUQ3-Av2S-7fVD-ye8JVC

# 100磁盘使用率
[root@eus-timed-task01:~]# lvcreate -l 100%VG -n mylv myvg
Logical volume "mylv" created.
[root@eus-timed-task01:~]# lvdisplay
--- Logical volume ---
LV Path /dev/myvg/mylv
LV Name mylv
VG Name myvg
LV UUID iq0LKn-bDSO-QPAn-C0mV-jADG-vc4W-PRPawO
LV Write Access read/write
LV Creation host, time eus-timed-task01, 2018-08-08 03:00:50 -0700
LV Status available
# open 0
LV Size 1000.00 GiB
Current LE 255999
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/VG_Data/lv_data
LV Name lv_data
VG Name VG_Data
LV UUID Yn1sTI-gAop-kodn-cvsN-OYnN-fNES-n7l9uk
LV Write Access read/write
LV Creation host, time iZrj9citgdpobfu83gsgodZ, 2018-06-15 00:05:23 -0700
LV Status NOT available
LV Size 400.00 GiB
Current LE 102399
Segments 1
Allocation inherit
Read ahead sectors auto

[root@eus-timed-task01:~]# mke2fs -t ext4 -b 2048 /dev/myvg/mylv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=2048 (log=1)
Fragment size=2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks
65536000 inodes, 524285952 blocks
26214297 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1061158912
32000 block groups
16384 blocks per group, 16384 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816, 1327104,
2048000, 3981312, 5619712, 10240000, 11943936, 35831808, 39337984,
51200000, 107495424, 256000000, 275365888, 322486272

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@eus-timed-task01:~]# ls /data
[root@eus-timed-task01:~]# mount /dev/myvg/mylv /data
[root@eus-timed-task01:~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 79G 6.2G 69G 9% /
tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/mapper/myvg-mylv
ext4 985G 23M 935G 1% /data
[root@eus-timed-task01:~]# vim /etc/fstab
/dev/myvg/mylv /data ext4 defaults,noatime 0 0

# 重新启动看能否正常挂载

逻辑卷扩容的示例

示例:将/aliyun的逻辑卷分区由110G增加到150G

# vgdisplay myvg
  --- Volume group ---
  VG Name               myvg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               120.00 GiB
  PE Size               4.00 MiB
  Total PE              30719
  Alloc PE / Size       28160 / 110.00 GiB
  Free  PE / Size       2559 / 10.00 GiB
  VG UUID               v5LSS8-E5HW-htEL-ioet-Up3T-zUFz-vtCzlA

[root@mini2 ~]# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        30G  1.8G   29G   6% /
devtmpfs                devtmpfs  907M     0  907M   0% /dev
tmpfs                   tmpfs     917M     0  917M   0% /dev/shm
tmpfs                   tmpfs     917M  8.6M  908M   1% /run
tmpfs                   tmpfs     917M     0  917M   0% /sys/fs/cgroup
/dev/mapper/centos-data xfs        40G   33M   40G   1% /data
/dev/mapper/myvg-mylv   ext4      109G   19M  103G   1% /aliyun
/dev/sda1               xfs       297M  115M  183M  39% /boot
tmpfs                   tmpfs     184M     0  184M   0% /run/user/0

1.新增一块60G的硬盘,分区
# fdisk /dev/sdc
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.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x58d7841e.

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

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

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

2.将新增加的分区/dev/sdc1扩容到物理卷myvg中
# vgextend myvg /dev/sdc1
  Physical volume "/dev/sdc1" successfully created
  Volume group "myvg" successfully extended
# 可以看到由10G扩展到了59.99G
[root@mini2 ~]# vgdisplay myvg
  --- Volume group ---
  VG Name               myvg
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               169.99 GiB
  PE Size               4.00 MiB
  Total PE              43518
  Alloc PE / Size       28160 / 110.00 GiB
  Free  PE / Size       15358 / 59.99 GiB
  VG UUID               v5LSS8-E5HW-htEL-ioet-Up3T-zUFz-vtCzlA

# lvdisplay /dev/myvg/mylv
  --- Logical volume ---
  LV Path                /dev/myvg/mylv
  LV Name                mylv
  VG Name                myvg
  LV UUID                3H0Qgm-tDJr-BJ96-Y0Vh-TMOE-1EZv-DN3qUE
  LV Write Access        read/write
  LV Creation host, time mini2, 2017-01-07 13:55:37 +0800
  LV Status              available
  # open                 1
  LV Size                110.00 GiB
  Current LE             28160
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

3.扩展物理边界为150G
[root@mini2 ~]# lvextend -L 150G /dev/myvg/mylv
  Size of logical volume myvg/mylv changed from 110.00 GiB (28160 extents) to 150.00 GiB (38400 extents).
  Logical volume mylv successfully resized.
可以看到已经有110变成了150G
[root@mini2 ~]# lvdisplay /dev/myvg/mylv
  --- Logical volume ---
  LV Path                /dev/myvg/mylv
  LV Name                mylv
  VG Name                myvg
  LV UUID                3H0Qgm-tDJr-BJ96-Y0Vh-TMOE-1EZv-DN3qUE
  LV Write Access        read/write
  LV Creation host, time mini2, 2017-01-07 13:55:37 +0800
  LV Status              available
  # open                 1
  LV Size                150.00 GiB
  Current LE             38400
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

[root@mini2 ~]# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        30G  1.8G   29G   6% /
devtmpfs                devtmpfs  907M     0  907M   0% /dev
tmpfs                   tmpfs     917M     0  917M   0% /dev/shm
tmpfs                   tmpfs     917M  8.6M  908M   1% /run
tmpfs                   tmpfs     917M     0  917M   0% /sys/fs/cgroup
/dev/mapper/centos-data xfs        40G   33M   40G   1% /data
/dev/mapper/myvg-mylv   ext4      109G   19M  103G   1% /aliyun
/dev/sda1               xfs       297M  115M  183M  39% /boot
tmpfs                   tmpfs     184M     0  184M   0% /run/user/0

4.扩展逻辑边界,可以看到磁盘分区/aliyun由109G变成了148G
[root@mini2 ~]# resize2fs /dev/myvg/mylv 
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/myvg/mylv is mounted on /aliyun; on-line resizing required
old_desc_blocks = 110, new_desc_blocks = 150
The filesystem on /dev/myvg/mylv is now 78643200 blocks long.

[root@mini2 ~]# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        30G  1.8G   29G   6% /
devtmpfs                devtmpfs  907M     0  907M   0% /dev
tmpfs                   tmpfs     917M     0  917M   0% /dev/shm
tmpfs                   tmpfs     917M  8.6M  908M   1% /run
tmpfs                   tmpfs     917M     0  917M   0% /sys/fs/cgroup
/dev/mapper/centos-data xfs        40G   33M   40G   1% /data
/dev/mapper/myvg-mylv   ext4      148G   17M  141G   1% /aliyun
/dev/sda1               xfs       297M  115M  183M  39% /boot
tmpfs                   tmpfs     184M     0  184M   0% /run/user/0

UCLOUD对数据盘扩容后需要控制台重启,并进入系统后进行如下操作:

//针对ext4文件格式的操作系统(如CentOS6):

umount /dev/vdb
e2fsck -f /dev/vdb
resize2fs /dev/vdb
mount /dev/vdb /data

ucloud升级磁盘空间后需要做的操作:

具体:

[root@u04rdp01 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 40G 6.2G 32G 17% /
tmpfs tmpfs 7.8G 12K 7.8G 1% /dev/shm
/dev/vdb ext4 493G 492G 0 100% /data
[root@u04rdp01 ~]# umount /dev/vdb
[root@u04rdp01 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 40G 6.2G 32G 17% /
tmpfs tmpfs 7.8G 12K 7.8G 1% /dev/shm
[root@u04rdp01 ~]# e2fsck -f /dev/vdb
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vdb: 32929/32768000 files (0.5% non-contiguous), 131018675/131072000 blocks
[root@u04rdp01 ~]# resize2fs /dev/vdb
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vdb to 262144000 (4k) blocks.
The filesystem on /dev/vdb is now 262144000 blocks long.

[root@u04rdp01 ~]# mount /dev/vdb /data
[root@u04rdp01 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 40G 6.2G 32G 17% /
tmpfs tmpfs 7.8G 12K 7.8G 1% /dev/shm
/dev/vdb ext4 985G 492G 443G 53% /data

//针对xfs文件格式的操作系统(如CentOS7)//
umount /dev/vdb
xfs_repair /dev/vdb
mount /dev/vdb /data
xfs_growfs /data

#美西,# 为了避免阿里云磁盘扩容麻烦直接跳过fdisk分区
fdisk -l
pvcreate /dev/vdb
vgcreate myvg /dev/vdb
lvcreate -l 100%VG -n mylv myvg
mkfs.xfs -f /dev/myvg/mylv
mount /dev/myvg/mylv /data

# vim /etc/fstab

/dev/mapper/myvg-mylv /data                    xfs defaults 0 0

# 简单扩容

pvcreate /dev/sdb
vgextend centos7_vGroup001 /dev/sdb
lvextend -l +100%FREE /dev/centos7_vGroup001/root
# ext4扩容
# resize2fs /dev/centos7_vGroup001/root

# xfs扩容
# xfs_growfs /dev/centos7_vGroup001/root

aliyun添加数据盘后的物理分区和lvm逻辑卷两种挂载方式的更多相关文章

  1. linux运维基础知识-系统分区及LVM逻辑卷的创建

    系统分区及LVM逻辑卷的创建 分区 创建逻辑卷 LVM简介:逻辑卷管理器(LogicalVolumeManager)本质上是一个虚拟设备驱动,是在内核中块设备和物理设备之间添加的一个新的抽象层次,如图 ...

  2. [转帖]kubernetes ingress 在物理机上的nodePort和hostNetwork两种部署方式解析及比较

    kubernetes ingress 在物理机上的nodePort和hostNetwork两种部署方式解析及比较 https://www.cnblogs.com/xuxinkun/p/11052646 ...

  3. Linux磁盘分区与lvm逻辑卷

    硬盘接口的种类分四类:(价格由低到高) IDE SATA硬盘:别名串口硬盘,具有较强的纠错能力. SCSI硬盘:即采用SCSI接口的硬盘,SCSI接口具有应用范围广,多任务,带宽大,CPU占用率低. ...

  4. kubernetes ingress 在物理机上的nodePort和hostNetwork两种部署方式解析及比较

    ingress controller在物理机上的两种部署方式 ingress controller(ingress-nginx)负责k8s中的7层负载均衡.其在物理机中有多种部署方式.本文中主要选择了 ...

  5. 关于搜索elasticsearch的数据条数大于10000的坑 max_result_window的两种设置方式

    当用elasticsearch进行深度分页查询时的size-from大于10000的时候,就会报错“”, 官方推荐是scroll查询返回结果是无序的不满足业务需求,所以还是通过设置最大返回结果数来达到 ...

  6. Linux下对lvm逻辑卷分区大小的调整(针对xfs和ext4不同文件系统)

    当我们在安装系统的时候,由于没有合理分配分区空间,在后续维护过程中,发现有些分区空间不够使用,而有的分区空间却有很多剩余空间.如果这些分区在装系统的时候使用了lvm(前提是这些分区要是lvm逻辑卷分区 ...

  7. 1.4 Linux下对lvm逻辑卷分区大小的调整(针对xfs和ext4不同文件系统)

      当我们在安装系统的时候,由于没有合理分配分区空间,在后续维护过程中,发现有些分区空间不够使用,而有的分区空间却有很多剩余空间.如果这些分区在装系统的时候使用了lvm(前提是这些分区要是lvm逻辑卷 ...

  8. LVM逻辑卷:创建LVM分区实例

    一.概述 LVM(Logical Volume Manager)是基于内核的一种逻辑卷管理器,LVM适合于管理大存储设备,并允许用户动态调整文件系统的大小.此外LVM快照功能可以帮助我们快速备份数据. ...

  9. Cenots7对lvm逻辑卷分区大小的调整

    Cenots7对lvm逻辑卷分区大小的调整 (针对xfs和ext4不同文件系统) 1.支持的文件系统类型 特别注意的是: resize2fs命令            针对的是ext2.ext3.ex ...

随机推荐

  1. [WF2012]infiltration

    [WF2012]infiltration 完全图 最多选择logn个点(下取整)(每选择一个点覆盖至少一半的规模) 暴力O(75^5)(不严格)枚举+bitset (随机化也可过) #include& ...

  2. 总算知道怎样从ImageMagick生成的数据转换成HICON: MagickGetImageBlob & LookupIconIdFromDirectoryEx

    MagickSetImageFormat(mw, "ICO"); //设置这个后, MagickGetImageBlob 才能返回正确的值 size_t length; PBYTE ...

  3. Linux下编译安装Lnmp

    1.安装nginx 下载链接http://nginx.org/en/download.html (1)下载,解压 wget http://nginx.org/download/nginx-1.15.8 ...

  4. 关于阿里云Centos服务器搭建Java网站不能访问的问题

    首先阿里云提供的手册是没问题的 手工搭建 然后我在地址栏输入服务器地址之后总是提示无法访问! 输入命令 netstat -tunlp,80端口确实是在监听(这里不是8080,因为我在tomcat的配置 ...

  5. shiro+SpringMVC 项目 配置404页面

    说的配置404,大家都会想到去web.xml里面配置 <error-page> <error-code></error-code> <location> ...

  6. HTTP Status 405 - HTTP method POST is not supported by this URL

    出现这个问题, 1.在servlet中没有调用post()方法引起的 2.在serlvet中跳转没有用外跳(response.sendRedirect()) 我的是因为第一种,是没有写dopost() ...

  7. md5加密解密版本2

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  8. 获取天气预报API5_统计最容易生病时间段

    sklearn实战-乳腺癌细胞数据挖掘(博客主亲自录制视频教程) https://study.163.com/course/introduction.htm?courseId=1005269003&a ...

  9. 我的 $OI$, 退役前写点东西

    离 \(NOIp2018\) 还有五天, 总想写点什么 马上退役了啊 是什么时候喜欢上信息技术的呢 记不清了, 很小的时候就喜欢捣鼓关于电脑的东西 当时也不知道有算法这种东西 只是知道有黑客 巨 j8 ...

  10. pyppeteer 报错-无法连接到浏览器

    问题 程序报错: Failed to connect to browser port: http://127.0.0.1:57899/json/version 原因 虽然pyppeteer在首次启动时 ...