blockdev --getra /dev/sda

blockdev --setra 2048 /dev/sda

必须将其写入配置文件/etc/rc.local,否则重启就会失效。
[root@localhost ~]# echo '/sbin/blockdev --setra 2048 /dev/sda' >> /etc/rc.local
[root@localhost ~]# more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 
touch /var/lock/subsys/local
/sbin/blockdev --setra 2048 /dev/sda
[root@localhost ~]# echo '/sbin/blockdev --setra 2048 /dev/sdb' >> /etc/rc.local
[root@localhost ~]# more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 
touch /var/lock/subsys/local
/sbin/blockdev --setra 2048 /dev/sda
/sbin/blockdev --setra 2048 /dev/sdb

最新文章

  1. OSG消息机制之消息分析
  2. awk匹配
  3. 用Yaml文件进行元素管理【转】
  4. Flex 页面空白或Error #2032
  5. node相关的精典材料
  6. 如何在Swing窗体增删组件后及时刷新显示新界面
  7. Nginx状态监控
  8. 炮兵阵地(POJ 1185状压dp)
  9. CentOS源码安装搭建LNMP全过程(包括nginx,mysql,php,svn)【转】
  10. 解读CSS文本(text)样式
  11. css案例学习之按钮超链接
  12. android 自定义百度地图放大缩小
  13. 简单字符串处理 hdu2532 Engine
  14. javascript this的一些误解
  15. 树状数组-HDU1541-Stars一维树状数组 POJ1195-Mobile phones-二维树状数组
  16. python之验证码识别 特征向量提取和余弦相似性比较
  17. 图解HTTP第十章
  18. Java内存分配机制
  19. HttpURLConnection如何添加请求头?
  20. hive 排序和聚集

热门文章

  1. AtCoder Beginner Contest 052
  2. oracle数据库之分组查询(转)
  3. 渲染路径-Unity5 的新旧推迟渲染Deferred Lighting Rendering Path
  4. HyperLedger Fabric 多机部署(一)
  5. ORM应用
  6. 字符串split函数
  7. 在双系统(Win7和Ubuntu Kylin)中卸载Ubuntu
  8. 前端CSS(2)
  9. Hive_Hive的数据模型_外部表
  10. 2、linux基础知识与技能