Linux 磁盘扩容及挂载新盘
前言
在使用虚拟机的时候默认创建的磁盘大小是20G,有时候需要更大的磁盘空间,在虚拟机设置调整之后,还要手动在Linux的里面扩容或者添加新盘
一、磁盘扩容
1、修改虚拟机的硬盘大小
2、查看磁盘大小
#查看磁盘大小107.4 GB
[root@postgres ~]# fdisk -l
磁盘 /dev/sda:107.4 GB, 107374182400 字节,209715200 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节#调整后查看磁盘大小已经为 137G了
[root@postgres ~]# fdisk -l磁盘 /dev/sda:137.4 GB, 137438953472 字节,268435456 个扇区
Units = 扇区 of 1 * 512 = 512 bytes#查看磁盘使用,并没有用完,还是原来的大小并没有扩容还是100G
[root@postgres ~]# df -TH
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 98G 15G 84G 15% /
devtmpfs devtmpfs 1.1G 0 1.1G 0% /dev
tmpfs tmpfs 1.1G 623k 1.1G 1% /dev/shm
tmpfs tmpfs 1.1G 9.0M 1.1G 1% /run
tmpfs tmpfs 1.1G 0 1.1G 0% /sys/fs/cgroup
/dev/sda1 xfs 1.1G 131M 933M 13% /boot
tmpfs tmpfs 210M 0 210M 0% /run/user/0
3、创建分区
扩容一个10G的分区
操作步骤
[root@postgres ~]# fdisk /dev/sda
命令(输入 m 获取帮助):m
命令(输入 m 获取帮助):n
Select (default p): p
分区号 (3,4,默认 3):3
起始 扇区 (209715200-268435455,默认为 209715200):
将使用默认值 209715200
Last 扇区, +扇区 or +size{K,M,G} (209715200-268435455,默认为 268435455):+10G
分区 3 已设置为 Linux 类型,大小设为 10 GiB命令(输入 m 获取帮助):t
分区号 (1-3,默认 3):3
Hex 代码(输入 L 列出所有代码):L
ex 代码(输入 L 列出所有代码):8e
已将分区“Linux”的类型更改为“Linux LVM”命令(输入 m 获取帮助):w
The partition table has been altered!
完整的操作步骤参考(可以按照上面步骤执行)
[root@postgres ~]# fdisk /dev/sda
欢迎使用 fdisk (util-linux 2.23.2)。更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。命令(输入 m 获取帮助):m
命令操作a toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitiong create a new empty GPT partition tableG create an IRIX (SGI) partition tablel list known partition typesm print this menun add a new partitiono create a new empty DOS partition tablep print the partition tableq quit without saving changess create a new empty Sun disklabelt change a partition s system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)命令(输入 m 获取帮助):n
Partition type:p primary (2 primary, 0 extended, 2 free)e extended
Select (default p): p
分区号 (3,4,默认 3):3
起始 扇区 (209715200-268435455,默认为 209715200):
将使用默认值 209715200
Last 扇区, +扇区 or +size{K,M,G} (209715200-268435455,默认为 268435455):+10G
分区 3 已设置为 Linux 类型,大小设为 10 GiB命令(输入 m 获取帮助):t
分区号 (1-3,默认 3):3
Hex 代码(输入 L 列出所有代码):L0 空 24 NEC DOS 81 Minix / 旧 Linu bf Solaris 1 FAT12 27 隐藏的 NTFS Win 82 Linux 交换 / So c1 DRDOS/sec (FAT-2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-3 XENIX usr 3c PartitionMagic 84 OS/2 隐藏的 C: c6 DRDOS/sec (FAT-4 FAT16 <32M 40 Venix 80286 85 Linux 扩展 c7 Syrinx 5 扩展 41 PPC PReP Boot 86 NTFS 卷集 da 非文件系统数据 6 FAT16 42 SFS 87 NTFS 卷集 db CP/M / CTOS / .7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux 纯文本 de Dell 工具 8 AIX 4e QNX4.x 第2部分 8e Linux LVM df BootIt 9 AIX 可启动 4f QNX4.x 第3部分 93 Amoeba e1 DOS 访问 a OS/2 启动管理器 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad 休 eb BeOS fs e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT f W95 扩展 (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC
11 隐藏的 FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq 诊断 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 隐藏的 FAT16 <3 61 SpeedStor ab Darwin 启动 f2 DOS 次要
16 隐藏的 FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 隐藏的 HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST 智能睡眠 65 Novell Netware b8 BSDI swap fd Linux raid 自动
1b 隐藏的 W95 FAT3 70 DiskSecure 多启 bb Boot Wizard 隐 fe LANstep
1c 隐藏的 W95 FAT3 75 PC/IX be Solaris 启动 ff BBT
1e 隐藏的 W95 FAT1 80 旧 Minix
Hex 代码(输入 L 列出所有代码):8e
已将分区“Linux”的类型更改为“Linux LVM”命令(输入 m 获取帮助):w
The partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
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)
正在同步磁盘。
[root@postgres ~]#
4、查看分区
查看已创建的分区。命令“fdisk -l“,可以看到多了/dev/sda3
[root@postgres ~]# fdisk -l磁盘 /dev/sda:137.4 GB, 137438953472 字节,268435456 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x000b06d5设备 Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 209715199 103808000 8e Linux LVM
/dev/sda3 209715200 230686719 10485760 8e Linux LVM
5、同步分区并创建物理卷
创建分区后,需要同步分区和创建物理卷。命令分别是“partprobe“和”pvcreate /dev/sda3“
[root@postgres ~]# partprobe
[root@postgres ~]# pvcreate /dev/sda3Physical volume "/dev/sda3" successfully created.
[root@postgres ~]#
查看物理卷
[root@postgres ~]# pvdisplay--- Physical volume ---PV Name /dev/sda2VG Name centosPV Size <99.00 GiB / not usable 3.00 MiBAllocatable yes (but full)PE Size 4.00 MiBTotal PE 25343Free PE 0Allocated PE 25343PV UUID rYKqk9-fhz6-DJeG-SGmE-WOA8-wQbJ-fEX1OZ--- Physical volume ---PV Name /dev/sda3VG Name centosPV Size 10.00 GiB / not usable 4.00 MiBAllocatable yes (but full)PE Size 4.00 MiBTotal PE 2559Free PE 0Allocated PE 2559PV UUID RYFcba-7kP7-bNSf-lyMC-nO0N-oUR1-dXYfZi
6、查看卷组
[root@postgres ~]# vgdisplay--- Volume group ---VG Name centosSystem ID Format lvm2Metadata Areas 1Metadata Sequence No 3VG Access read/writeVG Status resizableMAX LV 0Cur LV 2Open LV 2Max PV 0Cur PV 1Act PV 1VG Size <99.00 GiBPE Size 4.00 MiBTotal PE 25343Alloc PE / Size 25343 / <99.00 GiBFree PE / Size 0 / 0 VG UUID mZQeMJ-sRF9-bnpv-gl7Y-PubR-krJY-WpOYfm
7、创建的物理卷,加入到卷组
将创建的物理卷,加入到卷组中。命令“vgextend 卷组名 物理卷”,其中卷组名是上一步获取的值,物理卷是新创建的物理卷。例:”vgextend centos /dev/sda3“
[root@postgres ~]# vgextend centos /dev/sda3Volume group "centos" successfully extended
8、将加入卷组的容量扩容到文件系统上
将加入卷组的容量扩容到文件系统上,首先选择自己要挂载的扩展的文件系统 df-Th
命令 lvextend -l +100%FREE /dev/mapper/centos-root
[root@postgres ~]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 91G 14G 78G 15% /
devtmpfs devtmpfs 990M 0 990M 0% /dev
tmpfs tmpfs 1001M 608K 1000M 1% /dev/shm
tmpfs tmpfs 1001M 8.6M 992M 1% /run
tmpfs tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 125M 890M 13% /boot
tmpfs tmpfs 201M 0 201M 0% /run/user/0
[root@postgres ~]# lvextend -l +100%FREE /dev/mapper/centos-rootSize of logical volume centos/root changed from <91.00 GiB (23295 extents) to 100.99 GiB (25854 extents).Logical volume centos/root successfully resized.
9、刷新文件系统的存储容量
查看文件类型发现是xfs
刷新文件系统的存储容量
文件类型是ext4的使用:resize2fs /dev/mapper/centos-root
文件类型是xfs的使用:xfs_growfs /dev/mapper/centos-root
命令 xfs_growfs /dev/mapper/centos-root
执行命令后,使用命令”df -TH“可以看到这个盘的容量已经变成101G了。
[root@postgres ~]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 91G 14G 78G 15% /
devtmpfs devtmpfs 990M 0 990M 0% /dev
tmpfs tmpfs 1001M 608K 1000M 1% /dev/shm
tmpfs tmpfs 1001M 8.6M 992M 1% /run
tmpfs tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 125M 890M 13% /boot
tmpfs tmpfs 201M 0 201M 0% /run/user/0
[root@postgres ~]# xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=5963520 blks= sectsz=512 attr=2, projid32bit=1= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=23854080, imaxpct=25= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=11647, version=2= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 23854080 to 26474496
[root@postgres ~]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 101G 14G 88G 14% /
devtmpfs devtmpfs 990M 0 990M 0% /dev
tmpfs tmpfs 1001M 608K 1000M 1% /dev/shm
tmpfs tmpfs 1001M 8.6M 992M 1% /run
tmpfs tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 125M 890M 13% /boot
tmpfs tmpfs 201M 0 201M 0% /run/user/0
[root@postgres ~]#
10、可以看到容量成功扩容了
11、参考资料
https://blog.csdn.net/weixin_41891696/article/details/118805670
https://blog.csdn.net/john1337/article/details/119749350
二、挂载新盘
1、创建分区
磁盘从100G扩容到了128G,其中第一步磁盘扩容了10G,再创建一个10G的新分区
[root@postgres ~]# fdisk -l磁盘 /dev/sda:137.4 GB, 137438953472 字节,268435456 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x000b06d5设备 Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 209715199 103808000 8e Linux LVM
/dev/sda3 209715200 230686719 10485760 8e Linux LVM磁盘 /dev/mapper/centos-root:108.4 GB, 108439535616 字节,211795968 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节磁盘 /dev/mapper/centos-swap:8589 MB, 8589934592 字节,16777216 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节[root@postgres ~]# pvcreate /dev/sdb4Device /dev/sdb4 not found (or ignored by filtering).
[root@postgres ~]# fdisk /dev/sda
欢迎使用 fdisk (util-linux 2.23.2)。更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。命令(输入 m 获取帮助):n
Partition type:p primary (3 primary, 0 extended, 1 free)e extended
Select (default e): p
已选择分区 4
起始 扇区 (230686720-268435455,默认为 230686720):
将使用默认值 230686720
Last 扇区, +扇区 or +size{K,M,G} (230686720-268435455,默认为 268435455):+10G
分区 4 已设置为 Linux 类型,大小设为 10 GiB命令(输入 m 获取帮助):t
分区号 (1-4,默认 4):4
Hex 代码(输入 L 列出所有代码):8e
已将分区“Linux”的类型更改为“Linux LVM”命令(输入 m 获取帮助):w
The partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
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)
正在同步磁盘。
[root@postgres ~]# fdisk -l磁盘 /dev/sda:137.4 GB, 137438953472 字节,268435456 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x000b06d5设备 Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 209715199 103808000 8e Linux LVM
/dev/sda3 209715200 230686719 10485760 8e Linux LVM
/dev/sda4 230686720 251658239 10485760 8e Linux LVM
2、同步分区并创建物理卷pv
[root@postgres ~]# pvsPV VG Fmt Attr PSize PFree/dev/sda2 centos lvm2 a-- <99.00g 0 /dev/sda3 centos lvm2 a-- <10.00g 0
[root@postgres ~]# partprobe
[root@postgres ~]# pvcreate /dev/sda4Physical volume "/dev/sda4" successfully created.
[root@postgres ~]# pvsPV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a-- <99.00g 0 /dev/sda3 centos lvm2 a-- <10.00g 0 /dev/sda4 lvm2 --- 10.00g 10.00g
[root@postgres ~]#
3、创建新的卷组vg
#查看pv及vg
[root@postgres ~]# pvsPV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a-- <99.00g 0 /dev/sda3 centos lvm2 a-- <10.00g 0 /dev/sda4 lvm2 --- 10.00g 10.00g
[root@postgres ~]# vgcreate cosmic /dev/sda4 Volume group "cosmic" successfully created
[root@postgres ~]# pvsPV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a-- <99.00g 0 /dev/sda3 centos lvm2 a-- <10.00g 0 /dev/sda4 cosmic lvm2 a-- <10.00g <10.00g
4、查看卷组vg并创建逻辑卷lv
[root@postgres ~]# vgsVG #PV #LV #SN Attr VSize VFree centos 2 2 0 wz--n- 108.99g 0 cosmic 1 0 0 wz--n- <10.00g <10.00g
[root@postgres ~]# lvcreate -L 10G -n cosmiclv cosmicVolume group "cosmic" has insufficient free space (2559 extents): 2560 required.
[root@postgres ~]# lvsLV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convertroot centos -wi-ao---- 100.99g swap centos -wi-ao---- 8.00g
[root@postgres ~]# lvcreate -L 8G -n cosmiclv cosmicLogical volume "cosmiclv" created.
[root@postgres ~]# lvdisplay--- Logical volume ---LV Path /dev/cosmic/cosmiclvLV Name cosmiclvVG Name cosmicLV UUID YAX3zl-AFQz-TJIO-Zx5n-HAS4-QbpE-gnBOB3LV Write Access read/writeLV Creation host, time postgres, 2022-09-29 19:36:39 +0800LV Status available# open 0LV Size 8.00 GiBCurrent LE 2048Segments 1Allocation inheritRead ahead sectors auto- currently set to 8192Block device 253:2--- Logical volume ---LV Path /dev/centos/rootLV Name rootVG Name centosLV UUID TDLwUc-hDfB-BTuB-QzCS-LwTF-a7KK-pAc2CALV Write Access read/writeLV Creation host, time localhost, 2021-07-29 11:18:17 +0800LV Status available# open 1LV Size 100.99 GiBCurrent LE 25854Segments 2Allocation inheritRead ahead sectors auto- currently set to 8192Block device 253:0--- Logical volume ---LV Path /dev/centos/swapLV Name swapVG Name centosLV UUID EMo8Jz-4CrJ-g5z5-A9Jq-vrpE-cVV6-ZoxFrmLV Write Access read/writeLV Creation host, time localhost, 2021-07-29 11:18:18 +0800LV Status available# open 2LV Size 8.00 GiBCurrent LE 2048Segments 1Allocation inheritRead ahead sectors auto- currently set to 8192Block device 253:1
5、将新创建的lv逻辑卷格式化为xfs格式
[root@postgres ~]# mkfs.xfs /dev/cosmic/cosmiclv
meta-data=/dev/cosmic/cosmiclv isize=512 agcount=4, agsize=524288 blks= sectsz=512 attr=2, projid32bit=1= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=2097152, imaxpct=25= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
6、创建一个数据目录并挂载lv
[root@postgres /]# mkdir /data
[root@postgres /]# mount /dev/cosmic/cosmiclv /data
[root@postgres /]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 101G 14G 88G 14% /
devtmpfs devtmpfs 990M 0 990M 0% /dev
tmpfs tmpfs 1001M 608K 1000M 1% /dev/shm
tmpfs tmpfs 1001M 8.6M 992M 1% /run
tmpfs tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 125M 890M 13% /boot
tmpfs tmpfs 201M 0 201M 0% /run/user/0
/dev/mapper/cosmic-cosmiclv xfs 8.0G 33M 8.0G 1% /data
[root@postgres /]#
7、将新挂载的目录加入开机启动项,重启后自动挂载
[root@postgres /]# lvdisplay--- Logical volume ---LV Path /dev/cosmic/cosmiclv
#修改文件
vi /etc/fstab
#添加内容
/dev/cosmic/cosmiclv /data xfs defaults 0 0
#验证
[root@postgres /]# reboot
Last login: Thu Sep 29 18:50:21 2022 from 172.16.94.1
[root@postgres ~]#
[root@postgres ~]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 101G 14G 88G 14% /
devtmpfs devtmpfs 990M 0 990M 0% /dev
tmpfs tmpfs 1001M 608K 1000M 1% /dev/shm
tmpfs tmpfs 1001M 8.6M 992M 1% /run
tmpfs tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 125M 890M 13% /boot
/dev/mapper/cosmic-cosmiclv xfs 8.0G 33M 8.0G 1% /data
tmpfs tmpfs 201M 0 201M 0% /run/user/0
[root@postgres ~]#
8、参考资料
# 添加一个70G的硬盘
# fdisk -l 查看新增加的磁盘
# pvcreate /dev/sdb (创建PV)
# pvs 查看新增加的pv盘
# vgcreate cosmicvg /dev/sdb (创建vg)# vgs 查看新增加的vg
# lvcreate -L 69G -n cosmiclv cosmicvg (创建lv )# lvdisplay 查看逻辑卷路径# mkfs.xfs /dev/cosmicvg/cosmiclv (将新创建的LV逻辑卷格式化为xfs格式)# mkdir /kingdee (创建一个存数据目录)
# mount /dev/cosmicvg/cosmiclv /kingdee (挂载新目录出来)# df -h 可以查看到新挂载的目录
#将新挂载的目录加入开机启动项,重启后自动挂载
# vi /etc/fstab
# /dev/cosmicvg/cosmiclv /kingdee xfs defaults 0 0
Linux 磁盘扩容及挂载新盘相关推荐
- linux磁盘扩容_超详尽!Linux云服务器存储扩容实操
导语 | 随着业务的发展,业务数据不停的增长,原有的磁盘空间可能会出现磁盘空间不够用的情况,因此,需要对磁盘空间进行扩容,以满足业务数据增长的需求.本文总结了Linux环境下云服务器存储扩容的三种方式 ...
- linux磁盘扩容方案
linux磁盘扩容方案 一.分区方式扩容 二.逻辑卷方式扩容(推荐) 一.分区方式扩容 df -h命令可以查看磁盘的存储情况,查到其中有一个分区使用率如下 Filesystem Size Used A ...
- linux主分区移动挂载,Linux磁盘分区和挂载
Linux磁盘分区和挂载 分区 分区的方式: mbr分区 最多支持4个主分区 系统只能安装到主分区上 扩展分区要占用一个主分区 MBR最大支持2TB,但拥有最好的兼容性 gtp分区 支持无线多个主分区 ...
- Linux磁盘分区、挂载
Linux磁盘分区.挂载 原理介绍 Linux 来说无论有几个分区,分给哪一目录使用,它归根结底就只有一个根目录,一个独立且唯一的文件结构 , Linux中每个分区都是用来组成整个文件系统的一部分. ...
- 日常问题解决:Linux磁盘扩容
linux磁盘扩容 1.用fdisk /dev/sda命令,选择'n'创建新分区,主分区,逻辑分区对这个例子来说都可以,'w'保存. 重启机器生效. 2.接下来创建sda3分区 建为物理卷 (pvcr ...
- linux脚本对磁盘分区,shell 脚本实战笔记(4)--linux磁盘分区重新挂载
背景: Hadoop的HDFS文件系统的挂载, 默认指定的文件目录是/mnt/disk{N}. 当运维人员, 不小心把磁盘挂载于其他目录, 比如/mnt/data, /mnt/disk01, /mnt ...
- Linux 磁盘扩容
一.查看系统磁盘 1.使用df -hl ,查看系统的磁盘使用情况 二.linux磁盘扩容 当LVM分区空间不足的时候,可以进行扩容,主要的扩容方法有: 1.通过空余的磁盘进行扩容,这个方法比较简单,不 ...
- linux下挂载优盘脚本,一种linux系统下自动挂载U盘的方法与流程
技术领域 本发明涉及服务器维护技术领域,尤其涉及一种linux系统下自动挂载U盘的方法. 背景技术: 不管是测试服务器的维护,还是用户使用的服务器,在维护.更新.使用过程中,需要使用U盘向服务器拷贝文 ...
- Linux 磁盘管理,挂载分区管理,磁盘分区扩容缩容管理,详细教程
一.Linux磁盘基本信息查看命令 df -h 查看已经在使用或挂载的磁盘信息.查看的是文件系统的大小 ubuntu@ubuntu:~$ df -h Filesystem Size Used Avai ...
最新文章
- iptables 生效_Linux防火墙Firewall和Iptables的使用
- AOS编排语言系列教程(四):创建弹性云服务器ECS
- cmd执行bat结果不回显_cmd - 如何在bat文件中调用另一个bat文件
- 图像局部特征(二)--Harris角点检测子
- vue监听数组元素属性的变化_为什么Vue3.0不再使用defineProperty实现数据监听?
- [转载] ubuntu下pip的安装、升级和使用
- COMSOL学习之(1)入门—简单操作及帮助
- 记录工作时,优化程序代码二
- 仿蜜雪冰城点餐小程序
- EPUB、CAJ 、PDF 格式的区别,有什么好用的epub阅读器
- 如何在Windows 10上修复缩略图问题
- (附源码)ssm高校学生档案信息管理系统 毕业设计 010936
- c语言模拟走迷宫课程程序设计报告,《C语言程序设计》走迷宫游戏程序设计.doc...
- Android事件分发之源码分析,kotlin库
- 数据挖掘面试题(1)
- 计算机中的原码,计算机中的原码反码补码移码
- 网易WEB白帽子-WEB安全体系建设
- Arcface v3 论文翻译与解读
- UILabel添加下划线
- 正版计算机软件识别方法,微软正版软件如何识别?
热门文章
- TACL 2022 | GAL:合成文本在自然语言处理任务中的应用
- Manhattan-SDF:多视角图像三维重建方法(CVPR 2022)
- 崩溃的win10文件夹右键卡死解决方法
- app:processDebugMainManifest FAILED
- 登录功能通用测试用例设计
- Win10 安装驱动 第三方INF需要数字签名 解决办法
- c语言标准库详解(十四):时间函数time.h
- linux 怎样给磁盘命名,在Linux操作系统中磁盘是如何命名的
- pc使用android,如何在电脑上使用Android系统在PC上玩玩Android游戏
- Gradle 环境变量配置