+1: you almost certainly have SELinux enabled. The formatting of the file system will fail with this error when SELinux is configured. For example, on a test system I have set up a quick experiment to replicate your problem by setting SELinux to “enforcing”:

 

[root@m64-1 ~]# cat /etc/selinux/config

 

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=enforcing

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

[root@m64-1 ~]# mkfs.lustre --reformat --mgs /dev/sdb

 

   Permanent disk data:

Target:     MGS

Index:      unassigned

Lustre FS: 

Mount type: ldiskfs

Flags:      0x64

              (MGS first_time update )

Persistent mount opts: user_xattr,errors=remount-ro

Parameters:

 

device size = 1024MB

formatting backing filesystem ldiskfs on /dev/sdb

                target name  MGS

                4k blocks     262144

                options        -q -O uninit_bg,dir_nlink,quota,huge_file,flex_bg -E lazy_journal_init -F

mkfs_cmd = mke2fs -j -b 4096 -L MGS  -q -O uninit_bg,dir_nlink,quota,huge_file,flex_bg -E lazy_journal_init -F /dev/sdb 262144

mkfs.lustre: Can't make configs dir /tmp/mntRmd6cD/CONFIGS (Permission denied)

 

mkfs.lustre FATAL: failed to write local files

mkfs.lustre: exiting with -1 (Unknown error 18446744073709551615)

 

 

When SELinux is disabled, the file system will format without issue. You will have to edit the appropriate configuration (on RHEL/CentOS: /etc/selinux/config) and reboot the system in order for the change to take effect.

 

Regards,

 

Malcolm.

 

From: hpdd-discuss-bounces@lists.01.org [mailto:hpdd-discuss-bounces@lists.01.org] On Behalf Of Patrick Farrell
Sent: Friday, July 19, 2013 11:56 PM
To: hpdd-discuss@lists.01.org
Subject: Re: [HPDD-discuss] Issue installing Lustre 1.87

 

Upanshu,

 

The error message you're getting is what's expected if you still have SELinux enabled on that system.  I don't think you need to worry about lctl or the LNET settings right now - The mkfs.lustre is failing because it can't make the temporary directory.

 

I'd make sure selinux is set to disabled in /etc/selinux/config.

The line which starts 'selinux=' should read 'disabled'.

 

You can check whether or not that setting has taken effect with:
getenforce

 

I'd suggest making sure of that config file change and restarting the system, then try your format command again.

 

- Patrick Farrell