申请的虚拟机因总宕机,处理完之后多分配了我100G空间,还是狠讲究的嘛,挂载方法如下:

初始磁盘挂载情况:
[root@wmstest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 19G 9.0G 9.1G 50% /
/dev/sda4 44G 181M 41G 1% /u01
/dev/sda1 99M 22M 73M 23% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm

查看磁盘:
[root@wmstest ~]# fdisk -l
Disk /dev/sda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2563 20482875 83 Linux
/dev/sda3 2564 4603 16386300 82 Linux swap / Solaris
/dev/sda4 4604 10443 46909800 83 Linux
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

用fdisk对磁盘分区:
[root@wmstest ~]# 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 13054.
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): p
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
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-13054, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):
Using default value 13054
Command (m for help): p
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

再次查看磁盘:
[root@wmstest ~]# fdisk -l
Disk /dev/sda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2563 20482875 83 Linux
/dev/sda3 2564 4603 16386300 82 Linux swap / Solaris
/dev/sda4 4604 10443 46909800 83 Linux
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 83 Linux

格式化磁盘:
[root@wmstest ~]# 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)
13107200 inodes, 26214055 blocks
1310702 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
800 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, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

挂载磁盘:
[root@wmstest ~]# mount /dev/sdb1 /u01/

[root@wmstest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 19G 9.0G 9.1G 50% /
/dev/sda4 99G 188M 94G 1% /u01
/dev/sda1 99M 22M 73M 23% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
/dev/sdb1 99G 188M 94G 1% /u01

设置开机自动挂载:
[root@wmstest ~]# vi /etc/fstab
/dev/sdb1 /u01 ext3 defaults 0 0

Linux 挂载存储方法的更多相关文章

  1. Oracle Linux 挂载存储

    #启动多路径multipathd服务 service multipathd restart #设置开机自动启动multipathd服务 chkconfig multipathd on #查看信息mul ...

  2. linux 挂载存储步骤(以emc 5300为例)

    挂载存储有两种方式:光纤模式(hub卡)和iscsi (以太网).两者大体思路是一样的. 1.在应用服务器上安装hub卡,连接光纤到光纤交换机上: 2.在应用服务器安装hub卡驱动程序: 3.在存储上 ...

  3. Linux挂载存储(供应商给的资料)

    infofile iqn.1994-05.com.redhat:16a2b8b7d8 infodb iqn.1994-05.com.redhat:8518efa2fe72 在iscsi server上 ...

  4. 截取linux文件存储路径方法

    1.截取linux文件存储路径方法 package com.tydic.eshop.action.freemarker; public class dddd { public static void ...

  5. Linux 挂载Windows共享文件夹和NAS存储

    summary: [Linux 挂载共享存储] 概述 将Windows共享文件夹和NAS存储挂载至Linux. Linux系统环境:CentOS 挂载共享存储 查看外部主机共享了哪些目录 smbcli ...

  6. linux 挂载(转载)

    From:http://forum.ubuntu.org.cn/viewtopic.php?t=257333 用linux,就一定要用linux的方式去思维.嗯,说的容易做起来难.我的D盘哪去了?恐怕 ...

  7. linux挂载U盘(转载)

    一.Linux挂载U盘:1.插入u盘到计算机,如果目前只插入了一个u盘而且你的硬盘不是scsi的硬盘接口的话,那它的硬件名称为:sda1.2.在mnt目录下先建立一个usb的目录(如:[root@lo ...

  8. Win7激活后添加grub引导Linux最简单方法

    因为Win7(Vista同理)的激活方式是通过grub摸你OEM的Slic信息,所以主引导分区MBR被这个grub占用,以此才能激活WIn7.但是如果想同时安装Linux在别的分区,就会产生问题:gr ...

  9. linux挂载本地windows分区或目录

    linux挂载本地windows分区或目录 一.linux挂载本地windows硬盘分区 向虚拟机Centos添加本地windows硬盘 注:(添加物理硬盘后,在centos操作会直接写入本地硬盘) ...

随机推荐

  1. windows更新npm

    今天遇到一个项目需要更新npm的版本,搜了一下如何更新npm的方法,有的人说直接重装node,npm版本就会是最新的,真是无力吐槽,要是每次更新都得这么麻烦还得了,我觉得一定有更好更简单的方法,最后果 ...

  2. 【WinAPI】Windows Message 枚举常量收集

    namespace WindowsUtilities { public enum WindowsMessages : int { WM_NULL = 0x0000, WM_CREATE = 0x000 ...

  3. mysql优化方法

    1.选取最适用的字段属性 MySQL可以很好的支持大数据量的存取,但是一般说来,数据库中的表越小,在它上面执行的查询也就会越快.因此,在创建表的时候,为了获得更好的性能,我们可以将表中字段的宽度设得尽 ...

  4. jQuery的deferred对象详解(一)

    最近一段时间,都在研究jquery里面的$.Deffered对象,几天都搞不明白,其中源码的运行机制,网上查找了相关的资料,<jQuery的deferred对象详解>阮一峰老师的文章,里面 ...

  5. 剑指Offer09 数值的整数次方

    /************************************************************************* > File Name: 09_Power. ...

  6. Java多线程之锁

    首先是synchronized 关键字 他可以用于声明方法,也可以用于申明代码块.我们看看三个例子: public class SynchronizedDemo1 { public synchroni ...

  7. 使用ambari搭建Hadoop平台

    1.操作系统 CentoOS Server with GUI(有GUI,有浏览器*ambari基于浏览器*推荐latest stable version)2.分区 默认 + /hadoop3.网络设置 ...

  8. 【转载】Hadoop可视化分析利器之Hue

    http://qindongliang.iteye.com/blog/2212619 先来看下hue的架构图:  (1)Hue是什么? Hue是一个可快速开发和调试Hadoop生态系统各种应用的一个基 ...

  9. php读取mysql中文数据出现乱码

    1.PHP页面语言本身的编码类型不合适,这时候,你直接在脚本中写的中文肯定是乱码,不用说数据库了:    解决方法:选择'UTF8'或者'gb2312',这样客户浏览器会自动选择并出现正确的中文显示. ...

  10. 20150221—LINQ to SQL 查询数据

    LINQ to SQL 可以快捷的查询基于SQL的数据,直接在VS中包括基本的Object/relation映射器,O/R映射器可以快速的将基于SQL的数据源映射为CLR对象,之后就可以使用LINQ查 ...