Napp-it on Proxmox?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Patrick

Administrator
Staff member
Dec 21, 2010
12,513
5,804
113
I thought: wouldn't it be cool to bolt-on a ZFS GUI to the Proxmox + Docker platform? Napp-it works on Linux, and Proxmox is based on Debian with ZFS pre-installed, so I tried using the standard installer script. It got this far.

Here is where it is stuck:
upload_2017-4-19_21-0-39.png

How far off is this from working?

Code:
start napp-it
#############

user napp-it found
sudoers configured
permissions set

open your browser with adress ip:81

sh: 1: ifconfig: not found


bind: Address already in use
ok

/var/web-gui/data/tools/linux/mini-httpd: started as root without requesting chroot(), warning only
If there was a storage GUI for everything that would be very cool. Even better: if there was a way to dockerize the Web GUI for storage management.
 
  • Like
Reactions: Jeggs101

gea

Well-Known Member
Dec 31, 2010
3,161
1,195
113
DE
hello Patrick
It seems that the webserver (minihttpd is working, the napp-it user is created (the webserver runs under this account) and sudoers is installed and working. ifconfig seems missing but this is only needed to show the current ip config.

The startscreen that is shown now is a simple html file delivered by minihttpd.
This html page will forward to /var/web-gui/data/wwwroot/cgi-bin/admin.pl, the napp-it management application

This application basically needs a working Perl. Try the following at console:
perl /var/web-gui/data/wwwroot/cgi-bin/admin.pl

This should return the html code for the login screen

btw
I doubt that you can use napp-it in a container as it needs full access to zfs and zpool and real disk access.
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Hi Patrick/Gea,

I've tried this as well, but had a different issue.

I get through the initial config (set passwords) then it redirects to here.



I think some of the menu items are not rendering as expected.

Some versions to help.

pve version

Code:
root@pve1:~# pveversion -v
proxmox-ve: 4.4-86 (running kernel: 4.4.49-1-pve)
pve-manager: 4.4-13 (running version: 4.4-13/7ea56165)
pve-kernel-4.4.35-1-pve: 4.4.35-77
pve-kernel-4.4.49-1-pve: 4.4.49-86
lvm2: 2.02.116-pve3
corosync-pve: 2.4.2-2~pve4+1
libqb0: 1.0.1-1
pve-cluster: 4.0-49
qemu-server: 4.0-110
pve-firmware: 1.1-11
libpve-common-perl: 4.0-94
libpve-access-control: 4.0-23
libpve-storage-perl: 4.0-76
pve-libspice-server1: 0.12.8-2
vncterm: 1.3-2
pve-docs: 4.4-4
pve-qemu-kvm: 2.7.1-4
pve-container: 1.0-97
pve-firewall: 2.0-33
pve-ha-manager: 1.0-40
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u3
lxc-pve: 2.0.7-4
lxcfs: 2.0.6-pve1
criu: 1.6.0-1
novnc-pve: 0.5-9
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.9-pve15~bpo80
perl

Code:
root@pve1:~# perl -v

This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-gnu-thread-multi
(with 92 registered patches, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
perl /var/web-gui/data/wwwroot/cgi-bin/admin.pl

Code:
root@pve1:~# perl /var/web-gui/data/wwwroot/cgi-bin/admin.pl
sh: 1: sudo: not found
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <title> // ZFS appliance </title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta http-equiv="refresh" content="3600;url=/cgi-bin/admin.pl?action=logout_admin" />
 <link rel="icon" href="/favicon.ico" type="image/x-icon">

 <!-- jquery, always needed -->
 <script type="text/javascript" src="/_doc/menu/inc/jquery-3.1.1.min.js"></script>
 <script type="text/javascript" src="/_doc/exist.js"></script>

 <!-- predefine to avoid error if missing on some pages -->
<script type="text/javascript">
   function  rgraph_iostat()      { }
   function  rgraph_arczilstat()  { }
   function  rgraph_netstat()     { }
   function  rgraph_cpustat()     { }
   function  rgraph_servicestat() { }
</script>

 <!-- napp-it related, you may edit a copy under /_my/ -->
   <link rel='stylesheet' type='text/css' href='/_doc/menu.css'>
   <script type='text/javascript' src='/_doc/napp-it.js'></script>

   <!-- rgraph related on about and statistics -->
  <script src="/_doc/rgraph/RGraph.common.core.js" ></script>
  <script src="/_doc/rgraph/RGraph.common.dynamic.js" ></script>
  <script src="/_doc/rgraph/RGraph.common.tooltips.js" ></script>
  <script src="/_doc/rgraph/RGraph.common.key.js" ></script>
  <script src="/_doc/rgraph/RGraph.hbar.js" ></script>
  <!--[if lt IE 9]><script src="/_doc/excanvas/excanvas.js"></script><![endif]-->



 <script type="text/javascript">
     function auto_load(){
         $.ajax({
              url: "/cgi-bin/admin-mon.pl",
              cache: false,
              data: {
                  id : "",
                  l1 : "",
                  l2 : "",
                  l3 : "",
                  prop : "",
                  prop2 : "",
                  list : ""
              },
              success: function(data){
                  $("#auto_load_div").html(data);

                  var mess = data;
                  var arr = mess.split("<~>");
                  if (arr[0] != '') { $('#status_time').html(arr[0]);  }         // time
                  if (arr[1] != '') { $('#status_info').html(arr[1]);  }         // status line
                  if (arr[2] != '') { $('#content').html(arr[2]);      }         // div  #content update
                  if (arr[3] != '') { $('#wsarea').html(arr[3]);       }         // div  #wsarea update
                  if (arr[4] != '') { $('#wsdata').html(arr[4]);       }         // div  #wsdata update
                  if (arr[5] != '') { rgraph_iostat(arr[5]);           }         // draw rgraph with ws data5
                  if (arr[6] != '') { rgraph_arczilstat(arr[6]);       }         // draw rgraph with ws data
                  if (arr[7] != '') { rgraph_netstat(arr[7]);          }         // draw rgraph with ws data
                  if (arr[8] != '') { rgraph_cpustat(arr[8]);          }         // draw rgraph with ws data
                  if (arr[9] != '') { rgraph_servicestat(arr[9]);      }         // draw rgraph with ws data
              }
         });

     }

     $(document).ready(function(){
            auto_load(); //Call auto_load() function when DOM is Ready
     });

     //Refresh auto_load() function after 1000 milliseconds
     setInterval(auto_load,1000);
 </script>



</head><body>

<div id="header">
  <div id="header2">
    <div id="nilogo"><img src='/_doc/logo.png' alt=''></div>
    <span id="host"></span>
    <span id="release"> ZFS appliance v. 17.01 free Apr.14.2017</span>
   </div>
</div>

<!-- center-->
<div id='center_log' style='position: absolute; z-index:2000; top: 150px; left: 10px; padding:0px; margin:0px auto; width: 100%; text-align:center;'>

  <div id='mylog_close'>
    <div style='position:absolute; z-index: 2002; width: 870px; text-align:center; margin-top:2px'><a title="move me" href="#" onmousedown="dragStart(event, 'center_log')"><b>Monitor extension</b></a></div>
    <div style='position:absolute; z-index: 2001; width: 900px; text-align:right'>
       <a href='#' onclick="$('#mylog_close').animate({height: 'hide', opacity: 'hide'}, 'fast');$('.logwindow').animate({height: 'hide', opacity: 'hide'}, 'fast');" title='close'><img src='/_doc/close.png' alt=''></a>
    </div>
  </div>

  <div id='mylog_cmd' class='logwindow'><br>Monitor-Extension: Command Log
  </div>

  <div id='minilog' style='position:fixed; bottom:0px; display:none; width: 100%; height: 45px; z-index: 20'> minilog<br>
  </div>
  <div id='miniover' style='position:fixed; bottom:0px; width: 100%; height: 6px; z-index: 21'> <br>
  </div>


</div><!-- end center -->


<style type="text/css">
   #status {  position: absolute; width:99%; text-align: right; top:78px; z-index:9; } }
</style>

<!--nows-->
<table style="width:99%; height:60%">

<tr><td>
 <div id='status'>
    <div id='status_time' style='display:inline;z-index: 111'> PRO Monitor: <i>inactive</i>  &nbsp;</div>
    <div id='status_info' style='display:inline; margin-left:8px'>
      <a title="Pool state"> Pool <img src='/_doc/grey.png' alt='Pool state'>&nbsp;</a>
      &nbsp;<a title="ZFS pool capacity"> Cap <img src='/_doc/grey.png' alt='Capacity'>&nbsp;</a>
      &nbsp;<a title="ZFS disk activity"> Disk <img src='/_doc/grey.png' alt='Disk activity'>&nbsp;</a>
      &nbsp;<a title="Network activity"> Net <img src='/_doc/grey.png' alt='Network activity'>&nbsp;</a>
      &nbsp;<a title="CPU activity"> CPU <img src='/_doc/grey.png' alt='CPU activity'>&nbsp;</a>
      &nbsp;<a title="Job state"> Job <img src='/_doc/grey.png' alt='Job state'>&nbsp;</a>
    </div>
 </div>


</td></tr>
<tr>
  <td style="vertical-align:middle; text-align: center; padding-top: 30px">
      <form name="login" method="post" action="/cgi-bin/admin.pl">
            <table border="0" style="margin:auto; text-align:left; width: 450px; height:180px; border: 1px solid #cccccc; background-color: #cccccc">



            <tr style='background: url(/_doc/oibg.png) repeat-x'>
            <td colspan="2" style="text-align:left; padding-left: 190px; vertical-align: middle; height: 25px;font-size:16px"><b>Login</b></td>
            </tr>

            <tr style='background: url(/_doc/oibg.png) repeat-x'>
            <td style="width: 160px; text-align: right; vertical-align: middle; height: 25px;font-size:13px"><b>user:</b>&nbsp;</td>
            <td style="vertical-align: middle; height: 25px; font-size: 14px">    <select name="name" class="select" style="width: 107px">
        <option selected>admin</option>
        <option>operator</option>
    </select>
</td>
            </tr>

            <tr style='background: url(/_doc/oibg.png) repeat-x'>
            <td style="width: 160px; text-align: right; vertical-align: middle; height: 25px;font-size:13px"><b>pass:</b>&nbsp;</td>
            <td style="vertical-align: middle; height: 20px"><input type="password" name="pass" style='font-size: 12px; width: 100px'>
            <input type='submit' name='submit' value='login' style='font-size: 11px; margin-left:30px'>
            </td>
            </tr>

            <tr>
            <td colspan="2" style="text-align:left; background-color:#eeeeee; padding:8px"">
            <br><br>

            <font style="font-size:11px"><b>Info: </b><br>First login: admin, no password; delete *.cfg  in the _log folder to get defaults<br><br>
Please do not disable Javascript. For realtime monitoring you need a HTML5 <br>
websocket capable browser. For https and websocket prefer Google Chrome. <br>
It is suggested to use a secure SAN or network for management.<br><br>
            <span style="color:#ff0000"></span></font>
            <br><br>
            

            </td>
            </tr></table>
      </form>
  </td>
  </tr></table>

</div>
<!--admin 2379--></body></html>


   <script type="text/javascript">
     $("#mylog_cmd").append("<hr>--- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin-lib.pl &log_add 855 &lt;- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin.pl &log_end 3016 &lt;- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin.pl &login 218 ---<br><br> <br><br> - End logging, details see monitor extension + topmenu edit-<br><br>");
     $("#mylog_cmd").animate({ scrollTop: $("#mylog_cmd").prop("scrollHeight") }, 50);

     $("#minilog").append("--- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin-lib.pl &log_add 855 &lt;- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin.pl &log_end 3016 &lt;- \/var\/web-gui\/data\/wwwroot\/cgi-bin\/admin.pl &login 218 ---<br><br> <br><br> - End logging, details see monitor extension + topmenu edit-<br>");
     $("#minilog").animate({ scrollTop: $("#minilog").prop("scrollHeight") }, 10);
   </script>
  <script type="text/javascript">
     $("#minilog").val("more >> topmenu Edit + monitor extension.");

     $("#mylog_close").animate({height: 'hide', opacity: 'hide'}, 'fast');
     $("#mylog_cmd").animate({height: 'hide', opacity: 'hide'}, 'fast');
     $("#minilog").animate({opacity: 'hide'}, 'slow');

     $("#miniover").mouseenter(function() {
         $("#minilog").animate({height: 'show', opacity: 'show'}, 'slow');
     });

     $("#miniover").mouseleave(function() {
         $("#minilog").animate({height: 'hide', opacity: 'hide'}, 'slow');
     });

  </script>
 
Last edited:

Monoman

Active Member
Oct 16, 2013
410
160
43
Gea,

not sure how I missed that, sorry for the silly mistake.

Thank you.
 

Jeggs101

Well-Known Member
Dec 29, 2010
1,529
241
63
@Patrick and @gea - if you guys get Napp-it to manage storage for Proxmox and Docker you'll have created the best thing ever.

Sorry but I don't want to deal with Solarish h/w support, I prefer Linux.
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Got Napp-it to work, but it's limited to Zfs/zpool management and not shares as far as I can see. Great starting place. I'll continue to tinker.
 
  • Like
Reactions: T_Minus

Monoman

Active Member
Oct 16, 2013
410
160
43
from the command line....
installed nfs-kernel-server package, restarted Napp-it (napp-it-stop && napp-it)

from the gui....
on the ZFS-info page, I enabled NFS sharenfs=on for my zpool/pve1-nfs zfs filesystem

Happy update!
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Did you have a zpool already created?
So, from the gui I could not see the physical disks so I was not able to . I'm not sure if this was a limitation of the linux install or something I did wrong (@gea would know better) however from the cmd line a quick zpool create zpool /dev/vdb (vdb in my case) and I was up and running! I'm doing this all in the VM. My actual server install with be a mirror or raid 10.

So I created the initial zpool and from the gui created the new zfs fs called zpool/pve1-nfs ( pve1 is #1 of 3 in my virtual cluster)

from there just enabled NFS after installing the kernel package.
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Alright. so tested a good bit of napp-it on proxmox and it looks like all zfs, zpool and zds commands work as expected (except for the creation of zpools as the disks are not showing up). I've only tested NFS for sharing and it appears to not work without command line share establishment.

My trials are below, I tried to do as much as I could from the gui, I realize it all could be done from cmd but that's not the point of this.

In my setup, I have 3 servers, pve1, pve2 and pve3. 1 and 2 are beefy servers and 3 is a light activity/witness node

Install napp-it and initial configuration on both pve1 and pve2 a shell
Code:
apt update && apt full-upgrade -y
apt install sudo nfs-kernel-server
wget -O - www. napp-it.org/nappit | perl
sh /var/web-gui/data/tools/linux/napp-it
Perform initial start through gui (set passwords) and restart napp-it to ensure everything works
Code:
napp-it-stop && napp-it
Create initial pool as the disks do not show up in the gui
Code:
zpool create zpool /dev/vdb
Create dummy nfs share so our NFS service works
Code:
echo '/mnt localhost(ro)' >> /etc/exports
service nfs-kernel-server restart
From the gui on pve1 and pve2
- Create new ZFS filesystem, for me it was zpool/pve1-nfs and zpool/pve2-nfs, accept defaults except for smb share, off


Time to go back to the root shell
pve1
Code:
 zfs set sharenfs="rw=@10.1.1.21/24" zpool/pve1-nfs
pve2
Code:
zfs set sharenfs="rw=@10.1.1.22/24" zpool/pve2-nfs
Verify on both hosts your nfs shares are working
Code:
showmount -e
Add them to your cluster and manage snapshots and and zfs/zpool health via napp-it!
 

gea

Well-Known Member
Dec 31, 2010
3,161
1,195
113
DE
When Sun invented ZFS they build it around Solaris with NFS (invented by Sun), SMB (Solaris CIFS server part of Solaris) and iSCSI. All those services were maintained by Sun and fully integrated in the OS and ZFS as a ZFS property.

This is one of the reason why they "just work" on Solarish as no 3rd party tool is involved.
On BSD and Linux this is different but they try to implement the original (iSCSI),NFS/SMB as a ZFS property idea as far as possible (mostly a bad experience compared to Solarish)

btw
Disk detection/enumeration ex
/dev/vdb on Proxmox seems different to a native Debian

Disk detection is done at
/var/web-gui/data/napp-it/zfsos/_lib/linux/get-disk.pl
 
  • Like
Reactions: Monoman

Monoman

Active Member
Oct 16, 2013
410
160
43
@gea the /dev/vdb strangness might be due to it being a virtual machine for testing. It's in my lab.

Thank you for the reply :)