LUN挂载到Linux主机后,如何对磁盘进行分区

LUN挂载到Linux主机后,如何对磁盘进行分区,第1张

fdisk 命令创建、修改或删除块设备上的分区

1、列出磁盘分区 fdisk -l dev/sda

2、启动fdiskknoppix@Microknoppix:~$ su -root@Microknoppix:~# fdisk /dev/sda The number of cylinders for this disk is set to 121601.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): 3、fdisk帮助Command (m for help): mCommand 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 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) Command (m for help): 4、显示现有分区列表Command (m for help): p Disk /dev/sda: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0x000de20fDevice Boot Start End Blocks Id System/dev/sda1 * 19111731840767 HPFS/NTFS/dev/sda296349730 779152+ 83 Linux/dev/sda39731 116679 859067842+ 5 Extended/dev/sda59731 2091789859546 83 Linux/dev/sda6 20918 39644 150424596 83 Linux/dev/sda7 39645 53905 114551451 83 Linux Command (m for help): 5、创建一个分区Command (m for help): nCommand action l logical (5 or over) p primary partition (1-4)pSelected partition 4First cylinder (9112-121601, default 9112):Using default value 9112Last cylinder, +cylinders or +size{K,M,G} (9112-9633, default 9633): +521 Command (m for help): p Disk /dev/sda: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0x000de20fDevice Boot Start End Blocks Id System/dev/sda1 * 19111731840767 HPFS/NTFS/dev/sda296349730 779152+ 83 Linux/dev/sda39731 116679 859067842+ 5 Extended/dev/sda491129633 4192965 83 Linux/dev/sda59731 2091789859546 83 Linux/dev/sda6 20918 39644 150424596 83 Linux/dev/sda7 39645 53905 114551451 83 Linux Partition table entries are not in disk order Command (m for help):

1、使用root用户登录到Linux系统。

2、右键点击计算机桌面空白处,点击“Open Teminal”,打开命令终端。

3、输入 fdisk -l 命令,查看当前系统的磁盘分区。

4、打开VMware管理客户端,右键点击要添加硬盘的虚拟机,点击“编辑设置”,编辑虚拟机的设置。

5、在虚拟机属性界面,点击“添加”—“硬盘”,添加一个新的硬盘。

6、等待虚拟机配置完成即可。


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

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

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

发表评论

登录后才能评论

评论列表(0条)

    保存