ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 操作系统 >> Linuxjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播 >> 调整Linux磁盘分区 Linux 磁盘自检介绍

调整Linux磁盘分区 Linux 磁盘自检介绍(6/6)

来源:网络整理     时间:2016-07-04     关键词:调整Linux磁盘分区

本篇文章主要介绍了"调整Linux磁盘分区 Linux 磁盘自检介绍",主要涉及到调整Linux磁盘分区方面的内容,对于Linuxjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播感兴趣的同学可以参考一下: 在Linux系统中,有时候重启会耗费非常长的时间,如果你进一步检查细节,就会发现绝大部分时间都耗费在磁盘自检(fsck)上了,有时候遇到时间比较紧急的情...

关于这两者的优先级,我测试过,即使已经满足了Maximum mount count和Check interval里面的条件,如果在/etc/fstab里面关闭了磁盘自检,那么在重启时,并不会做磁盘自检,也就是说/etc/fstab设置里面的优先级要高一些。

 

3:使用参数-f 跳过自检

[root@DB-Server ~]# shutdown -rf now

这种方式是临时的,不需要修改系统配置。

 

 

4:在/boot/grub/grub.conf 中添加fastboot,如下所示

[root@DB-Server /]# cd /boot
[root@DB-Server boot]# ls
config-2.6.18-274.el5  grub  initrd-2.6.18-274.el5.img  lost+found  symvers-2.6.18-274.el5.gz  System.map-2.6.18-274.el5  vmlinuz-2.6.18-274.el5
[root@DB-Server boot]# cd grub/
[root@DB-Server grub]# ls
device.map     fat_stage1_5  grub.conf         jfs_stage1_5  minix_stage1_5     splash.xpm.gz  stage2         vstafs_stage1_5
e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage1         ufs2_stage1_5  xfs_stage1_5
[root@DB-Server grub]# more grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-274.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-274.el5 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.18-274.el5.img  fastboot
You have new mail in /var/spool/mail/root
[root@DB-Server grub]# 

 

    kernel /vmlinuz-2.6.18-274.el5 ro root=LABEL=/ rhgb quiet

    initrd /initrd-2.6.18-274.el5.img fastboot

 

 

 

如何强制下次重启磁盘自检?

 

如何强制系统下次root时,进行磁盘自检?

 

方法1: 使用tune2fs调整Maximum mount count和Check interval的值,使其下次重启时满足磁盘自检。

 

方法2:关于这个,在RHEL中,你可以在/etc/rc.sysinit 中看到如下代码(Debian or Ubuntu Linux下查看/etc/init.d/checkfs.sh)如下所示:

所以,你只需要创建一个forcefsck文件,下次重启时,就能强制其进行磁盘自检。

[root@DB-Server /]#  touch /forcefsck
[root@DB-Server /]# reboot
 
Broadcast message from root (pts/1) (Mon Jul  4 14:33:59 2016):
 
The system is going down for reboot NOW!

 

重启过程中,你就会看到磁盘自检。重启后,你会发现刚才生成的forcefsck文件已经不见了。

 

 

方法3:使用shutdown相关参数强制磁盘自检

[root@DB-Server /]# man shutdown

# shutdown -rF now

 

参考资料:

http://www.pc-freak.net/blog/changing-setting-33-times-standard-fsck-file-system-check-debian-linux-desktop-systems/

http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/

www.cyberciti.biz/faq/linux-unix-bypassing-fsck/

以上就介绍了调整Linux磁盘分区 Linux 磁盘自检介绍,包括了调整Linux磁盘分区方面的内容,希望对Linuxjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播有兴趣的朋友有所帮助。

本文网址链接:http://www.codes51.com/article/detail_2274700_6.html

调整Linux磁盘分区相关图片

调整Linux磁盘分区相关文章