I‘ve used the mdadm command line utility to setup and manage software RAID 6 under Debian Linux server. However, I get the following message in /var/log/messages file:
[ 14.003707] JBD: barrier-based sync failed on md0-8 – disabling barriers
How do I fix the message ‘JBD error message “barrier-based sync failed”‘?
This is not a problem. This is just an informational log entry in /var/log/messages. Use the following commands to see the current status of your raid:
# cat /proc/mdstat
Sample outputs:
Personalities : [raid6] [raid5] [raid4] md0 : active raid6 sda1[0] sde1[4] sdd1[3] sdc1[2] sdb1[1] 125856768 blocks super 1.2 level 6, 512k chunk, algorithm 2 [5/5] [UUUUU] unused devices:
# mdadm -q -D /dev/md0
Sample outputs:
/dev/md0: Version : 1.2 Creation Time : Sat Sep 3 00:46:50 2011 Raid Level : raid6 Array Size : 125856768 (120.03 GiB 128.88 GB) Used Dev Size : 41952256 (40.01 GiB 42.96 GB) Raid Devices : 5 Total Devices : 5 Persistence : Superblock is persistent Update Time : Mon Sep 5 02:41:30 2011 State : clean Active Devices : 5 Working Devices : 5 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Name : nas01:0 (local to host nas01) UUID : 076f728e:4e89c5a7:dfc456ff:c12a1b22 Events : 696 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 8 17 1 active sync /dev/sdb1 2 8 33 2 active sync /dev/sdc1 3 8 49 3 active sync /dev/sdd1 4 8 65 4 active sync /dev/sde1
How Do I Remove This Message?
Edit grub.conf or menu.lst and pass the following parameter to kernel:
barrier=off
More information is available here.
🐧 3 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Not a problem? WTF?
What we have here is that the raid id configured not to attempt full write flushing that will store stuff that you’ve sent to thr drives onto the platters. If any drives do not have the write cache turned off explicitly, you are risking data loss.
Now, arguably, this area is one of Linux’ weaknesses all through the disk stack in terms of whether fsync really gets data to the platter (and whether all directory and storage map metadata is written too) and there’s more than enough discussion of this elsewhere. But ‘not a problem?’. No, its the elephant in the roorm.
As far as I know disabling will have no effects on LVM, mdraid, and cache-writeback devices as barriers cannot be used with these devices anyways.
A proper solution is to convert file system to ext4 where barrier=1 is a default mount option for ext4.
As OP said this is a harmless error message and can be ignored. The kernel disables barrier and executes the write as if barrier=0 was set on ext3.
My programmer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using WordPress on several websites for about a year and am nervous about switching to another platform. I have heard good things about blogengine.net. Is there a way I can transfer all my wordpress posts into it? Any help would be greatly appreciated!