OK here goes,
First things first. I believe now and believed when I was at HP that the HP DV was an awesome product. HP really had an opportunity to dominate what would become a very lucrative and much sought after commodity. Namely an easy to use, quiet, Green - low power, safe (or seemingly so), repository for all your digital life. So what happened? Seagate and MS for two!
Unfortunately whilst reasonably easy to setup for us teccies, not quite so easy for the uninitiated! Mistakes made at install time are costly in time and complexity later. Re-installing the unit is a hit and miss affair at best involving all kinds of re-plugging of cables much head scratching and reading of crap documentation etc. and trusting to blinking lights!!!
Anyway enough of that, believe me I could rant for hours about these little monsters..... sorry wonders!
My use case is probably not dissimilar to most users of these devices. I have the unit in the comms cupboard so don't really care about the lights etc. OK, so maybe not the same as most users! I It has plenty of air flow and ventilation from the cupboard fans and vents.
Initial Usage
Every user approx. 7 has their own share
Shares for Music, Photos, DVD Backups, Games, Applications, Utilities & OS
Folder Duplication is on for the lot
After setting up and running this unit for a while > 6 mths < 1Yr I started to see problems accessing shares. Unit taking forever to load Control Centre etc. Failing markers on various shares etc.
Restarting the unit would lead to failing markers going away and all seemingly well.
On investigation drives were running very hot! After installing Smart add in, sector re-allocations were going up hourly it seemed. OK failing drive - wait drives! 3 out of 4... can't be. Fans were seemingly working. After much discussion with useless HP support (no mention of the fact that eating the CRAP seagate drives was par for the course and a very common issue so I was told! Finally got agreement from HP (after going through the ludicrous 1st line support crap) to ship new drives out to me as replacements. So another batch of Seagate (CRAP) drives arrived almost a week later. 2 days to re-install and restore most of the data, I did loose some that was not recoverable despite 4 days of work with Spinrite Arrrrgggghhhhhhh! A week of whining users and hassle like you would not believe!
OK machine now back to working complete re-install and re-setup everyone happy. Fast forward another year. Much housekeeping another system partition restore due to some kind of corruption (who knows what no sensible log info etc.) various housekeeping in-between times. Same issues started again, putting bigger fans in cupboard from stuff laying around helped with drive temps. But nevertheless 4th original drive failed. 1 of the replacements as well.
NOT GOODHP agreed to ship replacement drives again, NOW WE DON"T TRUST THIS UNIT ANYMORE! So lots of reading of forums and hey presto first serious implementation problem with the shipped units came to my attention.
YOU MUST DO A FAN MOD NOW! Either bend the pin on the connectors so the fans run at full tilt or buy a VGA adaptor and set the fans to manual 100% and don't forget to turn off the reset fan control or it will reset them to HP default (in other words useless) state after a reboot. So I ordered a VGA adaptor got the new drives and set about re-install after the fan mod. I loaded up the new drives, so we now have 2 new drives and 2 old drives but after checking with spinrite the old ones were OK.
Linux to the rescue... Mounting the old drives in a linux machine allowed me to have a look at the layouts etc. And after a generous session of rysnc I managed to reassemble the folders from the old drives onto a consolidated set of folders on a WD20EFRX that ended up 99% full. Phew!!!
So clean install, 4 drives, shares structure in place. Samba mount on linux box to copy data back and off we go. Restore overnight. Next day data restored and all well, fans running full, drives now a more respectable 32-5 Deg C not the 42+ of the previous setup. Even then less than a Yr later original drives started showing sector failures and shares going bad. We are now out of warranty. As You know drives are OEM so no warranty.
VGA adaptor had been sitting around for months. Time to bite the bullet and setup a proper Linux NAS server running a Raid 5 array on the HP DV. At this point the only machine running windows was the HP DV. We moved to Ubuntu Linux the previous year for all machines DT and LT, Hosting servers have always been Linux. We have a couple of MS VM's for software islands.
Bought another 3 WD20EFRX drives for 68 GBP each. 3 Yr warranty direct from WD.
At this point I have written this as a guide for anyone else wanting to re-purpose their X501 Ex 495 etc.
Took HP DV down, installed VGA Adaptor and Jumper on mobo from excellent information from this site
Reset pins on fans to original state on the way. Plugged in external DVD drive in back usb slots (takes 2 usb ports). Booted into BIOS and set fans to full. Changed VGA memory size to 128 from 256. Changed boot priority to CD first. Left everything else as is. Power down.
Installed 3 WD20EFRX drives in the first 3 slots left 4th empty.
Booted up with Ubuntu 12.04.3 Server Disc. Select country and then Install Server.
Follow instructions setting up network Hostname etc. Until you get to the Partition disks step, then:
Partitioning AFTER READING LOTS OF STUFF I DECIDED NOT TO CREATE A SEPERATE SWAP PARTITION YOU MAY CHOOSE ANOTHER PATH
I have used Swap Files for years without issue. For me less complexity is better.
If you choose to create a separate swap partition you will need to create 2 partitions per disk (1 swap 1 data)
Select Manual as the partition method.
Select the first hard drive, and agree to "Create a new empty partition table on this device?".
Repeat this step for each drive you wish to be part of the RAID array.
You will now have three drives with 3 Partitions showing FREE SPACE.
Select the "FREE SPACE" on the first drive then select "Create a new partition".
Next, select the Size of the partition. I just set the maximum size. Select Primary.
Select the "Use as:" line at the top. By default this is "Ext4 journaling file system", change that to "physical volume for RAID". Also select the "Bootable flag:" line to change the value to "on".
Then choose "Done setting up partition".
Repeat these steps for the other 2 disks and partitions.
RAID ConfigurationWith the partitions setup the arrays are ready to be configured:
Back in the main "Partition Disks" page, select "Configure Software RAID" at the top.
Select "yes" to write the changes to disk.
Choose "Create MD device".
Select "RAID5", but if you are using a different setup choose the appropriate type (RAID0 RAID1 RAID5).
In order to use RAID5 you need at least three drives. Using RAID0 or RAID1 only two drives are required.
Enter the number of active devices "3", or the amount of hard drives you have, for the array. Then select "Continue".
Next, enter the number of spare devices "0" by default, then choose "Continue".
Choose which partitions to use. Generally they will be sda1, sdb1, sdc1, (These are the partitions you created earlier) etc. The numbers will usually match and the different letters correspond
to different hard drives. Usually sda (1st Drive, sdb 2nd Drive) etc. We will use this partition as our root partition in the next step.
Continue and select finish.
Formatting There should now be a list of hard drives and RAID devices. The next step is to format and set the mount point for the RAID devices. Treat the RAID device as a local hard drive,
Format and mount accordingly.
Select "#1" under the "RAID1 device #0" partition.
Choose "Use as:". Then select "Ext4 journaling file system".
Then select the "Mount point" and choose "/ - the root file system". Change any of the other options as appropriate, then select "Done setting up partition".
Finally, select "Finish partitioning and write changes to disk".
IT WILL COMPLAIN ABOUT NOT SETTING UP A SWAP PARTITION IF YOU CHOOSE NOT TO SET ONE UP LIKE ME. JUST IGNORE IT AND CARRY ON.
If you choose to place the root partition on a RAID array, the installer will then ask if you would like to boot in a degraded state. Say yes and see this article for more info:
https://help.ubuntu.com/12.04/servergui ... ation.html .
The installation process will then continue normally.
Select SSH Server and Samba server from the server install software options.
Once complete remove cd and drive and reboot.
At this point you will be shocked how fast this machine is. It boots from cold in less than 10 seconds! Log in using your username and password.
Now to see what is going on with our array:
Issue the following command at the prompt:
~$ sudo watch -n1 cat /proc/mdstat
The status of your array will be shown and it will be degraded and be re-syncing. In other words it will be building the Raid 5 array.
You can either wait for it to finish (a long time) or carry on anyway and it will continue to re-sync in the background. I carried on.
So press CTRL C to exit the above program and return to the command prompt.
Now setup a swap file on the raid array (I have one it has never been used but hey, best practice). Follow the instructions below. I have a 4GB swap file mounted at /var/cache/swap/myswap
These ares the steps to create swap file and mount it automatically at boot time:
Type the following or copy and paste the following line by line upto the #
sudo mkdir -p /var/cache/swap/ # create a directory that holds the swap file
sudo dd if=/dev/zero of=/var/cache/swap/myswap bs=1M count=4096 # for 4 GByte
sudo chmod 0600 /var/cache/swap/myswap # only root can access
sudo mkswap /var/cache/swap/myswap # format as swap
sudo swapon /var/cache/swap/myswap # announce to system
Insert the following line in /etc/fstab for swap from the next boot:
sudo nano /etc/fstab
Insert the following line
/var/cache/swap/myswap none swap sw 0 0
CTRL X then Y to save
Type 'free' and you will see something similar to below:
yourusername@YOURHOSTNAME:~$ free
total used free shared buffers cached
Mem: 2041084 1936160 104924 0 80964 1711064
-/+ buffers/cache: 144132 1896952
Swap: 4194300 0 4194300
nearly finished
type:
sudo apt-get install smartmontools htop
sudo apt-get update
sudo apt-get dist-upgrade
If you have another computer networked around I am sure you do
. Now is the time to get used to working remotely.
Type 'ifconfig' and note down the IP address of the HP DV.
Type sudo reboot now.
Go to another computer and log into the HP DV using SSH (use putty or command line) whatever you are used to. If this is new to you spend 2 minutes on a Google search.
Log into the HP DV remotely using SSH and your credentials.
At this point install Webmin, follow the guide below, it takes only a few minutes and probably the best investment in time you will ever spend on the HP DV.
We will install Webmin using the Webmin APT repository, meaning we will automatically get notifications of newer versions.
We will edit the /etc/apt/sources.list file on your system and add some information :
Type
sudo nano /etc/apt/sources.list
Cut and paste the following lines into the end of the file. You will need to cursor down to the end then paste in the 2 lines below:
deb
http://download.webmin.com/download/repository sarge contrib
deb
http://webmin.mirror.somersettechsoluti ... repository sarge contrib
Press CTRL X and Y to save the file
You should also fetch and install the GPG key with which the repository is signed, with the commands :
sudo -i (become root for a few minutes)
cd /root
wget
http://www.webmin.com/jcameron-key.ascapt-key add jcameron-key.asc
exit
We are now going to update the system and install webmin. With the commands :
apt-get update
apt-get install webmin
Once all installed and finished type:
exit
Then
sudo reboot now
To reboot the system.
Time to start talking to the HP DV via a browser.
Open a browser and type:
https://yourHPDVipaddress:10000If all is well you will see a login and you can login using your credentials.
At this point, well, before Webmin really, you have a working very fast NAS server.
You will need to do a bit of reading on unix file and directory permissions to save yourself some head scratching. Linux is inherently secure so a basic understanding of permissions and rights are key.
You will need to do a bit of light reading on how to configure samba (for the file/printer sharing) for your network and needs. Webmin makes very light work of this.
You can setup users, you can integrate into an existing windows domain, be backup domain controller etc.
You will need to create some shares. I use the /media/ directory for all my data shares. The Users all have their own home directories created automatically under /home/username. You can share these using samba just like any other share with access control etc.
Once you have created the users, directories and samba shares it is time to put the data back on.
You remember I only used 3 of the 4 drive bays. I had my data backed up on the other WD20EFRX.
You can now put your backup drive into the 4th slot and reboot the HP DV from Webmin -> System -> Bootup and Shutdown or using sudo reboot now from the command line.
When the machine comes back up you can log in again via webmin. and in the Hardware section you can check out the status of your Linux Raid partition and Partitions on Local Disks and you will see the 4th drive listed. Clicking on it will show the details and the device name probably /dev/sddx.
You will be able to mount this drive and copy all the data back onto the Raid array. Again a bit of reading on how to mount NTFS drives on linux and how to use the rsync command and you are good to go. I am happy to help anyone achieve this, just ping me.
Once you have copied all data back on to the HP DV, keep monitoring the Raid re-sync using
sudo watch -n1 cat /proc/mdstat
I just leave this running in a SSH terminal session and when completed syncing it will look something like this:
Every 1.0s: cat /proc/mdstat Sat Dec 14 14:51:47 2013
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sdc1[2] sdb1[1] sda1[0]
3906763776 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
I would also advise installing the lm-sensors package to monitor temperatures of the CPU's and Drives. Just Google and follow instructions it will take less than 5 minutes.
You are done. You have re-purposed the HP DV as a very fast and secure and very capable NAS and general network server. If you look at the system info on the start page in Webmin you will be amazed at how little resources it is using. Don't worry about upgrading memory and processors not necessary. Mine typically uses 140MB and drives are running at 19-21 DEG C with CPU's typically late 30'ws - early 40's DEG C.
File transfers are very fast running at 90+ MB/Sec
Media streaming to various XBMC clients is a breeze we had 5 clients inc 3 Rpi's all streaming Hancock Full Blu Ray at the same time. No hiccups or stutters.
You can install upnp/DLNA servers, I would recommend UMS or just use the XBMC's Upnp feature to share media. The file is always streamed from the HP DV not the XBMC client.
Various backup solutions are available (Google is your friend) but I find CRON Rsync jobs as easy as anything else.
Wow I need to stop writing now. I have probably only imparted a fraction of the possibilities above. Don't be too harse this is my first big post. Probably too big! Forgive spelling grammar etc.
Cheers and enjoy your new HP RocketNAS
Spart
Oh, forgot to add, that once you have finsihed copying the data from the 'spare' drive you can then add it to the raid array as a participant or a spare drive. Use this page
https://help.ubuntu.com/12.04/servergui ... ation.html to help and the linked guides. It is really simple if you take your time to understand the principles. Also the Ubuntu support community is very active and extremely helpful if you get stuck. Obviously if you setup your HP DV with 4 drives in the raid array you can also use the external esata port for additional drives.
Cheers
Spart