In the past year there have been quite a few changes to my life, some certainly for the better and others not so good. One of the positives that’s come out of everything is that I’ve become quite a bit fitter by taking up running. Last year I took part in 10K Birmingham run in April 2016, the 10K Black Country Run and the Birmingham Half Marathon in October 2016. I didn’t exactly post jaw dropping times, however I’m halfway there as one of my goals in life is to complete at least one Marathon. This year I’ve decided to sign up for Tough Mudder which can only be described as 12 miles of torture. Whilst I’m at it I mayt as will sign up for the Birmingham International Marathon, so I’ve got that to look forward to in October. Over the coming months I’m going to take part in a few more organised events as I really need to get some proper training in if I’m going to post an acceptable time.
We have been using QNAP NAS devices as near line storage for our customers online backups. We have recently stumbled across a slight inconvenience when the NAS device runs out of disk space and becomes unusable. Now you would like to think you could just login to the NAS via SSH or SMB share and delete a file to make some space. Unfortunately the SMB’s shares weren’t available and I couldn’t browse the complete file structure via WinSCP to delete a specific file. I could login to the NAS via the web interface, however I could view the files when selecting the shares. I had the option to delete a share, but I didn’t really want to lose three terabytes of data.
Below is the official line from QNAP support, obviously I take no responsibility for any data lose if anything goes wrong.
- Power off NAS remove all disks then power on NAS WITHOUT disks download and install Qfinder http://download.qnap.com/Storage/Utility/QNAPQfinderWindows-4.0.1.0530.exe
- After a short beep and a long beep, plug the disks back to NAS one by one in original order push in till the previous HDD led flashes solid green.
- Run QNAP Finder, it will find the NAS
Note: Do not re-initialize when the QNAP Finder prompt a message, if you have some useful data in the disk
- Connect to the NAS via SSH port 22, login as admin password admin, I use a popular SSH client called putty which can be downloaded here http://www.chiark.greenend.org.uk/~sgtatham/putty/
- Run commands bellow
# config_util 1
# storage_boot_init 1 (wait 30sec and press enter)
# storage_boot_init 2
- Download and install WinSCP which can be found here http://winscp.net/eng/download.php
- Login to the NAS with the IP Address on the screen and use the username admin and password admin, navigate to /share/MD0_DATA/ and delete a couple of files to free some space. There needs to be at least three gigabytes of free disk space for the QNAP NAS to function, reboot the device and all will be good.
I hope this helps.
In recent months both myself and powershell are becoming best buds. I love the way how it makes my life so much easier. I’ve been asked by plenty of customers for a comprehensive list of mailboxes on their IT systems, you can find out by entering the following powershell command on Microsoft Exchange 2007, 2010 and 2013 servers:
get-mailbox –resultsize unlimited | get-mailboxstatistics | select-object DisplayName,TotalItemSize,LastLogonTime | Sort-Object DisplayName
The above command will display a list of mailboxes sorted by the DisplayName field, the size of mailbox and when they last logged on.
If you would like to output this to a text file to send to someone you can use:
get-mailbox –resultsize unlimited | get-mailboxstatistics | select-object DisplayName,TotalItemSize,LastLogonTime | Sort-Object DisplayName > C:\list-of-mailboxes.txt