怎么删除linux分区

怎么删除linux分区,第1张

删除linux分区,用到的工具:xshell,步骤如下:

登录linux服务器,执行以下命令

fdisk -l

输出以下信息:

Disk /dev/vda: 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: 0x000c1d0e

   Device Boot      Start         End      Blocks   Id  System

/dev/vda1   *        2048    61442047    30720000   83  Linux

Disk /dev/vdb: 75.2 GB, 75161927680 bytes, 146800640 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: 0x000cc312

   Device Boot      Start         End      Blocks   Id  System

/dev/vdb1            2048   146800639    73399296   83  Linux

说明:测试服务器有两个分区,vda1和vdb1。

效果图:

2.删除vdb1分区,执行以下命令:

fdisk /dev/vdb1

接着输入:

d

然后选择分区号

最后输入w保存。

注意事项:删除分区前备份数据。

umount /home && umount /b  && umount /www

mkfs.ext3 /dev/vdb1

然后编辑/etc/fstab,删除/修改相关挂载记录,保存。

重新挂载fstab记录:

mount -a


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/8262336.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-14
下一篇2023-04-14

发表评论

登录后才能评论

评论列表(0条)

    保存