Not quite the video game of the same name. Sometimes it *feels* like a video game, but it's not. That would be too easy, and what fun would that be? No, this is referring to the adventure surrounding my hard drives, fstab and many hours of copying sizable amounts of data back and forth.
I set out with the single, laughable, purpose of getting my drives to mount consistently at chosen mount points. Certain programs -- Rhythmbox, Amarok, VirtualBox, and so on... -- get crabby about drives showing up at different mount points each time. More precisely, I get crabby about drives showing up at different mount points, especially when they're the ultra helpful variety: both 250G drives mounted with the label "250GB External Filesystem." "Duh." Since they were NTFS, it was more than a simple pain to change the label on them even with ntfsutils.
Because I've worked with linux in one form or another since 1995 (dual-booting between WFW3.11 and Slackware 2.3...on 850,000 3.5" floppies...), I thought I'd be OK editing my fstab in Webmin -- with which I've worked since 1998 or so, with little to no problems -- and, for whatever reason, boy was I wrong. Going in through the Filesystems module, I happily added mount points to each of the filesystem entries, as I'd done before, granted a bit of time before...I remember, fondly, finally moving to a 1.x version... At any rate, I think something got buggered up along the way because when I hopped into a shell and mounted -a, everything went to hell. Nothing mounted, properly, and the root was in read-only which caused the fascinating problem of exactly NO application or system function having privs to run...not even sudo. I could not even shut down. How sad is that?!
For starters, I simply wanted the two 250GB external drives to show up at consistent mount points. At the time, they were SDE1 and SDF1 (insert Robotech joke here...), so I thought I was safe in creating two happy directories in the /media directory -- Dagon and Azathoth, respectively -- and then having them mount there via the fstab. I was wrong. They merely mounted under their respective hardware IDs to the directories disk and disk_1. At this point, I figured, eh...fine. So, I went into the programs that needed to know where data was and felt safe, then, in pointing them to the drives. Apparently, that was a bad idea. The next time I needed to reboot, they mounted precisely opposite...not bloody useful.
It was at this point, I was sick of dealing with Kate or GEdit, so decided to go in through Webmin, and select precisely the mount points I wanted. This would be where the trouble hit. Something went bing, as detailed above.
Paring down fstab to its single / /dev/sda1 line, I set about to remedy this thing once and for all. However, I didn't know how complicated it would be. No...it's not that hard and the actually "taking care of it" was done in short order. It was the decision making process up to that point that was more than a little drawn out. The biggest question facing me was which filesystem to use. I was sick of the NTFS-to-linux latency and wanting everything happily native. That said, when it comes to native filesystems, there isn't a shortage. I could have chosen EXT2, EXT3, EXT4, ReiserFS, Reiser4, JFS, XFS and if I had put more effort into it, ZFS-Fuse.
I, intially, decided to format one drive to EXT4 and go from there. First, it should be noted that the throughput on the two external drives via USB2.0 when both were NTFS was at a paltry 3.5MB/s. Let's just say it took a while to copy all 117GB from on to the other. Once everything was copied over, GParted was kind enough to get the drive where I wanted in a matter of a few minutes, including setting the label to 'Azathoth' so as to give Gnome, at least, a reference for consistent mount locales. This will become important in a minute...
One thing that struck me, though, was how much ruddy space EXT4 thinks it needs to chew up just by virtue of formatting. A completely blank drive, it formatted under NTFS to 232GB. In EXT4, I ended up with ~220GB free. In looking in GParted's display, it shows that it's formatted to 232.88GB. Cool, right? It also shows that 161.94GB are unused with 70.94GB occupied. For those of us who have to use a calculator, that brings us to 232.88GB. Again, cool, right?
Well, one would think...look at a little discrepancy below... Yeah...Free space: 150.3GB as opposed to 161.94GB unused space. I guess my question is where did the other 11.64GB go?
So, then, it was necessary to think long and hard about the filesystem choice. I figured for Azathoth, we were going to be happy with EXT4 long enough to copy over all the data from Dagon in order to format Dagon to a native format...but which one?! I looked at the veritable merits, numerous blogs, several technical articles, a bunch of forum posts and the obligatory flame-war or two to see which one seemed to have fewer flaws. I finally settled on XFS for Dagon's new format, and thus set about getting it ready to be formatted and be happy. The throughput from NTFS to EXT4 was consistently around 11.0MB/s, which was a dramatic improvement over the NTFS-to-NTFS transfer rate (3.5MB/s, if you recall). So, once everything was copied over, I hopped into GParted and converted the ol' fish god to a faster, native filesystem.
In a stunning display of "what it says you're going to get is what you actually get," the XFS format seems to be consistent with the data... It formatted to 232.88GB, as it should, and when you do that maths, end up with 232.89GB, reflecting 84.69GB unused. When loaded in Nautilus, it shows that Dagon has, indeed, 84.7GB free. That's more like what I expected to see. There was only mild disappointment in the throughput speeds when I copied the files back to Dagon from Azathoth, averaging right around 9.5MB/s. It could have been a lot worse -- it could have been the NTFS transfer speed. Of course, it didn't help that I was copying over close to 950K files, a large contingent of which were smaller files which isn't XFS's strong suit. Of course, this can be tweaked through mount options and, really, it's not that big of a speed hit and I get the full reported size of the disk. That's all I could ask for.
So, the upshot is, to me, we'll see how the performance is, overall between the two drives, as that may determine who becomes what, should I feel the need to wipe drives, again. While I am currently enjoying the idea of having access to all the precious GB that XFS seems to offer that EXT4 seems to cordon off for who knows what, I am also all about discerning, really, which of the two is better for what I need. Virtual machines and so on will help me along with that decision...I'll keep you posted.
No comments:
Post a Comment