广州海珠网站开发设计,做网站一天打多少个电话,网站友情链接怎么设置,网站建设公众号管理前期准备#xff1a;创建虚拟硬盘1、关闭VM中正在运行的虚拟系统#xff1b;2、在虚拟系统名称上点右键#xff0d;》Virtual Machine Settings#xff1b;3、在Hardware页点“Add”#xff0d;》Add a hard disk#xff0d;》Create a new virtual disk#xff0d;》SC…前期准备创建虚拟硬盘1、关闭VM中正在运行的虚拟系统2、在虚拟系统名称上点右键》Virtual Machine Settings3、在Hardware页点“Add”》Add a hard disk》Create a new virtual disk》SCSI(recommended)》分配空间大小》OK4、可以看见Hardware中出现了一块新的硬盘Hard Disk 2。实施阶段对虚拟硬盘进行分区和格式化1、查看目前系统上有几块硬盘[iyunvcncmail data1]# fdisk -l第一块硬盘信息Disk /dev/sda: 36.4 GB, 36401479680 bytes255 heads, 63 sectors/track, 4425 cylindersUnits cylinders of 16065 * 512 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 1 255 2048256 83 Linux/dev/sda2 256 1530 10241437 83 Linux/dev/sda3 4296 4425 1044225 82 Linux swap/dev/sda4 1531 4295 22209862 f Win95 Extd (LBA)/dev/sda5 1531 2805 10241406 83 Linux/dev/sda6 2806 4295 11968393 83 LinuxPartition table entries are not in disk order第二块硬盘信息Disk /dev/sdb: 36.7 GB, 36703918080 bytes ## 这里发现/dev/sdb容量36.7G切未被分区255 heads, 63 sectors/track, 4462 cylindersUnits cylinders of 16065 * 512 8225280 bytesDisk /dev/sdc doesnt contain a valid partition table第二块硬盘没有分区表[iyunvlinux root]# fdisk /dev/sdb对第二块硬盘进行分区The number of cylinders for this disk is set to 4462.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): mCommand actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd a partitionl 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 partitions system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)Command (m for help): p## 打印出目前该硬盘下的分区列表Disk /dev/sdb: 36.7 GB, 36703918080 bytes255 heads, 63 sectors/track, 4462 cylindersUnits cylinders of 16065 * 512 8225280 bytesDevice Boot Start End Blocks Id SystemCommand (m for help): n## 增加一个分区Command actione extendedp primary partition (1-4)## 因为通常选择主分区所以这里打一个ppPartition number (1-4): 1 ## 这里因为是第一个分却所以只选择1如果是第二个分区则选择2,依次类推First cylinder (1-4462, default 1): ## 新分区起始的磁盘块数Using default value 1Last cylinder or size or sizeM or sizeK (1-4462, default 4462): 如果要分区10G这里可以直接输入10240M因为这里要全部使用硬盘空间则用默认Using default value 4462Command (m for help): pDisk /dev/sdb: 36.7 GB, 36703918080 bytes255 heads, 63 sectors/track, 4462 cylindersUnits cylinders of 16065 * 512 8225280 bytesDevice Boot Start End Blocks Id System/dev/sdb1 1 4462 35840983 83 Linux## 这里第一个分区已经分好了接下去得把这个分区写入硬盘用wCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.下面的工作就是对该硬盘进行格式我这里是格式化成ext3[iyunvlinux root]# mkfs.ext3 /dev/sdb1 (这里原来的命令是mke2fs -j /dev/sdb1试了一下不成 功改了)mke2fs 1.32 (09-Nov-2002)Filesystem labelOS type: LinuxBlock size4096 (log2)Fragment size4096 (log2)4480448 inodes, 8960245 blocks448012 blocks (5.00%) reserved for the super userFirst data block0274 block groups32768 blocks per group, 32768 fragments per group16352 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624Writing inode tables: doneCreating journal (8192 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 23 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.检查一下是否已经格式好[iyunvlinux root]# fdisk -lDisk /dev/sda: 36.4 GB, 36401479680 bytes255 heads, 63 sectors/track, 4425 cylindersUnits cylinders of 16065 * 512 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 1 255 2048256 83 Linux/dev/sda2 256 1530 10241437 83 Linux/dev/sda3 4296 4425 1044225 82 Linux swap/dev/sda4 1531 4295 22209862 f Win95 Extd (LBA)/dev/sda5 1531 2805 10241406 83 Linux/dev/sda6 2806 4295 11968393 83 LinuxPartition table entries are not in disk orderDisk /dev/sdb: 36.7 GB, 36703918080 bytes255 heads, 63 sectors/track, 4462 cylindersUnits cylinders of 16065 * 512 8225280 bytesDevice Boot Start End Blocks Id System/dev/sdb1 1 4462 35840983 83 Linux挂载虚拟硬盘分区分好也格式化好了下面就是挂载我把/dev/sdb1挂载到/data1下[iyunvlinux root]# mkdir /data1 ## 首先建立挂载的目录data1[iyunvlinux root]# mount /dev/sdb1 /data1 ##将sdb1挂载到data1重启系统之后查看是否挂载成功[iyunvlinux data1]# df -h文件系统 容量 已用 可用 已用% 挂载点/dev/sda1 2.0G 454M 1.4G 25% //dev/sda6 12G 53M 11G 1% /bak/dev/sdb1 34G 33M 32G 1% /data1none 250M 0 250M 0% /dev/shm/dev/sda2 9.7G 1.5G 7.7G 17% /usr/dev/sda5 9.7G 8.6G 559M 95% /var这里看到/dev/sda6 12G 53M 11G 1% /bak说明已经挂载成功了。到根目录“/”下可以查看到这个挂载好的data1。