Page 1 of 1

[Suggestion] Disk management Improvements

Posted: 29 May 2014 07:20
by danic
Right now it seems disk management and its disk settings (sleep, APM, Smart on/off, etc) are mapped to the /dev/ada# and /dev/da#. Lets say I remove disk /dev/da0 from my NAS and reboot (I cycle 1 drive for off site backup every month). Now drives move up the list. (da10 is now da9 and da9 is now da8, and so on) Because the config file does not match what is attached to the system, Disk Management marks all drives red. So I'll hit the clear config and import disk button. Now I have a fresh list, with all my power management, APM, and smart settings set off. I now have to go one by one and change the settings of each disk.I have 16 disks in my NAS. This process takes a while.

I understand this wont be an issue to most users with only a few disks in their NAS. But few power users, hoarders, and those who feel the need to fill their 24 bay norco case with drives may find this annoying. This might be issue for people with USB connected drives as well.

So as future improvement, is there a way for Nas4free attempt to use the old settings. Instead using the 'clear config and import', make a 'New config based off old and Import' button. (based off UUID? How is the UUID generated? I see one in the config.xml.)
or...
Have check boxes and apply Sleep time, APM, and SMART to multiple disks. This could be helpful for new installs or want to tune their power savings quickly.

I've attempted to make my own fix, but my PHP skills and overall programming skills are not good enough. I got stuck on how to read/write a new config file.

Thank you Devs for all your hard work.

Re: [Suggestion] Disk management Improvements

Posted: 02 Jun 2014 01:56
by RedAntz
Hi danic,
danic wrote:Now drives move up the list.
This is the reason those drives are marked red. As device name (da0, da1 etc) is not a reliable unique identifier, NAS4Free will have to assume the worst and ask you to reconfigure.

You may be thinking why NAS4Free cannot simply match via serial number of the harddisks (it was doing that before I changed it to detect more rigidly). However, it is not that easy.

NAS4Free has no way to know whether you shuffled your harddisks (hence not matching device controller(s) and/or harddisks sequence that it knew from your config file) or swapped device controller(s). In the example where you decided to unplug 4 hardisks (da0,da1 .. da3) connected to onboard SATA controller and put it on SATA controller (card) installed in the same box, the harddisks may still show up in correct sequence (da0,da1 .. da3), BUT the device controllers change will affect how hardisks information and S.M.A.R.T. info. needs to be displayed and handled (sleep/standby).

These custom arguments/parameters are initialised and written to config when you first do 'Clear and Import'. Change to hardisks / controllers will need to be refreshed and written back to config (the handy way to do now is 'Clear and Import').

Currently the development principle for patches I contributed is that NAS4Free does not overwrite the config when there is a conflict detected. It will notify users what's changed (with scary bold red font) with the underlying controllers and devices, and let users to evaluate and to decide whether to write these changes to config. This manual decision making is handed back to the user ("Did I forget to plug one of the harddisk back properly after doing my regular dust bunny cleanup, or is this a genuine hardisk dropout issue ?")

It is possible for future enhancement to 'match' the existing config based on serial numbers, but I'm wary of offering too many options, causing more confusion. Feel free to let me know if there are better way to handle this.
danic wrote:Have check boxes and apply Sleep time, APM, and SMART to multiple disks. This could be helpful for new installs or want to tune their power savings quickly.
Bulk Edit has been suggested, and is in 1 of my TODO, but time is a luxury to me atm :-/ (I have a Norco RPC-4224 too, so I know it's needed ;) )

Re: [Suggestion] Disk management Improvements

Posted: 05 Jun 2014 05:44
by danic
Thanks for taking time to reply and giving a good explanation on why hard drive serial numbers are not good enough to keep drive settings. Hope we will see bulk drive edit down the road.