linux挂载分区
[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挂载分区的更多相关文章
- linux 挂载(转载)
From:http://forum.ubuntu.org.cn/viewtopic.php?t=257333 用linux,就一定要用linux的方式去思维.嗯,说的容易做起来难.我的D盘哪去了?恐怕 ...
- LINUX磁盘分区、格式化、挂载、卸载全程详解
1.一切皆文件 Linux系统有一个理念:“一切皆文件”,所以计算机的硬件在linux中也是以“文件”的形式存在于/dev目录中. 图为CentOS 6.5系统中/dev目录的部分内容.不同的计算 ...
- linux 硬盘分区,分区,删除分区,格式化,挂载,卸载笔记
linux 虽然一直都有在玩,但是对硬盘操作确实不是很熟悉今天有空,就整理了下. 1, 创建分区 先查看下是否有磁盘没有分区 fdisk -l 其中第一个框和第二个框,是已经分好区的磁盘,第三个硬盘没 ...
- linux硬盘分区格式化及挂载
1.硬盘的接口类型 硬盘的接口一般分为两种,一种是IDE并行接口,一种是SATA串行接口, 在linux上面IDE接口的硬盘被识别为/dev/hd[a-z]这样的设备,其中hdc表示光驱设备,这是因为 ...
- Linux常见设备及相应/dev/xxx文件名、Mount Point、挂载点、Mount命令、fstab、挂载分区
Linux 中的设备有2种类型:字符设备(无缓冲且只能顺序存取).块设备(有缓冲且可以随机存取).这些设备中,有些设备是对实际存在的物理硬件的抽象,而有些设备则是内核自身提供的功能(不依赖于特定的物理 ...
- Linux 硬盘分区、分区、删除分区、格式化、挂载、卸载
Linux 虽然一直都有在玩,但是对硬盘操作确实不是很熟悉今天有空,就整理了下. 1,创建分区 先查看下是否有磁盘没有分区 fdisk -l 其中第一个框和第二个框,是已经分好区的磁盘,第三个硬盘没有 ...
- [转]Linux挂载点介绍及桌面服务器分区方案
原链接:http://www.metsky.com/archives/255.html 本文介绍Linux常用分区挂载点常识以及桌面.服务器分区挂载点的推荐配置,当然这个配置是天缘自己写的,分区大小这 ...
- linux挂载本地windows分区或目录
linux挂载本地windows分区或目录 一.linux挂载本地windows硬盘分区 向虚拟机Centos添加本地windows硬盘 注:(添加物理硬盘后,在centos操作会直接写入本地硬盘) ...
- Linux系统格式化新磁盘并挂载分区
Linux系统格式化新磁盘并挂载分区 在虚拟机的设置界面中,我们可以选择添加硬盘 添加好硬盘后,我们输入命令fdisk -l 看到有一个未经分区的硬盘 Fdisk命令编辑这个硬盘 输入n创建分区,p选 ...
随机推荐
- hadoop得知;datajoin;chain署名;combine()
hadoop一种简化机制来管理job和control作业之间的非线性依赖,job对象mapreduce表明. job该目的是通过使实例化jobconf对象的构造函数的工作落实. x.addDeopen ...
- javascript中字符串常用方法总结
字符串是javascript编程中不可或缺的元素,掌握字符串常用的方法也是我们学习过程中的必经之路,下面我们总结一些最常用的的字符串方法. string.charAt(postion) charAt方 ...
- windows+php5.5+apache2.4+tomcat+mod_jk配置
原因: 通常情况下apache执行的是80port,比方apache启动后执行localhost:80就能够出现It works页面,这里的80也能够不写,会默认的.而tomcat启动时默认的port ...
- ssh 自动登录
工作中经常会有这样的需求场景,因为要在其它电脑上做操作, 需要从PC A ssh 到 PC B,PC A 可能是自己的工作机,PC B 可能是服务器.一般会使用 SSH 登录到 server 上再进行 ...
- Android Notification通知详细解释
Android Notification通知具体解释 Notification: (一).简单介绍: 显示在手机状态栏的通知. Notification所代表的是一种具有全局效果的通 ...
- 20款最好的免费的IDES和编辑器
程序员编程利器:20款最好的免费的IDES和编辑器 Posted on 2015-02-17 21:52 尛鱼 阅读(170) 评论(1) 编辑 收藏 程序员编程利器:20款最好的免费的IDEs和编辑 ...
- sql性能
---正在运行的 select a.username, a.sid,b.SQL_TEXT, b.SQL_FULLTEXT from v$session a, v$sqlarea b where a ...
- javascript and dom1
<script type="text/javascript"> //数组 var beatles=Array(4); var beatles=Array(); cons ...
- 空连接ipc$入侵
使用命令 net use url=file://\\IP\ipc$\\IP\ipc$ "" /user:"" 就可以简单地和目标建立一个空连接(需要目标开放ip ...
- Codeforces 17D Notepad 简单的数论
从题意,anw = (b-1)*b^(n-1)%c,强调,为了b^(n-1). 弱渣只能推了宣传. phi(c)为小于c且与c互质的个数. 当x >= phi(c)时:A^x = A(x%ph ...