首页 | 资讯动态 | linux基础 | 系统管理 | 网络管理 | 编程开发 | linux数据库 | 服务器技术 | linux相关 | linux认证 | 嵌入式 | 下载中心 | 专题 | linux招聘 | HR | 镜像
OKLinux中文技术站
·设为首页
·加入收藏
·联系我们
系统管理: 中文环境 系统管理 桌面应用 内核技术 | Linux基础: 基础入门 安装配置 常用命令 经验技巧 软件应用 | Linux数据库: Mysql Postgre Oracle DB2 Sybase other
网络管理: 网络安全 网络应用 Linux服务器 环境配置 黑客安全 | 编程开发: PHP CC++ Python Perl Shell 嵌入式开发 java jsp | PHP技术: PHP基础 PHP技巧 PHP应用 PHP文摘
搜索中心 Linux招聘 Linux专题 Apache | Linux相关: 硬件相关 Linux解决方案 Linux认证 企业应用 其它Unix | 相关下载: 资料下载 参考手册 开发工具 服务器类 软路由 其它
 技术搜索:
会员中心 注册会员 高级搜索  
  → 当前位置:首页>网络管理>linux服务器>正文

在Linux上使用raw device方式

http://www.oklinux.cn  2008-03-20  OKLinux   会员收藏  游客收藏  【 】 
您查看的文章来源于http://www.oklinux.cn

在Linux上使用raw device一般有两个方式,下面分别测试一下:

第一种方式是非lvm方式,直接使用partion方式如下:

一,创建分区
[root@localhost ~]# fdisk -l

Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 514048 83 Linux
/dev/sda2 65 1174 8916075 83 Linux
/dev/sda3 1175 1435 2096482 82 Linux swap
/dev/sda4 1436 1566 1052257 5 Extended
/dev/sda5 1436 1566 1052226 83 Linux

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table
[root@localhost oracle]# fdisk /dev/sdb


The number of cylinders for this disk is set to 1044.
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): 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 p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 65
Last cylinder or size or sizeM or sizeK (65-1044, default 1044):
Using default value 1044

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 65 1044 7871850 83 Linux

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 65 1044 7871850 83 Linux

Command (m for help): h
h: unknown command
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): d
Selected partition 1

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
1 p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or size or sizeM or sizeK (1-1044, default 1044): 65

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 65 522081 83 Linux

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (66-1044, default 66):
Using default value 66
Last cylinder or size or sizeM or sizeK (66-1044, default 1044): 130

Command (m for help): n
Command action
e extended
p primary partition (1-4)
3
Invalid partition number for type `3'
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (131-1044, default 131):
Using default value 131
Last cylinder or size or sizeM or sizeK (131-1044, default 1044): 196

Command (m for help): n

共2页: 上一页 1 [2] 下一页

上一篇:Linux服务器中实现文件夹可写不可删除   下一篇:Ubuntu:沿街叫卖的GNU/Linux“报童”

收藏于收藏夹】 【评论】 【推荐】 【打印】 【关闭
相关文档
·Linux服务器中实现文件夹可写不可删除
·Linux下安装Rdesktop远程桌面到Windows XP
·Ubuntu中安装开源项目管理软件Redmine
·Linux系统中redmine自动启动的实现
·Linux虚拟机中的GUI定向到cygwin-X
·Linux下为root用户开启rsh服务
·Linux下应用APT的方式安装LAMP
·Linux平台下实现与windows mobile 5手机的同步
·在Linux AS4上架建QMAIL 反病毒垃圾模块的方法
·在Debian中架设PHP论坛
·Linux下Samba恢复记
·Linux下卸载Mysql、Apache、Php
·Linux自带BIND设定注意事项
·Linux中的SSH终端乱码问题的解决
·Linux环境下Snmp配置帮助学习
·Linux服务器上配置Nginx Mongrel cluster步骤
发表评论
密码: 匿名评论
评论内容:

(不超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规)
 
  最新文档
·利用VSFTP架设Linux环境下的FTP服务器
·Linux下安装Apache 2.2.6 笔记
·Linux下的主要VPN技术
·Linux下Samba服务器搭建实例
·用Sendmail在Linux下架设邮件服务器
·2009服务器盘点:再见Sun 再见麦克利尼
·SUSE 10上做VPN服务器
·在Ubuntu 9.10中打造带tdbsam Backend
·Ubuntu服务器上SSH Server 的安装配置
·Nginx 禁止某个 User_Agent 的方法
·Linux-Apache-MySQL-PHP网站架构方案分
·Nginx 对某些 User_Agent 进行限速的方
  阅读排行
·Linux系统下架设APACHE SVN服务器全过
·Linux下用vsftp轻松搭建FTP服务器(修订
·Ubuntu下安装tftp服务器的步骤
·Linux 下配置vsftp虚拟用户总结
·详解远程SHELL下安装配置RedHat ES 5的
·Linux下安装eclipse与myeclipse
·Linux DNS Server -bind 9.5.0 安装配
·Linux与Linux,Linux与Windows之间使用S
·Ubuntu上搭建SVN服务器全攻略
·LVS集群学习笔记(NAT\DR\IP tunnel)
·Linux下tomcat启动jvm内存设置
·Linux shell 中FTP实现自动下载上传文
·安装大型Linux集群(4):节点安装和 GPFS
·Linux系统下架设PPTP VPN服务器
·Linux系统中下查看内存的方法
网摘收藏: