Linux挂载硬盘后端开发
导读:后端开发后端开发 使用虚拟机时发现磁盘空间不够了,需要挂载一个磁盘以供继续使用,但是磁盘不是添加就可以使用的,还需要进行[v_notice]一、添加磁盘[/v_notice]添网站seo优化课程公司网站建设。
使用虚拟机时发现磁盘空间不够了,需要挂载一个磁盘以供继续使用,但是磁盘不是添加就可以使用的,还需要进行
[v_notice]一、添加磁盘[/v_notice]
添加加新硬盘重启服务器
添加完之后就可以重启机器了,如果你机器是开启的,进入系统并不能看见你刚添加的那块磁盘,只有等系统重启,重新加载之后才会显示安装的那块磁盘
[v_notice]二、进入系统[/v_notice]
使用root用户进入系统
[v_notice]三、 查看硬盘信息[/v_notice]
[root@localhost ~]# fdisk -l //磁盘命令 Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c4cb5 Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 2611 20458496 8e Linux LVM Disk /dev/sdb: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd0f5c869 Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux Disk /dev/sdc: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000可以看到这台机器加载了三个磁盘sda、sdb、sdc 其中sda是初始磁盘,sdb已经初始化且经过使用,sdc是刚刚加载的,未格式化的新磁盘
[v_notice]四、创建新硬盘分区[/v_notice]
[root@localhost ~]# fdisk /dev/sdc #进入磁盘 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x45a3cadb. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): m Command action a toggle a bootable flag #设定可启动标记 b edit bsd disklabel c toggle the dos compatibility flag d delete a partition #删除一个分区 l list known partition types #各分区类型所对应的ID m print this menu #菜单 n add a new partition #添加一个分区 o create a new empty DOS partition table p print the partition table #显示该磁盘下的当前分区信息 q quit without saving changes #不保存退出 s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit #保存退出 x extra functionality (experts only)关键词标签: 暂无
声明: 本文由我的SEOUC技术文章主页发布于:2023-05-28 ,文章Linux挂载硬盘后端开发主要讲述暂无网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_11501.html
- 上一篇:linux版本CC发包工具教程后端开发
- 下一篇:自动开通空间的脚本前端开发