[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 36G .3G 32G % /
tmpfs 15G 15G % /dev/shm
[root@localhost ~]# fdisk -l Disk /dev/xvda: 42.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x00014faa Device Boot Start End Blocks Id System
/dev/xvda1 Linux swap / Solaris
Partition does not end on cylinder boundary.
/dev/xvda2 * Linux Disk /dev/xvde: 493.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x00000000 [root@localhost ~]# fdisk /dev/xvde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb28f7207.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u'). Command (m for help): p^H Disk /dev/xvde: 493.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xb28f7207 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 (-)
p
Partition number (-):
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ):
Using default value Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/xvda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
[root@localhost ~]# fdisk -l Disk /dev/xvda: 42.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x00014faa Device Boot Start End Blocks Id System
/dev/xvda1 Linux swap / Solaris
Partition does not end on cylinder boundary.
/dev/xvda2 * Linux Disk /dev/xvde: 493.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xb28f7207 Device Boot Start End Blocks Id System
/dev/xvde1 Linux
[root@localhost ~]# mkfs.ext3 /dev/xvde1
mke2fs 1.41. (-May-)
Filesystem label=
OS type: Linux
Block size= (log=)
Fragment size= (log=)
Stride= blocks, Stripe width= blocks
inodes, blocks
blocks (5.00%) reserved for the super user
First data block=
Maximum filesystem blocks=
block groups
blocks per group, fragments per group
inodes per group
Superblock backups stored on blocks:
, , , , , , , , ,
, , , , , , , Writing inode tables: done
Creating journal ( blocks): done
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every mounts or
days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# fdisk -l Disk /dev/xvda: 42.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x00014faa Device Boot Start End Blocks Id System
/dev/xvda1 Linux swap / Solaris
Partition does not end on cylinder boundary.
/dev/xvda2 * Linux Disk /dev/xvde: 493.9 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0xb28f7207 Device Boot Start End Blocks Id System
/dev/xvde1 Linux
[root@localhost ~]# vim /etc/fstab
[root@localhost ~]# cat /etc/fstab #
# /etc/fstab
# Created by anaconda on Tue Mar ::
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(), findfs(), mount() and/or blkid() for more info
#
UUID=5056bbc2-cf00-4f7c-95e1-35be323fc523 / ext3 defaults
UUID=c2a7b4a1-c806-46e5-a97d-b9a964fc9e05 swap swap defaults
tmpfs /dev/shm tmpfs defaults
devpts /dev/pts devpts gid=,mode=
sysfs /sys sysfs defaults
proc /proc proc defaults
/dev/xvde1 /opt/ ext3 defaults
[root@localhost ~]# mount -a
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 36G .3G 32G % /
tmpfs 15G 15G % /dev/shm
/dev/xvde1 453G 199M 430G % /opt

linux挂载分区的更多相关文章

  1. linux 挂载(转载)

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

  2. LINUX磁盘分区、格式化、挂载、卸载全程详解

    1.一切皆文件 Linux系统有一个理念:“一切皆文件”,所以计算机的硬件在linux中也是以“文件”的形式存在于/dev目录中.   图为CentOS 6.5系统中/dev目录的部分内容.不同的计算 ...

  3. linux 硬盘分区,分区,删除分区,格式化,挂载,卸载笔记

    linux 虽然一直都有在玩,但是对硬盘操作确实不是很熟悉今天有空,就整理了下. 1, 创建分区 先查看下是否有磁盘没有分区 fdisk -l 其中第一个框和第二个框,是已经分好区的磁盘,第三个硬盘没 ...

  4. linux硬盘分区格式化及挂载

    1.硬盘的接口类型 硬盘的接口一般分为两种,一种是IDE并行接口,一种是SATA串行接口, 在linux上面IDE接口的硬盘被识别为/dev/hd[a-z]这样的设备,其中hdc表示光驱设备,这是因为 ...

  5. Linux常见设备及相应/dev/xxx文件名、Mount Point、挂载点、Mount命令、fstab、挂载分区

    Linux 中的设备有2种类型:字符设备(无缓冲且只能顺序存取).块设备(有缓冲且可以随机存取).这些设备中,有些设备是对实际存在的物理硬件的抽象,而有些设备则是内核自身提供的功能(不依赖于特定的物理 ...

  6. Linux 硬盘分区、分区、删除分区、格式化、挂载、卸载

    Linux 虽然一直都有在玩,但是对硬盘操作确实不是很熟悉今天有空,就整理了下. 1,创建分区 先查看下是否有磁盘没有分区 fdisk -l 其中第一个框和第二个框,是已经分好区的磁盘,第三个硬盘没有 ...

  7. [转]Linux挂载点介绍及桌面服务器分区方案

    原链接:http://www.metsky.com/archives/255.html 本文介绍Linux常用分区挂载点常识以及桌面.服务器分区挂载点的推荐配置,当然这个配置是天缘自己写的,分区大小这 ...

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

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

  9. Linux系统格式化新磁盘并挂载分区

    Linux系统格式化新磁盘并挂载分区 在虚拟机的设置界面中,我们可以选择添加硬盘 添加好硬盘后,我们输入命令fdisk -l 看到有一个未经分区的硬盘 Fdisk命令编辑这个硬盘 输入n创建分区,p选 ...

随机推荐

  1. 深度解析javascript中的浅复制和深复制

    原文:深度解析javascript中的浅复制和深复制 在谈javascript的浅复制和深复制之前,我们有必要在来讨论下js的数据类型.我们都知道有Number,Boolean,String,Null ...

  2. 汉字转整数,比系统简单易用!a2iLxx (覆盖物 16十六进制,VC6亲测可用)请提供意见~

    #include "string.h" #define INVALID_VALUE_LXX ((1 << (8 * sizeof(int) -1)) - 1) /*有符 ...

  3. RPC框架

    RPC框架实现 - 路由控制篇 2015-04-27 22:26 by bangerlee, 499 阅读, 1 评论, 收藏, 编辑 RPC(Remote Procedure Call,远程过程调用 ...

  4. 【高德地图API】一句话搞定webmap(一)——轻地图组件

    原文:[高德地图API]一句话搞定webmap(一)——轻地图组件 摘要: 遥想当年,在APP中加入LBS元素相当困难:要刻苦学习java,要刻苦学习iOS开发,要刻苦学习javascript…… 而 ...

  5. java中IO写文件工具类

    以下是一些依据经常使用java类进行组装的对文件进行操作的类,平时,我更喜欢使用Jodd.io中提供的一些对文件的操作类,里面的方法写的简单易懂. 当中jodd中提供的JavaUtil类中提供的方法足 ...

  6. c# 文件同步服务器,iis 集群 ,代码同步(二)

    打算自己做一个 集群 代码同步软件. 基于Socket 和 FileSystemWatcher .

  7. style中position的属性值具体解释

    Position的英文原意是指位置.职位.状态.也有安置的意思.在CSS布局中,Position发挥着非常关键的数据,非常多容器的定位是用Position来完毕. Position属性有四个可选值,它 ...

  8. 基于OCR的SeeTest框架可行性分析总结

    总的来说相比其他几个免费框架,SeeTest功能更全面和易用,但收费有点昂贵:License 3500/年:多平台和多语言(基于OCR)还需要额外购买,分别是500/Year和1750$/.详情请查看 ...

  9. 调试经验--硬盘U菜

    调试经验--硬盘U菜 随着嵌入式设备功能的开发,随着对存储设备的需求:需要存储大量数据信息.需要在转储数据,U盘升级功能等.     在使用存储设备的过程中,我们遇到一些问题,也总结了些经验: 1.几 ...

  10. 【android】WebView缓存数据收集

    Android WebView 缓存 Android高手进阶教程(二十四)之---Android WebView的缓存!!! Android webView 缓存 Cache + HTML5离线功能 ...