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选 ...
随机推荐
- CSharp设计模式读书笔记(19):备忘录模式(学习难度:★★☆☆☆,使用频率:★★☆☆☆)
备忘录模式(Memento Pattern):在不破坏封装的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态,这样可以在以后将对象恢复到原先保存的状态.它是一种对象行为型模式,其别名为Tok ...
- Team City的安装1
持续集成工具 Team City的安装 前两个月很大一部分精力投入在做部门的持续集成,从概念的了解和工具的选型,再到安装,部署,操作,到最后的真实项目持续集成应用的上线,写了一份手册,包括安装,配置, ...
- 【百度地图API】暑假放假回老家——城市切换功能
原文:[百度地图API]暑假放假回老家--城市切换功能 任务描述: 酸奶小妹放寒假啦,要从北京呼啦一下飞回重庆呢.现在百度地图API上不能直接切换城市,怎么办呢? 如何实现: 利用API先搜索到要去城 ...
- Android_开发人员经常使用的颜色
Android开发中经常要用一些个性化的颜色,然而茫茫的RBG颜色对比表,往往给人眼花缭乱的感觉,更别说从中轻易选出一两种比較惬意的颜色,以下我就总结一下开发中经常使用到的比較绚丽的颜色. 以下是经常 ...
- POJ3342——Party at Hali-Bula
Party at Hali-Bula Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 5418 Accepted: 192 ...
- .net EF 事物 订单流水号的生成 (二):观察者模式、事物、EF
针对.net EF 事物 订单流水号的生成 (一) 的封装. 数据依然不变. using System; using System.Linq; using System.Transactions; ...
- XML的序列化与反序列化
开发时会把数据持久化成xml格式,当然可以用xmlwriter来实现,不过感觉不方便,而且很繁琐.推荐使用直接序列化.反序列化对象的方法来处理. 直接上代码: public static class ...
- android 删除SD卡或手机的缓存图像和文件夹
public static final String TEMP_PHOTO_FILE_NAME = "temp_photo.jpg"; private static String ...
- 安装SQL Server 2005 - 初学者系列 - 学习者系列文章
初学者阶段,建议从数据库为基础入手进行学习. 下面介绍微软的SQL Server 2005数据库的安装. 首先,从下列地址获取SQL Server 2005的安装程序. ed2k://|file|cs ...
- solrnet的使用
solr与.net系列课程(五)solrnet的使用 solr与.net系列课程(五)solrnet的使用 最近因项目比较忙,所以这篇文章出的比较晚,离上一篇文章已经有半个月的时间了,这节课我们 ...