当前位置: 首页 > news >正文

linux 挂载云盘 NT只能挂载2T,使用parted挂载超过2T云盘

一、删除原来挂载好的云盘和分区

1、查看挂载号的云盘

fdisk -l

发现我们有5千多G但是只挂载了2T,心里非常的慌张!十分的不爽!

好,我们把它干掉,重新分区!

2、解除挂载

umount /homeE

没保存跳转到(7),发现报错

3、查看被挂载的文件被调用情况

fuser -mv /homeE

没报错跳转到(5),发现报错

4、下载依赖

yum install -y psmisc

可能会有点慢,等几分钟。

安装完成!

5、再来查看被挂载的文件被调用情况

fuser -mv /homeE

强制删除调用进程!

kill -9 12828

查询到被调用的全部进程都要删掉!

6、再来解除挂载

umount /homeE

没有提示。

7、删除分区

fdisk /dev/vdd

[root@ecs-87a2-0202396 /]# fdisk /dev/vddWARNING: The size of this disk is 5.5 TB (5497558138880 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): pDisk /dev/vdd: 5497.6 GB, 5497558138880 bytes, 10737418240 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: 0x46a55452Device Boot      Start         End      Blocks   Id  System
/dev/vdd1            2048  4294967294  2147482623+  83  Linux# 删除分区
Command (m for help): d
Selected partition 1
Partition 1 is deletedCommand (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.
# 退出
Command (m for help): quit

大功告成!

二、使用parted挂载(超过2T)云盘

1、查看我们的云盘地址

fdisk -l

可以看到我们云盘的地址是:/dev/vdd

2、挂载云盘

# 进入parted模式
[root@ecs-87a2-0202396 /]# parted /dev/vdd
GNU Parted 3.1
Using /dev/vdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: Virtio Block Device (virtblk)
Disk /dev/vdd: 5498GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number  Start  End  Size  File system  Name  Flags  
# 超过2T的必须使用gpt模式分区                                                 
(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/vdd will be destroyed and all data on this disk will be lost.
Do you want to continue?
# 是否格式化原来的数据
Yes/No? y 
# 开始分区                                                                
(parted) mkpart
# 分区名称
Partition name?  []? vdd1   
# 文件格式,超过2T的盘最好是ext4                                              
File system type?  [ext2]? ext4    
# 开始大小                                       
Start? 0   
# 结束大小,直接复制上面查看到的                                                               
End? 5498GB                                                               
Warning: The resulting partition is not properly aligned for best performance.
# 选择Ignore
Ignore/Cancel? Ignore   
#完成分区,查看分区情况                                                  
(parted) p                                                                
Model: Virtio Block Device (virtblk)
Disk /dev/vdd: 5498GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: Number  Start   End     Size    File system  Name  Flags1      17.4kB  5498GB  5498GB               vdd1
#退出
(parted) quit                                                             
Information: You may need to update /etc/fstab.[root@ecs-87a2-0202396 /]#     

3、挂载文件

#创建文件

mkdir home

#挂载
mount /dev/vdd1 /home

4、查看成功

cd /home

df -h ./

 

完美!

5、设置开机自动分配

vi /etc/fstab

#######################

.......

/dev/vdd1       /home                   ext4    defaults        0 0

http://www.lryc.cn/news/340694.html

相关文章:

  • 用Skimage学习数字图像处理(021):图像特征提取之线检测(下)
  • ArduPilot飞控之Gazebo + SITL + MP的Jetson Orin环境搭建
  • 前端错误监控的方法有哪些
  • ✌粤嵌—2024/3/11—跳跃游戏
  • Docker入门实战教程
  • 数据结构初阶:二叉树(一)
  • 基于逻辑回归和支持向量机的前馈网络进行乳腺癌组织病理学图像分类
  • 35-4 fastjson漏洞复现
  • Qt-控件篇
  • 实现 Table 的增加和删除,不依赖后端数据回显
  • 个人网站开发记录(七)——三系统后端nodejs+express
  • C#入门理解设计模式的6大原则
  • Linux如何切换root用户
  • uniapp小程序编译报错
  • van-uploader 在app内嵌的webview中的一些坑
  • 使用Kotlin进行全栈开发 Ktor+Kotlin/JS
  • 数据结构_带头双向循环链表
  • 常见的垃圾回收器(下)
  • 网桥的原理
  • STM32 CAN过滤器细节
  • 网络编程(现在不重要)
  • 10-菜刀连接木马
  • Unity数据持久化—Json存档
  • 基于SSM的在线学习系统的设计与实现(论文+源码)_kaic
  • 数据库SQL语言实战(二)
  • idea错误地commit后如何处理
  • VRTK(Virtual Reality Toolkit)深入介绍
  • 【LeetCode热题100】【贪心算法】划分字母区间
  • 第二届数据安全大赛暨首届“数信杯”数据安全大赛数据安全积分争夺赛-东区预赛部分WP
  • 如何在Python中使用matplotlib库进行数据可视化?