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选 ...
随机推荐
- xml:Invalid byte 2 of 2-byte UTF-8 sequence
xml解析错误:Invalid byte 2 of 2-byte UTF-8 sequence 在做接口解析时候出现的错误:Invalid byte 2 of 2-byte UTF-8 sequenc ...
- HDU 4932 Miaomiao's Geometry(推理)
HDU 4932 Miaomiao's Geometry pid=4932" target="_blank" style="">题目链接 题意: ...
- ASP.NET MVC上传文件----uploadify的使用
课程设计需要实现上传文件模块,本来ASP.NET是有内置的控件,但是ASP.NET MVC没有,所以就有两种方法:自定义和采用第三方插件.由于时间的关系,故采用第三方插件:uploadify. upl ...
- 将图片转为ASCII字符画
原文:将图片转为ASCII字符画 Copyright 2012 Conmajia 源代码下载:点击这里 什么是字符画?就是用ASCII字符来近似组成图像,就像这样: ╭╮ ╭╮ ││ ││ ╭┴┴—— ...
- android屏蔽home键的实现
Android中,网上很多屏蔽Home键都智能在4.0以下运行,在4.0以及以上运行直接崩溃. 需要这样更改(来源:http://androidmaster.iteye.com/): @Overrid ...
- ASP.Net MVC请求处理流程
ASP.Net MVC请求处理流程 好听的歌 我一直觉得看一篇文章再听一首好听的歌,真是种享受.于是,我在这里嵌入一首好听的歌,当然你觉得不想听的话可以点击停止,歌曲 from 王菲 <梦中人& ...
- 从.net复制源代码中国农历阵列,必要做日历
从.net复制源代码中国农历阵列,必要做日历 const { 闰月的月份.春节的阳历日期(农历正月初一).农历的每一个月天数 } c_arrLunarInfo: array [1900 .. 2100 ...
- 了解ASP.NET 5
通过3个Hello World应用来了解ASP.NET 5应用是如何运行的(1) 微软在开发ASP.NET 5(当时被称为ASP.NET vNext)是采用的代号为Project K,所以运行时被称为 ...
- C# 关闭子线程的方法
将子线程设定为IsBackGroud = true,程序关闭则自动死亡. 暴力手段:System.Environment.Exit(0).关闭时直接x掉所有线程. 子线程自行结束:子线程中自己判断.可 ...
- Asterisk 未来之路3.0_0002
原文:Asterisk 未来之路3.0_0002 伟大的变化需要可扩展性技术 每一个现有的PBX都因为其自身的缺点变的糟糕,不管其功能如何丰富,总有一些东西会漏掉.具备非常完全功能的PBX 也不能预见 ...