General NAS-Central Forums

Welcome to the NAS community
It is currently Sat Apr 29, 2017 7:33 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: xfs_repair limit memory
PostPosted: Tue Aug 19, 2014 2:43 pm 
Offline

Joined: Tue Aug 19, 2014 2:28 pm
Posts: 4
Hello, when I run a scan on my hard drive is getting this message:

Required memory for repair is greater that the maximum specified with the -m option. Please increase it to at least 404.

I know I can perform a scan with the Ubuntu LiveCD, but not every time I want to pull the drive.
I have access to the console, but after unmounting /dev/md0 and start xfs_repair /dev/md0 I get: "contains a mounted and writable filesystem"

someone help?

sorry for my english.


Top
 Profile  
 
PostPosted: Thu Aug 21, 2014 3:20 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
stalica wrote:
but not every time I want to pull the drive.
Every time? Under normal circumstances your should never have to use xfs_repair. If you often have to repair the filesystem you are doing something wrong (like pulling the power connector without shutting down the nas normally) or your disk is failing.

Quote:
after unmounting /dev/md0
Did unmounting succeed? Normally it's not easy to unmount /dev/md0, as it's mounted several times by bindmounts, and it's busy. Several processes will have open files on md0.


Top
 Profile  
 
PostPosted: Thu Aug 21, 2014 3:32 pm 
Offline

Joined: Tue Aug 19, 2014 2:28 pm
Posts: 4
The problem arises when a power outage and the NAS is not properly shut.

Yes, I was able to properly unmount /dev/md0 using the -l.
At the next attempt to unmount received information that /dev/md0 is not mounted.

Unfortunately this is not allowed to start because it appeared xfs_repair described earlier message.

I just need to run xfs_repair as does the soft supplied by ZyXEL, but increasing the limit of available memory, nothing more.


Top
 Profile  
 
PostPosted: Thu Aug 21, 2014 6:17 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
Unmounting with the -l (lazy) option does not actually unmount the device. It marks the device as unmounted, but as long as there are open files on it, the filesystem will be mounted. Only when the last open file is closed, the device will actually be unmounted.

It there might be a way to to get an unmounted /dev/md0. There is a file /etc/init.d/rc.shutdown, which is called when the system. On my old firmware dump of a 210 it's almost empty, but on my 325 it shuts down all processes, unmounts the raid arrays, and disassembles them. Don't know about the latest 210 firmware.

In this file you can insert these lines just before the line 'mdadm -Ss':
Code:
touch /tmp/run
telnetd -l /bin/sh
while [ -f /tmp/run ] ; do
        sleep 10
done
Now shutdown the box. You should be able to connect over telnet, and the data partition should be unmounted. However, I don't know if xfs_repair is still avaible. It might be necessary to copy it to /tmp before shutting down.

When you are done, delete the files /tmp/run to finish the shutdown.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group