I bet the reboot fixes it. I saw some weirdness with disks on a sles 12 server 
after kernel and more patching than magically resolved after reboot.

But you should dump it prior to reboot and send the dump off to your vendor.



Marcy

-----Original Message-----
From: Grzegorz Powiedziuk [gpowiedz...@gmail.com<mailto:gpowiedz...@gmail.com>]
Sent: Tuesday, April 18, 2017 10:32 PM Central Standard Time
To: LINUX-390@VM.MARIST.EDU
Subject: Re: [LINUX-390] /etc/mtab and "df -h" problem


2017-04-18 16:34 GMT-04:00 Alan Altmark <alan_altm...@us.ibm.com>:

> On Monday, 04/17/2017 at 03:14 GMT, Grzegorz Powiedziuk
> <gpowiedz...@gmail.com> wrote:
> > I am having a really weird issue on one of the z redhat systems.
> Probably
> > it doesn't have anything to do with Z but we have some great minds here
> so
> > perhaps someone will help me
> >
> > the "df -h" or "df -P"  command doesn't work when run as a normal user.
> > "df" on it's own works fine.
> >
> > Error:
> > df: cannot read table of mounted file systems: Permission denied
> >
> > Now, here is when it gets really strange. Above suggests wrong
> permissions
> > on /etc/mtab which are fine:
> > [root@it069qz5ora lib64]# ls -la /etc/mtab
> > -rw-r--r-- 1 root root 2024 Apr 17 10:44 /etc/mtab
> >
> > But the "df -h" is trying to open that file with WRITE access mode !!!
> > strace df -h 2>&1 |grep open  | grep mtab
> > ...
> > open("/etc/mtab", O*_RDWR*|O_CLOEXEC)     = -1 EACCES (Permission
> denied)
> >
> > On all other systems"df -h" opens that mtab file in O_RDONLY. Why this
> one
> > is different?
> >
> > And as I said, regular "df" works fine and it usies O_RDONLY flag.
> >
> > So the problem happens only with "df -h" or "df -P" . That doesn't make
> any
> > sense to me.
> >
> > Has anyone seen anything like that?
>
> Weird.  The read_file_system_list() routine in mountlist.c (called by
> df.c) code shows a hard-coded "r" option in the fopen(), and I don't see
> df calling some other "mount list" function because of -h or -P.
>
> Alan Altmark
>


I know .. doesn't make sense. Thanks for looking into source code. I wonder
if something has change in the code in the
newer versions of this package. Tomorrow in the evening I will reboot this
guy. Hopefully this will fix it.

Aha, forgot to say. I've changed permissions of mtab file to 666 for a
moment just to make sure that this is the problem and of course it worked
this time.

Gregory

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to