Wednesday, October 8, 2014

Configure Quota on CentOS

To configure disk quota on CentOS, follow these steps:

1. install the following packages:
yum install quota* -y
1. Enable user quota and/or group quota on a file system:
vi /etc/fstab 
UUID="93ee7df7-4f3c-4127-be2b-5229b219f644" /home ext4 defaults,usrquota,grpquota 0 0
2. Create the quota database:
quotacheck -cug /home
OR create the databases for all partition that have quota enabled
quotacheck -acug
3. Configure a quota for a user/group(modify the block limits in kb, that means 1024K*500=512MB):
edquota ramesh
Disk quotas for user dennis (uid 500):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/mapper/vg0-home         512000          512000          512000         11        0        0
4. Check if quota is enabled or not:
quotaon -ap
group quota on /home (/dev/mapper/vg0-home) is off
user quota on /home (/dev/mapper/vg0-home) is off
5. To enable the quota on all partitions have quota configured:
quotaon -av
6. To see the report of the quota:
repquota -sa
*** Report for user quotas on device /dev/mapper/vg0-home
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --       4       0       0              1     0     0    
dennis    --    501M    500M    500M             11     0     0  
 
 
    

Friday, October 3, 2014

Install SLURM on CentOS 6

Force a resolution on VirtualBox and CentOS

To force a certain resolution on VirtualBox and CentOS, use the following commands:

1. Create the Modeline using cvt tool:
cvt 1280 720 
Modeline "1280x720_60.00"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync
2. Add it to the supported resolutions:
xrandr --addmode "1280x720_60.00"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync
3. Add it to ta certain screen:
xrandr --addmode VBOX0 "1280x720_60.00"
4. Finally change the resolution using the GUI System / Preferences / Display or using:
xrandr --output VBOX0 --mode "1280x720_60.00"

Thursday, October 2, 2014

Slurm's logs are too big

To fix the issue where Slurm's logs are getting to large, create the following file:
vi /etc/logrotate.d/slurm
### SLURM Logrotate Configuration##
/var/log/slurm/*log { 
compress
missingok 
nocopytruncate 
nocreate 
nodelaycompress 
nomail  
notifempty 
noolddir 
rotate 5 
sharedscripts 
size=5M 
create 640 slurm root 
postrotate /etc/init.d/slurm reconfig 
endscript
}

Cannot find auth plugin for auth/authd

When encountring with the following error:
sinfo: error: Couldn't find the specified plugin name for auth/authd looking at all filessinfo: error: cannot find auth plugin for auth/authd
Please make sure slurm.conf has the following parameter:
AuthType=auth/munge

Wednesday, October 1, 2014

Error: too many arguments to function 'H5Dcreate'

When trying to build Slurm on a system that has HDF5 prior to version 1.8, the compilation will fail with errors such as:
hdf5_api.c:2021: error: too many arguments to function 'H5Dcreate'
To fix it, please make the following modification to the slurm.spec file:

1. Un-tar the source file:
tar xvf XXXX.tar.bz2
2. Edit slurm.spec file:
vi slurm.spec
3. Locate %build and add the following at the end of the parameters:
--with-hdf5=no



Segmentation fault with the latest SLURM

When trying to build rpms with the latest Slurm on CentOS 5.X, you will get the following error when trying to use all slurm commands:
Segmentation fault.
OR
sinfo: Resetting MaxJobCnt from 4294967294 to 4294687295 (MaxJobId - FirstJobId + 1)sinfo: error: is_valid_path: path is NULL!sinfo: error: Bad value "(null)" for PluginDir sinfo: fatal: Unable to process configuration file 
To fix it please disable the optimization during building the rpms:
rpmbuild -tb -D 'with_cflags CFLAGS="-O0 -g3"' slurm-14.03.6.tar.bz2