This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

support for temporarly mounted hdd in NAS status screen

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 538
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

support for temporarly mounted hdd in NAS status screen

Post by crest »

Since I regularely use USB hard disk drives for backups I made some amendments in system.inc to see these temporarly mounted hd drives also in the status screen (index.php) of my servers to get actual informations about these drives (normally one can see only hd drives which are configured in the harddisk management). To get all mounted drives there are only a few small changes in system.inc necessary:

All changes were made in the file /etc/inc/system.inc:

1. ADD an additional line after:

Code: Select all

exec("/bin/df -h", $rawdata);
to get a list of ALL mountpoint names (drives)

Code: Select all

exec("df -h | grep '/dev/' | grep '/mnt/' | awk '{print $6}'|cut -d/ -f3", $sharenames);


2. REPLACE the following 2 lines:

Code: Select all

			foreach ($config['mounts']['mount'] as $mountcfg) {
				if (0 == strcmp($mountpoint, "{$g['media_path']}/{$mountcfg['sharename']}")) { 
with:

Code: Select all

			foreach ($sharenames as $mountcfg) {
				if (0 == strcmp($mountpoint, "{$g['media_path']}/{$mountcfg}")) {
3. and finally REPLACE the line:

Code: Select all

$result[$mountpoint]['name'] = $mountcfg['sharename'];
with:

Code: Select all

$result[$mountpoint]['name'] = $mountcfg;
Here we are. Now you can see all mounted drives (also USB drives which are not configured via the harddisk management config) under the mountpoint /mnt. It works pretty well for me and as far as I can see there are no disadvantages.

Image

If this patch should be used for the embedded version of N4F one must copy the patched version of system.inc from a persistant place (e.g. data drive) after each reboot to /etc/inc. I do this with a postinit command, but perhaps this patch can go into system.inc for a next release of N4F if it's of interest for others so that this step won't be no longer necessary ...?

Regards, crest
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

ku-gew
Advanced User
Advanced User
Posts: 172
Joined: 29 Nov 2012 09:02
Location: Den Haag, The Netherlands
Status: Offline

Re: support for temporarly mounted hdd in NAS status screen

Post by ku-gew »

The Services line at the bottom was added by you? I don't remember it on my install.
HP Microserver N40L, 8 GB ECC, 2x 3TB WD Red, 2x 4TB WD Red
XigmaNAS stable branch, always latest version
SMB, rsync

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 538
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: support for temporarly mounted hdd in NAS status screen

Post by crest »

ku-gew wrote:The Services line at the bottom was added by you? I don't remember it on my install.
Yes, the service lines was added by me since I use jails for additional services like Subsonic, pyLoad etc. to get information about the states of these sevices. If a service is up and running there is also a direct link to the appropriate service e.g. to the Subsonic login page.
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

RudeViper
NewUser
NewUser
Posts: 4
Joined: 04 Jun 2013 18:41
Contact:
Status: Offline

Re: support for temporarly mounted hdd in NAS status screen

Post by RudeViper »

crest - how did you install pyload etc... and what is a jail? - I am new to all this and came across mentions of pyload and jails - doesn't pyload download files from filehosts like filefactory etc???? I am definitely looking for this function for my NASBox here @ home.

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 538
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: support for temporarly mounted hdd in NAS status screen

Post by crest »

Hi,
a jail is more or less an additional operating system which stays on top of the NAS4Free system. Jails provide many advantages, the most important at least for me is, that you can use it on embedded installation of N4F to install additional software. Another thing is that with jails you don't effect the N4F system and you can have many of them, specialized and isolated from each other.

You will find all about jails in a subforum => viewforum.php?f=79 where you also find how to install additional software like pyload, OwnCloud etc. There is also an extensions for NAS4Free which can manage the jails for you (called theBrig => viewtopic.php?f=79&t=3894) which I would highly recommend to use.

Regards,
crest
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Post Reply

Return to “Suggestions & Requests”