HP T5540 Thin Client running NAS4Free

HP T5540 Thin Client running NAS4Free

Here comes the next part of home NAS server setup based on HP T5540 thin client. We are setting up small home NAS here!, which will be a staring point to understand how network storage works. Our thin client should be enough for simple Samba sharing. I will focus here on setting up working Samba share with simple security access. You may find this howto useful for setting up Samba shares on NAS4Free in general, not only for our hacked thin client.

So, we have our sata port soldered in and we have a hard drive installed inside. There is still some configuration needed to make it all work. Initially we need to setup the system to boot from USB first. We need to connected thin client to the monitor and keyboard for configuring this. This is the only configuration we need a monitor and a keyboard for. We can fully configure our NAS over network! The default IP address it boots up with for the first time is 192.168.1.250. To connect to it, we should configure our PC with the same subnet IP address. Let’s say it will be 192.168.1.10. Now just connect our two devices with ethernet cable (it may go through existing network, but let’s just plug it directly) and power everything up. We have to be a bit patient before we open web-browser and type: http://192.168.1.250. My T5540 booted almost 6 minutes with the usb storage I used. After it boots, we should be greeted with NAS4Free login page.

initial-login

initial-login2

After logging in with default credentials (user: admin and password: nas4free) I first format my drive. In Disks|Management menu the first thing we have to do is “Clear Config & Import Disks”, so hard drives can be seen by the system. I have to warn you here. The existing data on the hard drive we use as storage WILL BE LOST.

disk-management1

drives-config

Following, I format my new additional sata hard drive as UFS filesystem because it is a native NAS4Free supported filesystem. Another supported filesystem is ZFS, but it is not recommended with x86 systems and with less than 4GB of RAM. Carefull here, as the system sees internal flash memory as boot drive and WILL allow us to format our liveUSB dirve we running it from!

One thing I’ve noticed, when we are booting thin client from liveUSB and if internal flash is kept inside intact, rebooting the system, takes us into winCE… If we wish to leave internal flash intact, we should never reboot the system, but power it down, and power it back up. It should be no problem unless you want to keep our NAS somewhere away. The solution for that, would be replacing internal flash with bigger one and installing our NAS4Free there (2GB recommended minimum for embedded install) and ditch liveUSB.

Let’s say my home router is configured with DHCP range from 192.168.10.50 to 192.168.10.150. We could use DHCP for our NAS, but it would give it a different address every reboot (IP can be set fixed with DHCP, but lets skip that subject for now). So, I just set it up with static IP address outside my DHCP range. All other network interface data (netmask, gateway) should be left as it would be configured over DHCP. If we want our NAS to access internet (useful for some services we may decide to run) we should also set DNS servers in System|General – in usual setup it is home router’s IP address.

After configuring network, let’s power off the server and connect it to our local network.

shutdown.jpg

When it boots again it should be accessible within our home network with the IP we gave it. Before we access it again with new IP we also need to set our PCs network configuration back to what it was!

Now is the time to personalise our NAS. First we change password for admin. I’ve left default username as admin, but it may also be changed.

We add one user to access our Samba shares we will configure (we may add users later on). Our user “user” will be configured with primary group “staff” as I will make shares fully accessible for this group.

We now need to create mount for our formatted data drive. Go to Disks|Mount Point and click “Add Mount Point”. We pick our data drive and mount as “Data” mount point. Our new user will be the owner of the “Data” mount point. We want the drive to be accessible only for our users, so I untick all “Others” permissions. One thing worth to mention. We can see a warning at the bottom that we cannot mount a particular partition – this is a partition on our internal flash memory and system will store its configuration there!

If we go now to System|Status we should see our drive mounted and almost ready to take our data 🙂

mounted-drive-status.jpg

It is time now to add shares! I prefer sharing separate folders inside the mount point, so we create three folders for sharing different data. We use NAS4Free shell command access to achieve our goal. In my opinion it is the fastest way and we have a great tool to do this. We just need to go to Advanced|Command. It is very powerful tool and we need to be careful in here. Let’s create “Music”, “Pictures” and “Other” folders inside our mount point. Default mount point for our drive is its name (we gave ours name “Data”) inside “/mnt” directory, so we should create folders inside that path.

Let’s use unix command to create directory. Type in command field: mkdir /mnt/Data/Music and click “execute” to create first one (Music). Just repeat it with the rest of the folders (mkdir /mnt/Data/Pictures and mkdir /mnt/Data/Pictures)

Now we need to fix permissions of newly created folders as they are created by admin and will not be accessible to user. Just type: chmod -R 770 /mnt/Data/Music and execute. This command will change the permission of all folders and content inside “/mnt/Data/Music” to be fully accessible (read, write and execute) for its owner and group, others will have no access at all. Repeat this step for other folders. Again The folders are created by user admin, so they are owned by admin and his primary group. We also need to change that. Another command is for changing the ownership of the folders. Type: chown -R user:staff /mnt/Data/Music in command field and execute. Again, repeat this step for other folders.

shares-created

Our folders are now ready to be shared as they are owned by user “user” and fully accessible for group “staff”.

Let’s go now to Services|CIFS/SMB and enable it. We can set here a Name and Workgroup for our server to be visible within Windows network. I already have Samba server which works as master browser inside my home network, so I disable that functionality here. I disable Large read/write as it proved to be unstable for our thin client, but enable “AIO”.

Click Save and restart and we can configure shares in Services|CIFS/SMB|Shares.

cifs-shares1

When we click an “+” button, we will be presented with share configuration screen. Just type Name, Comment and choose Path for it. I also disable Guest access. Add button will add the share. When we repeat it for all our folders we need to apply changes.

Now we have our shares configured and we should be able to access them with our nas4free configured username and password.

We can access it from different operating systems as it is seen above. Windows may need some configuration change for us to be able to access the shares.

win10-enable-user-samba-access.jpg

After booting and tweaking it a bit, the system had to settle (we are running on 512MB RAM and 512MB SWAP!) before achieving best performance… I am actually quite surprised with the data copying speeds I am getting from and to our little NAS. I haven’t done extensive tests, but see yourself on screenshots.

copying-performance-win10-to-nas
Copying to NAS
copying-performance-win10-from-nas
Copying from NAS

I think they are pretty decent speeds considering it is just a thin client and it takes only about 15 watts of power fully loaded! In my opinion, it is more than enough for home setup.

On top of file sharing our NAS can do some more things, which I will try to show in the next part.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s