AnsweredAssumed Answered

maprcli disk list problem

Question asked by akusanagi Employee on Nov 5, 2012
Latest reply on Nov 5, 2012 by sgopinath
In RHEL 5.x environment, when the root user executes the 'maprcli disk list' command, a swap partition is shown as a system disk. But, when a non-root user executes the command, it is shown as a non-system disk.

    [root@sdw5 ~]# maprcli disk list -host sdw5 -system 0
    diskname  powerstatus  fstype   firmwareversion  mount  status  vendor  hostname  availablespace  totalspace  modelnum   usedspace 
    /dev/sdb  running      MapR-FS  2.30             0      0       DELL    sdw5      2743219         2809717     PERC_H700  66498     
    /dev/sdd  running      MapR-FS  2.30             0      0       DELL    sdw5      2751245         2809717     PERC_H700  58472     
    [root@sdw5 ~]# maprcli disk list -host sdw5 -system 1
    diskname   powerstatus  fstype             firmwareversion  mount  status  vendor  hostname  availablespace  totalspace  modelnum   usedspace 
    /dev/sda1  running      Linux              2.30             1      0       DELL    sdw5      892             1027        PERC_H700  135       
    /dev/sda2  running      Linux              2.30             1      0       DELL    sdw5      33974           48132       PERC_H700  14158     
    /dev/sdc1  running      Linuxswap/Solaris  2.30             0      0       DELL    sdw5                      49159       PERC_H700

    [mapr@sdw5 ~]$ maprcli disk list -host sdw5 -system 0
    diskname   powerstatus  fstype   firmwareversion  mount  status  vendor  hostname  availablespace  totalspace  modelnum   usedspace 
    /dev/sdb   running      MapR-FS  2.30             0      0       DELL    sdw5      2743219         2809717     PERC_H700  66498     
    /dev/sdc1  running               2.30             0      0       DELL    sdw5                      49159       PERC_H700            
    /dev/sdd   running      MapR-FS  2.30             0      0       DELL    sdw5      2751245         2809717     PERC_H700  58472     
    [mapr@sdw5 ~]$ maprcli disk list -host sdw5 -system 1
    diskname   powerstatus  fstype  firmwareversion  mount  status  vendor  hostname  availablespace  totalspace  modelnum   usedspace 
    /dev/sda1  running      ext3    2.30             1      0       DELL    sdw5      892             1027        PERC_H700  135       
    /dev/sda2  running      ext3    2.30             1      0       DELL    sdw5      33974           48132       PERC_H700  14158     

It looks like the 'maprcli disk list' command calls the disklist.sh, and disklist.sh calls '/usr/bin/udisks', 'fdisk -l', or 'mount' if either is available. Since /usr/bin/udisks is not available in RHEL 5.x, fdisk -l is called to obtain the fstype. But it fails because a non-root user doesn't have /sbin in its default PATH. If I specify its absolute path in disklist.sh - '/sbin/fdisk -l', then the maprcli command shows right fstypes.

Outcomes