Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I asked my sysadmin if he can do the following:

echo 0 > /proc/sys/vm/zone_reclaim_mode

He came back to me saying that he doesn't have the necessary permissions (as root) to create a file in that directory (vm) and that directory doesn't have write permissions set (only has xr) and also that he cannot change the permissions. He tried adding write permission to vm directory but that operation failed.

How can we add write permissions to that directory and create the required file?

Its Ubuntu 9.04

Thank you in advance.

PS: I am posting this here again on the suggestion from my StackOverflow post.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The vm.zone_reclaim_mode setting should be handled by using sysctl(8), and not by writing to the /proc filesystem directly:

# sysctl -a | grep zone_reclaim_mode
vm.zone_reclaim_mode = 0

# sysctl -w vm.zone_reclaim_mode=1
vm.zone_reclaim_mode = 1

You can write your customizations to the /etc/sysctl.conf file to make persistent changes.

share|improve this answer
    
Thank you. zone_reclaim_mode is not present in vm directory, so when I grep for it, it doesn't find it. I guess we need to put vm.zone_reclaim_mode = 1 in /etc/sysctl.conf? –  Raghava Aug 31 '13 at 18:20
    
As explained above, don't try to fiddle with this settings directly using the /proc filesystem. Have you tried the commands I posted? –  dawud Aug 31 '13 at 18:29
    
Yes I did. The grep does not return anything because it is not present (also not present in the vm directory). (Consequently?) sysctl -w vm.zone_reclaim_mode=1 returns an error -- error: "vm.zone_reclaim_mode" is an unknown key. That is why I asked if we should put this assignment in the /etc/sysctl.conf file itself? I guess, it would come into affect only after a system reboot? –  Raghava Aug 31 '13 at 19:06
    
Is this a physical server or some VPS? –  dawud Aug 31 '13 at 21:42
1  
Ubuntu 9.04 is ancient. Update your OS and get rid of this problem altogether. –  dawud Sep 1 '13 at 8:06
show 5 more comments

Under /proc you usually find the proc pseudo file system. Its not an actual file system that stores data on a persistent storage device, but a way for the kernel to display settings to the userspace. Reading/writing to these files communicates with the kernel. If your kernel supports the zone_reclaim_mode setting (and proc is mounted correctly) then reading from the file /proc/sys/vm/zone_reclaim_mode gives you the current setting, and writing to /proc/sys/vm/zone_reclaim_mode tells the kernel that you want to change the setting. If your kernel isn't configured to show the setting then you can't just create a new file here, that wouldn't make any sense.

share|improve this answer
    
Thank you for the explanation. That makes sense. zone_reclaim_mode isn't already present there. So the only way is to unmount it and then remounting it correctly is it? –  Raghava Aug 31 '13 at 10:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.