VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法.doc_第1页
VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法.doc_第2页
VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法.doc_第3页
VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法.doc_第4页
VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

VMware虚拟机中,Linux系统下挂载、卸载新硬盘的方法 装载:1、启动vm,选择vm-Settings,按向导添加一块SCSI磁盘。进入Linux系统。2、 fdisk -l 会看到有一块新的设置,如果你先前有一块硬盘(sda1, sda3.),新加的这块应该是(/dev/sdb)。 rootlocalhost # fdisk -lDisk /dev/sda: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda3 14 1044 8281507+ 83 LinuxDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesnt contain a valid partition table 3、分区: rootlocalhost # fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent wont be recoverable.The number of cylinders for this disk is set to 1044.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)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)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 partitions 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): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-1044, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): Using default value 1044Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.rootlocalhost # fdisk -lDisk /dev/sda: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda3 14 1044 8281507+ 83 LinuxDisk /dev/sdb: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 1 1044 8385898+ 83 Linux 4、格式化: rootlocalhost # mkfs -t ext3 /dev/sdb1mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)1048576 inodes, 2096474 blocks104823 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=214748364864 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 31 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override. 5、装载: rootlocalhost # mount /dev/sdb1 /u01/app/oraclerootlocalhost # df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol00 6.7G 5.8G 576M 92% /dev/sda1 99M 12M 82M 13% /boottmpfs 233M 0 233M 0% /dev/shm/dev/sdb1 7.9G 147M 7.4G 2% /u01/app/oracle 6、编辑fstab文件(不然重启电脑后系统将不会保存之前的挂载操作):rootlocalhost # vi /etc/fstab/dev/VolGroup00/LogVol00 / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2devpts /dev/pts devpts gid=5,mode=620 0 0tmpfs /dev/shm tmpfs defaults 0 0proc /proc proc defaults 0 0sysfs /sys sysfs defaults 0 0/dev/VolGroup00/LogVol01 swap swap defaults 0 0/dev/sdc1 /u03 ext3 defaults 1 1/dev/sdb1 /u01/app/oracle ext3 defaults 1 1# Beginning of the block added by the VMware software.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0# End of the block added by the VMware so

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论