1

I have OCS Vector 150 with Ubuntu 15.04 installed on it. The drive is inserted into Transcend StoreJet 25S3 closure.

It's pretty comfortable for me to use it both at home and at work. Also I can simply attach it to any PC and have my own completely configured environment everywhere.

The issue is that this solution is too sensitive to power/connection losses caused by bad usb port/bad cable/real power loss/etc... That means that if I, for example, unplug the cable during some activity with the filesystem, like file downloading/compiling/copying files/etc, I will get completely broken filesystem next time I plug the drive again. I use ext4, but the filesystem breaks anyway. That looks like tons of errors after running fsck. fsck fixes these errors, but it never restores all files.

Even more (un)funny that file content could be completely messed between all files which were writing during the connection loss. Actually even between files which were reading. Once, I saw that dpkg binary contained some json, probably from firefox profile data. That makes the recovery pretty unnoing.

I try not to store any important data on the drive except that can be easily recovered.

When the armageddon comes, I use debsums to find broken system files (when the debsums/dpkg/zsh/etc are not broken theirselves :) ), reinstall appropriate packages, and pull from my git repositories some configuration files and scripts. As the ssd drive is pretty fast, it doesn't take a long time. If the damage is not huge, it could take less than 10 minutes to recover almost everything and make the system (at least looks) clean.

So the question, after this long story, is: what do you think could be improved? I know, there hardly can be a simple and nice solution, but I would greatly appreciate if you share your thoughts on the topic.

UPDATE 10 SEP 2015 At the moment I don't think that the reason of filesystem damage is in physical impact. I use the device mostly at home and at work and statistically it damages much more often at home than at work while the activity at work includes compilation, vcs pull/commits i.e. heavy disk I/O. Once, my collegue accidentally dropped the disk from the chasis during my usual activities. It had disconnected and I thought that it would cause a serious troubles. But when I connected it back and rebooted, fsck showed no error! At the same time, at home I booted into kubuntu from this disk only for a minute, opened browser, rebooted and voila! Lost about a couple of thousands of inodes.

The symptoms are pretty simillar to these: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/992424 and https://bugzilla.kernel.org/show_bug.cgi?id=42723

I saw almost the same that those guys saw:

[11742.577091] EXT4-fs error (sdc2) ext4_mb_generate_buddy:757 group 1, block and bg descriptor inconsistent: XXX vs YYY free clusters
[11742.577337] Aborting journal on device sdc2-8

Since the issue somehow depends on machine and I don't have any other clue, I inclined to believe that the issue is somewhere in controller logic/usb power or something like that.

The question now is: how to make the filesystem more reliable? Do you think that brtfs would help?

UPDATE 29 JAN 2016

I gave up. I took off left sides of chassis at home and at work and use SATA connections. No issues so far.

2 Answers 2

0

Would a high performance large capacity USB drive be an improvement? It weighs less, woudldn't flap around (as it needs no additional support) and will be relatively more secure in the USB socket. At 128GB the price is comparable and I doubt you could make full use of the performance of the SSD anyway.

ext4 will report errors but a journalised file system should be better than a non-journalised one in this case.

Perhaps Btrfs would be more suitable as it implements Copy on Write (COW).

1
  • Sorry for the late response. The drive doesn't hang on the cable, I put the enclosure on top of chasis and connect it to usb port with a cable. At the moment I even don't think that the reson is in physical impact. Please see my question update.
    – Grief
    Sep 10, 2015 at 18:44
0

Wow that sounds terrible. Ext4 is a journalling file system, but these do sound like issues with a non-journalled file system. We see this recently with people using exFAT on drives they switch between Windows and Mac machines and not being detached properly, some write operation still occurring, or like your scenarios.

It is surprising to hear that your power/connection can be so poor this would happen with any frequency. I have heard other people using external USB drives to run Ubuntu without trouble. To be clear, how often does it occur without any action from you, and how often is it from you disconnecting it purposely?

extundelete is a good tool for the limited options that Ext4 provides for file recovery, however this isn't a case of deleted data but corruption. If you (hopefully not) are going to try to live with this kind of turmoil, I would definitely try a file system that has better recovery options so that you have a better last resort option. I'm not sure what that would be for Linux. Btrfs is a great idea though. It wouldn't be a good last resort recovery option, but maybe the copy on write could save you some headache in the first place.

Also, I wouldn't expect it's hanging from the USB cable, right? (as was the impression I got in the other answer). It's not moving I hope. I have to ask. Any other things I'm not understanding?

1
  • Sorry for the late response. I had to get some statistcs :) And unfortunately I would say that it is totally random. I didn't find any clue except that with my work machine issue appears much more rare than with my home machine. But I can sometimes download game from steam and play the game at home without an issue or just boot at work and get broken fs in a minute. I always connect usb carefully so if the issue is in usb it must be somewhere in controller. And it doesn't hang, you are correct. I just put the enclosure on top of chasis
    – Grief
    Sep 10, 2015 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .