Linux如何关闭分区journal日志

Linux如何关闭分区journal日志

非根分区

1.查看要修改的分区

#df -h 

2.查看分区journal日志(如/dev/sda1)

#tune2fs -l /dev/sda1 |grep feature 

查看是否有has_journal字段

3.卸载分区

#umount /dev/sda1 

4.修改分区journal日志

#tune2fs -O ^has_journal /dev/sda1 

5.重新挂载

#mount -a  

6.检查

#tune2fs -l /dev/sda1 |grep feature 

查看has_journal字段是否已经去掉

根分区

1.重启系统,进入单用户模式

2.查看要修改的分区

#df -h 

3.查看分区journal日志(如/dev/sda1)

#tune2fs -l /dev/sda1 |grep feature 

查看是否有has_journal字段

4.以只读模式挂载根分区

#mount -o remount,ro /dev/sda1 

5.修改分区journal日志

#tune2fs -O ^has_journal /dev/sda1 

6.检查

#tune2fs -l /dev/sda1 |grep feature 

查看has_journal字段是否已经去掉

7.重启

猜你喜欢

转载自www.cnblogs.com/zhangyunfei-blog/p/9288482.html