Flexion.Org Forums are Open
Occasionally readers of my Wiki or Code want to comment on what I’ve published but I don’t have a suitable way for them to contact me. So I have opened a small forum to capture any feedback or comments from readers, this way anyone can to benefit from what gets discussed.
Recovering reserved space from ext4
The Ext4 file system, like Ext3, reserves 5% of the blocks on the file system for the root user. The reserved blocks are there for root’s use as a safe guard if the filesystem gets full, it provides some wiggle room to enable the really important programs to still function. But in some cases there’s not much point in having space reserved for root.
I’ve recently upgrade my workstation with a 6TB internal RAID 0 array for data storage (music, videos, photos, etc) and an external 6TB RAID 0 array as a backup. My OS boot from a 1TB drive. For my 6TB arrays I want the maximum available storage and was interested to see what effect removing the reserved space would have. So, this is what I did.
First I made the Ext4 file system, mounted it and queried how much space was available.
sudo mkfs.ext4 /dev/sdh1 sudo mount /dev/sdh1 /mnt df -h
Looks like I have 5.1TB of available space.
/dev/sdh1 5.4T 186M 5.1T 1% /mnt
Then I unmounted the file system, removed the reserved blocks, checked the consistency of the file system, mounted it and queried how much space was available.
sudo umount /mnt sudo tune2fs -m 0 /dev/sdh1 sudo e2fsck /dev/sdh1 df -h
Looks like I have 5.4TB available now, a saving of 300GB.
/dev/sdh1 5.4T 186M 5.4T 1% /mnt
Now, I could have simply created the files system without the reserved blocks in the first place, but I was interested to see the comparison.
sudo mkfs.ext4 -m 0 /dev/sdh1
Before you start removing the reserved blocks from your ext3/ext4 file systems do a bit a research first.
In: Linux · Tagged with: blocks, Ext3, Ext4, Linux, reserved, space
StarTech S354UER Review
I’ve ripped my entire CD collection to MP3 and I’m in the process of ripping my entire DVD, Blu-Ray and HD-DVD collection to MPEG-2 TS files so that I can stream everything to my PS3 using MiniDLNA. I currently have this data stored on an internal 2TB volume and backed up to an external 2TB volume. I currently have just 360GB remaining capacity and I ‘ve only imported half my DVD collection and one Blu-Ray. I need more storage.
I wanted to keep the same backup method, large internal volume backed up to a large external volume of the same size. I opted for Samsung Spinpoint F2 EcoGreen (HD154UI) drives because they are relatively inexpensive, low power (therefore lower heat) and quiet.
I decided to get 4x 1.5TB drives for the internal volume and stripe them to give 6TB of storage and I went looking for an external box in which I could install 4x 1.5TB drives and also stripe or span them. That mean’t a multi disk external enclosure, with some kind of RAID, supported by Linux and that isn’t too expensive. A tall order as it turns out. After lots of research I finally found the StarTech S354UER which on paper appears to do what I required and a good deal more. Here is some blurb from StarTech…
- Compatible with Windows, Mac, and Linux operating systems
- Fan control button to enable manual control of the fan and switch between the three fan speeds
- Internal three speed 80mm fan with automatic or manual controls
- Multiple LED indicators to provide RAID information, hard drive activity, HDD Status, RAID rebuild status, fan settings, and interface in use
- No software required
- Package includes 1x USB, 1x eSATA, 1x FireWire 400, 1x FireWrie 800 cable, Power adapter and cord, and the manual
- Plug-and-Play and Hot swap supported with USB 2.0, eSATA, and FireWire
- Push button raid configuration eliminated the need to disassemble the enclosure to upgrade your raid configurations
- Removable front cover for easy access to hard drive
- Rugged aluminum chassis
- Supported File Systems:NTFS, FAT, FAT32, and ext3
- Supports four 3.5in hard drives up-to 2.0 TB each in size
- Supports RAID 0, RAID 1, RAID 3, RAID 5, RAID 10 (RAID 1+0), and Spanning
Normally, I will read reviews of different products and select something with a proven track record particularly when Linux support is required. I couldn’t find much in the way of reviews for the StarTech S354UER so I took a gamble and decided to buy one. Eeek!
In short it works and it is quiet. It is currently sitting no more than 50cm from me initialising a stripped array of 4×1.5Tb disks as EXT4. I can’t hear it but I have manually set the fan speed to low using the fan control buttons on the front on the chassis. The build quality is not great, but not awful either, but once the drives are installed and clamped in place they are very secure. It is impossible to tell if you’ve pushed the power button you have to wait and see if the device powers up/down to be sure. The fan speed controls work, but are inverted from what is documented in manual. Fan1 is documented as LOW in the manual but is actually HIGH.
Setting up the device was not quiet plug and play either but the issues I ran into may not be entirely the fault of the StarTech S354UER. My plan was to connect the enclosure via Firewire and as yet I’ve not been able to get the enclosure to be recognised via Firewire using Ubuntu Jaunty 9.04. However, I am a Firewire newbie so maybe more research required. I don’t have eSATA (yet) so I have the device connected via USB 2.0. Which does work.
One of my new hard disks turned out to be DOA. It took me a while to figure out what was wrong here. The StarTech drive failure light on the front of the chassis was illuminated, but I didn’t know how to tell which drive had actually failed. After some trial and error I found that there are four internal LEDs, one for each disk. Starting the StarTech with the chassis door open you can see the internal LEDs blinking as each disk is spun up and tested. If the drive failure LED on the front of chassis is illuminated look at the internal LEDs, then drive LED which is off denotes the failed drive. This information is not in the user manual!
Anyway, I replaced the drive and was now able to select my RAID level. Selecting the RAID level is done though a combination of DIP switches under a panel at the back of the unit and buttons on the front. It is a slightly fiddly process, but it does have the advantage that you can’t accidentally change your RAID levels and re-initialise the array.
In order to create a partition greater than 2TB you have to use GPT. I’d never encountered GPT before, but I found everything I needed to know on the page below.
I used ‘gparted’ to create my partition and format with EXT4 with the enclosure connected via USB 2.0. The whole process took ~1 hour.
As you will see from the link the quoted price makes this enclosure pretty expensive. Search around though, because I got mine of 50% less than the price quoted on the StarTech.com website. You do get a healthy selection of RAID levels, all the cables, screws, screwdriver and drive handles you require.
In: Linux · Tagged with: Enclosure, eSATA, External, Firewire, IEEE1394, Linux, RAID, Review, S354UER, StarTech, USB
Mediatomb vs. MiniDLNA
I have been using Mediatomb for nearly two years now but I decided to give MiniDLNA a whirl since it is a fully fledged DLNA server whereas Mediatomb is UPnP only. I am currently running both Mediatomb SVN and MiniDLNA CVS. So, how does MiniDLNA compare to Mediatomb?
- MiniDLNA is easier to compile, configure, uses less RAM and has less software dependencies than Mediatomb.
- MiniDLNA doesn’t currently support music play lists or Last.fm scrobbling. Mediatomb supports .m3u and .pls playlists but requires a 3rd party patch to add Last.fm scrobbling.
- MiniDLNA doesn’t support dynamic video thumbnail creation, which would be nice to have but is not essential, cover images are supported. Mediatomb supports video thumbnailing via ffmpegthumbnailer.
- MiniDLNA doesn’t currently have any transcoding support. This is of little consequence for me since I import video content into my library in a format natively supported by the PS3, either MP3, MPEG-2 TS or MPEG-4. Mediatomb does support transcoding but it is somewhat fiddly to setup and you can’t pause transcoded content.
- MiniDLNA works “out of the box” with the PS3 (and other DLNA clients) while Mediatomb requires some tweaking.
- Mediatomb’s default video import script doesn’t suit how I organise my video library, but MiniDLNA fit my video library perfectly.
So, as of today I am running both Mediatomb and MiniDLNA. Mediatomb is exclusively handling audio since playlist and Last.fm support are essential for me. MiniDLNA is now handling video exclusively. I’m very happy with the results but should MiniDLNA add .m3u/.pls play lists and Last.fm support I will switch everything to MiniDLNA
I’ve written up my notes on installing Mediatomb SVN (including Last.fm support) and MiniDLNA CVS on Ubuntu Karmic 9.10 Server, get them from the links below…
In: Audio & Video · Tagged with: comparison, DLNA, Linux, Mediatomb, MiniDLNA, server, UPnP, versus
Amazon Loves Linux Music Lovers
I’ve no idea when Amazon.co.uk lauched their MP3 store and I’ve no idea when they released their Linux client for downloading the MP3s you purchased. I don’t care, I just want to say I’m really impressed Amazon have considered us Linux users. Well done Amazon!
Not only that but the MP3s are DRM free, encoded using variable bit rates aiming at an average of 256 kilobits per second (kbps), album cover art is included with each song and the tracks are typically cheaper than iTunes. Well done again. Doubtless some would want an Open Source client and unencumbered formats such as Ogg and FLAC, but I’m pretty happy with what Amazon have on offer so long as it works. Which it does
However, the Linux MP3 downloader client is 32-bit only. Not so good, but it can be successfully installed in 64-bit Ubuntu. Here’s how I did in on Ubuntu Jaunty 9.04 64-bit.
wget -c http://frozenfox.freehostia.com/cappy/getlibs-all.deb dpkg -i getlibs-all.deb wget "http://www.amazon.co.uk/gp/dmusic/help/amd-installer-redirect.html/ref=dm_amd_linux_ubuntu?ie=UTF8&forceos=LINUX&callingPage=%2Fgp%2Fdmusic%2Fhelp%2Famd.html&linux_Ubuntu.x=1" -O amazonmp3.deb dpkg -i --force-architecture amazonmp3.deb getlibs /usr/bin/amazonmp3
In: Linux · Tagged with: 64-bit, Amazon, Linux, mp3, Store
DVD to MPEG2-TS Ripper for Linux
A while back I released a script that rips a DVD to MPEG-2 PS allowing the user to select one audio stream and one subtitle stream. Optionally the video can be requantised, using M2VRequantiser and an ISO image created. If creating an ISO image the chapters are also preserved from the original DVD. You can see the original post below.
I’ve just released an update to that original script which fixes subtitles in the original MPEG-2 PS mode but now adds the capability to rip MPEG-2 TS. The video stream can still be shrunk and in MPEG-2 PS mode the video is still
requantised but in MPEG-2 TS mode the video is re-encoded as H.264. Requantising is faster but can introduce artifacting. H.264 encoding is slower, but produces very good quality. I am currently re-importing my entire DVD collection, using this script, to my DLNA server using MPEG-2 TS and re-encoding the video to H.264. This gives me high quality rips at relatively small size (~3Gb) whilst preserving Dolby Digital 5.1 audio. Perfect for playback via DLNA on the PS3
Some things to be aware of:
- Subtitles are only supported in MPEG-2 PS mode.
- MPEG-2 PS files created by this script are DVD compliant.
- ISO files created by this script will preserve the chapters from the original DVD.
- The PS3 can only play DTS audio in MPEG-2 PS streams when they have been authored to DVD.
- The PS3 can only play subtitles in MPEG-2 PS streams when they have been authored to DVD.
- The PS3 can’t play DTS audio in MPEG-2 TS streams therefore this script will transcode DTS to AC3 when in MPEG-2 TS mode.
If you are running Ubuntu then I strongly suggest you add the Avenard repository to your system as it includes recent builds of mplayer and x264.
To download the script and find out how to make full use of it visit the release page below.
In: Audio & Video · Tagged with: DVD, H.264, ISO, Linux, MPEG2-TS, ripper, Script
Linux Hex Editors
We use hex editors daily at work, we are regularly cutting up data from flight data recorders for analysis or recovery. So when I find a new hex editor for Linux I usually give it a try. I happened across a blog listing Five GUI Hex Editors for Ubuntu today. Find out more below.
In: Linux · Tagged with: Hex Editor, Linux
Creating a JetDirect Server with Linux
I recently added a Wiki page explaining how I created JetDirect compatible server on my NSLU2 running Ubuntu Jaunty 9.04. You can find the wiki article on the link below.
The solution was to use p910nd, which is a small printer daemon that does not spool to disk but passes the job directly to the printer. It is particularly useful for disk less Linux workstations and embedded devices that have a printer hanging off them. Sounds ideal for my NSLU2
Timo posted a follow up comment about p910nd in an unrelated blog since he couldn’t find anywhere else to send feedback. So I’ve created this post so I can put his comment somewhere sensible
In: Linux · Tagged with: jetdirect, Linux, nslu2, server
Blogging and IM with Windows Mobile
This morning I find myself waiting around for a few hours with only my Windows Mobile phone for company. I wanted to IM some guys at work, but we use Jabber. A quick Google and I found Parlingo, a free multi protocol IM client for Windows Mobile. Perfect!
After having a quick IM with work I was so impressed with Parlingo I wanted to blog about it. Another quick Google and I had Travelling Blogger installed, a free Windows Mobile blog client that supports the WordPress API.
This blog post is the result
- http://www.palringo.com
- http://darrenjohnstone.net/travelling-blogger/
PS3, Mediatomb, Multi Zone Music streaming
PlayStation 3 firmware 3.00 added a new feature I was very excited about, multi-av output.
Today I finally got round to re-wiring the home cinema system to make use of this new feature. I now have the PS3 streaming music from Mediatomb with my A/V receiver sending audio to Zone 1 via digital inter connects and also sending audio to Zone 2 via analog stereo interconnects. Zone 1 is a 5.1 speaker setup and Zone 2 is a 2.0 all weather wireless speaker system which are often in the kitchen but also moved outside for parties. We have a party today
If Sony could just add Skype to the PS3 and allow the PSP Remote Play to output audio to both the PS3 and PSP (rather than just one of them) I would be very happy indeed.
In: Home Cinema · Tagged with: Mediatomb, multi av, multi zone, PS3




