装载:

1、启动vm,选择vm->Settings,按向导添加一块SCSI磁盘。进入Linux系统。

2、 fdisk -l 会看到有一块新的设置,如果你先前有一块硬盘(sda1, sda3...),新加的这块应该是(/dev/sdb)。

[root@localhost ~]# fdisk -l
 
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = 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  Linux
 
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdb doesn't contain a valid partition table

3、分区:

[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't 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): 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
   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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 
Using default value 1044
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
 
 

[root@localhost ~]# fdisk -l
 
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = 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  Linux
 
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1044     8385898+  83  Linux

4、格式化:

[root@localhost ~]# mkfs -t ext3  /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1048576 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
 
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

5、装载:

[root@localhost ~]# mount /dev/sdb1 /u01/app/oracle
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      6.7G  5.8G  576M  92% /
/dev/sda1              99M   12M   82M  13% /boot
tmpfs                 233M     0  233M   0% /dev/shm
/dev/sdb1             7.9G  147M  7.4G   2% /u01/app/oracle

6、编辑fstab文件(不然重启电脑后系统将不会保存之前的挂载操作):

[root@localhost ~]# vi /etc/fstab
 
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /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 software

卸载:

[root@localhost ~]# umount /dev/sdb1
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      6.7G  5.8G  576M  92% /
/dev/sda1              99M   12M   82M  13% /boot
tmpfs                 233M     0  233M   0% /dev/shm

【Vegas原创】VMWare下,Linux挂载、卸载新硬盘的方法相关推荐

  1. VMware虚拟机中,RHEL系统下挂载、卸载新硬盘的方法

    1.增加硬盘 启动vm,选择vm->Settings,按向导添加一块SCSI磁盘. 2.检测新硬盘 启动进入Linux系统.fdisk -l 会看到有一块新的硬盘设置,如果你先前有一块硬盘(sd ...

  2. 【转】VMWare虚拟机linux访问windows主机硬盘文件方法

    转自http://dog0boy.blog.163.com/blog/static/41173408200772134353194/ 安装vmware-tools      为了更好的解决虚拟机与主机 ...

  3. linux查看所有磁盘信息fdisk,Linux下添加新硬盘,分区及挂载 挂载好新硬盘后输入fdisk -l命令看当前磁盘信息 可以看...

    挂载好新硬盘后输入fdisk -l命令看当前磁盘信息 可以看到除了当前的第一块硬盘外还有一块sdb的第二块硬盘,然后用fdisk /dev/sdb 进行分区 进入fdisk命令,输入h可以看到该命令的 ...

  4. linux系统下添加新硬盘的方法详解

    对于linux新手来说,在linux上添加新硬盘,是很有挑战性的一项工作. 在Linux服务器上把硬盘接好,启动linux,以root登陆. fdisk -l ## 这里是查看目前系统上有几块硬盘 D ...

  5. 在LINUX-DEBIAN系统下挂载新硬盘的方法

    LINUX-DEBIAN系统下挂载新硬盘的方法. 总共六个部分,一起来看看吧,非常简单的. 一.fdisk -l 查看硬盘的使用情况,也就是哪些硬盘没有挂载 下面显示的,三块硬盘,其中二和三是没有挂载 ...

  6. linux 怎么把新硬盘分区,linux添加新硬盘分区

    一.添加硬盘 1.选择"VM"----"setting"并打开,将光标定位在hard Disk这一选项,然后点击下方的Add按钮 2.点击next,执行下一个步 ...

  7. Linux 添加一块新硬盘

    给Linux添加一块新硬盘可以分为5个步骤 虚拟机添加硬盘 分区 格式化 挂载 设置自动挂载(即永久挂载) 一.虚拟机添加硬盘: 在开始操作之前首先应该在虚拟机(以vm12为例)手动添加硬盘,操作如图 ...

  8. linux 挂载以及初始化硬盘

    linux 挂载以及初始化硬盘 简述 过多的赘述就不说了,一般使用linux完成一些像iscsi服务存储配置啥的,都需要用到硬盘的挂载来扩充服务器的存储空间,这里就简简单单给大家讲一下linux如何挂 ...

  9. windows 7下如何卸载重装mysql 压缩包版百度经验_windows下安装、卸载mysql服务的方法(mysql 5.6 zip解压...

    MySQL是一个小巧玲珑但功能强大的数据库,目前十分流行.但是官网给出的安装包有两种格式,一个是msi格式,一个是zip格式的.很多人下了zip格式的解压发现没有setup.exe,面对一堆文件一头雾 ...

  10. linux服务器插上硬盘不能开机,Linux服务器添加新硬盘无法识别解决方法(无需重启)...

    Linux服务器添加新硬盘无法识别解决方法(无需重启) 发布时间:2018-08-24 19:45, 浏览次数:711 , 标签: Linux 前言 一般来说,当我们在服务上插入新的磁盘时,服务器是会 ...

最新文章

  1. kafka偏移量保存到mysql里_SparkStreaming+kafka保存offset的偏移量到mysql案例
  2. 【安全研究】从mimikatz学习万能密码——上
  3. 网易智慧企业2020年度见面会4大亮点抢先看!
  4. MFC绘制动态曲线,用双缓冲绘图技术防闪烁
  5. Access 利用模版实现条码打印功能
  6. 63.ExtJs事件(自定义事件、on、eventManager)示例
  7. 智能优化算法:蜜獾算法-附代码
  8. mid、mif文件操作工具类
  9. 版本管理工具Git记录
  10. 计算机病毒主要是通过什么传播,计算机病毒主要是通过什么传播
  11. Word控件Spire.Doc 转换教程(二十一):将非标准字体的word文档转换为PDF
  12. 用js实现一个自动阅读的代码
  13. 围棋规则的计算机实现
  14. imgaug quokka_Quokka CMS的新功能和Beta版路线图
  15. Oracle数据库查询十个小技巧
  16. 在内网使用DBL落地网关,连接公网的freeswitch
  17. 车截导航显示服务器错误怎么办,车载导航常见故障
  18. HTML给SELECT标签赋值
  19. 【神经网络】人工神经网络学习方法
  20. MySQL 亿级数据的迁移、清洗、与审计分析

热门文章

  1. Codeforces 853A 贪心 优先队列
  2. mysql datetime设置now()无效,直接用程序设置默认值比较好
  3. ubuntu无法连接网络
  4. Unity3D脚印6——模型动画
  5. 程序员心髓:移动应用API设计10大技巧
  6. 支持多浏览器的js拖拽 (转domkey0303 的blog)
  7. Oracle Sql关于case-when,if-then,decode
  8. GDB调试字符数组时指针和数组区别的体现
  9. RabbitMQ三种Exchange
  10. AD——修改域用户的密码