• Post Reply Bookmark Topic Watch Topic
  • New Topic

CentOS how we set barrier=0 in centos through commond line ? how we can check value of barrier ?  RSS feed

 
abhinas raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i am new to CentOS. i searched a lot in google but could not find it.
i need to know

1) how we set barrier=0 in centos through commond line and how to set it permanently ? do i need to restart the server to see the change
2) how i can check value of barrier in centos ?
 
Tim Holloway
Saloon Keeper
Posts: 18792
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "barrier"? What subsystem or application does it apply to?
 
abhinas raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:What is "barrier"? What subsystem or application does it apply to?


you can get some idea from bellow link.i am facing same problem. but i dont know what adjectly is the syntax of command to set/_mount the barriers and data


http://serverfault.com/questions/486677/should-we-mount-with-data-writeback-and-barrier-0-on-ext3
 
Ron McLeod
Bartender
Posts: 1602
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abhinas raj wrote:how we set barrier=0 in centos through commond line and how to set it permanently ?

You can use tune2fs to permanently set barrier. You can also specify it as a mount option in /etc/fstab.


abhinas raj wrote:how i can check value of barrier in centos ?

/proc/mounts will show you the current setting

 
Ron McLeod
Bartender
Posts: 1602
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:What is "barrier"? What subsystem or application does it apply to?

Barriers are used with journaling filesystems to ensure that the journal data has been committed to the storage media before the actual data changes are attempted. The barrier is placed at the end of the journal data, before the actual data.
 
abhinas raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron McLeod wrote:
abhinas raj wrote:how we set barrier=0 in centos through commond line and how to set it permanently ?

You can use tune2fs to permanently set barrier. You can also specify it as a mount option in /etc/fstab.


abhinas raj wrote:how i can check value of barrier in centos ?

/proc/mounts will show you the current setting



I run the command and following is the result

----------------------------------------------------------------------------------------------------------------------------------------------------
[root@sip_61 ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
udev /dev devtmpfs rw,relatime,size=7979964k,nr_inodes=156077,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
/dev/mapper/VolGroup00-LogVol00 / ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda1 /boot ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/mapper/VolGroup00-LogVol02 /opt ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/VolGroup00-LogVol03 /var ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
/etc/auto.misc /misc autofs rw,relatime,fd=7,pgrp=2128,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,relatime,fd=13,pgrp=2128,timeout=300,minproto=5,maxproto=5,indirect 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
----------------------------------------------------------------------------------------------------------------------------------------------------

but i am not able to use tune2fs to set,
barrier = 0 and data=writeback
what adjectly is the syntax to use this command ? kindly reply soon its urgent for me. i wasted too much time and effort in all the above things.
 
Tim Holloway
Saloon Keeper
Posts: 18792
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid that the Ranch isn't a good resource for urgent questions. We're all unpaid volunteers, so we don't work on schedule, we only check in when it's convenient.

To set barrier to 0, use the "nobarrier" option on tune2fs. The option for writeback is "journal_data_writeback".

Expect that you will have to have root privileges to apply these options. You may also have to unmount the partition before you can use tune2fs, but it should tell you if that is the case.

These options appear to be one-way only at the tune2fs level.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!