Jump to content

Recommended Posts

Posted

Hello !

I recently reimaged my BPi M1 with the vanilla headless Debian Jessie from Armbian. But I have two problems:

Main problem (the worst): I have a RAID SATA to USB enclosure (this one: BS-EHD-35/DUALB). After some times and randomly, the drives stops spinning and the enclosure stops itself. I've disabled any power management on hard drive, setup a cron job to write a file every 5 min, disabled autosuspend in usb core...

I didn't have this problem with the legacy kernel. I cannot downgrade to it, because I'm using BTRFS with some non-compatible extensions. Note: this is a server with apache, Deluge, Plex and Sonarr.

Side problems (I can live with if the first is OK): Also, if the drive isn't connected, the BPi won't boot, and after the enclosure stops, the BPi hang and need a force reset to remount the drive and restart services. Tried a udev rule to automate it, but no luck.

 

Don't understand why the enclosure stops itself, it's not really documented, and tried everything I could think.

 

Thank you,

Arno

Posted

BPi M1 has a real SATA port and 2 USB host ports. Simply throw this USB-RAID thingie away and connect disks directly (how should adding another single point of failure -- this BS-EHD-35/DUALB thingie that causes problems -- help when it's about the R in RAID?)

 

Trying to backport btrfs to 3.4 is even more insane than trying to use crappy RAID enclosures. Simply use btrfs own RAID 0 implementation and try to get an UASP capable USB-to-SATA bridge for the disk that has to be accessed through USB.

Posted

Hmmm yeah...

But I would say that I'm really low in money (in fact I'm not even 18) and I'll need to find SATA cable and SATA power cable too... I would also need a new USB case. The problem remaining is I need a coolling case for the SATA HDD I can't leave it stand on the floor. Since it worked on previous kernel, I'm wondering if there is a software/kernel correction possible. I'll check prices and possibilities and evaluate if it's worth.

Posted

But I would say that I'm really low in money

 

Then why you started with this RAID BS anyway? I would suspect this USB RAID enclosure is somewhat expensive, isn't it? In my personal opinion RAID with this type of devices is fooling yourself (saying that looking back at experiences with RAID in professional environments for over 20 years), everything already said in this thread here: http://forum.lemaker.org/forum.php?mod=redirect&goto=findpost&ptid=11857&pid=71617

 

If you're low in money compensate with time and learn why those RAID attemps are crap and why 'business continuity' can't matter that much. Better replace crappy hardware with a good concept (relying on btrfs or ZFS). If the data on the disks has any real value better drop any host implementation that lacks ECC DRAM since without you can forget about data integrity.

 

AFAIK the least expensive RAID implementation that does not suck is still a HP Microserver (with ECC DRAM!)

Posted

BTW : you have not even explained how you use and configure your enclosure (without RAID, spanning, stripping or mirroring), if your root fs is on SD, if you have logs, if your system is a production or test/learning system - and if you have backups and storage space elsewhere to reconfigure your system ...

 

And it seems you have differents problems with boot, disk failure or bus failure, and architecture with btrfs, raid ...

Posted

One question : I never used that sort of enclosure. How do you get logs on (or even configure) a complex stripping/mirroring system that only expose a usb storage interface to the system ?

Posted

Sorry this is a RAID1 system. On the enclosure you have two switchs with ON/OFF positions. So you can have basically four modes:

- JBOD

- RAID0

- RAID1

- And both discs appear independently in the system.

Root FS is on SD, on the hard drive there is only datas. Logs are not really useful, but might try to backup all of them (dmsg is empty thought). I would say this a production AND a learning system since it's my personnal server but sometimes I add some things in YOLO-mode.

I have a backup of configs, and of the datas of the hard-drive (but please restoring the hard drive is a real pain since 1/3 of it is in cloud, another 1/3is on a friend's computer, and 1/3 on mine. But as the disk is in BTRFS, I need to use Linux, even with a virtual machine sometimes.

Also the RAID enclosure was at 30€ (40 dollars maybe!!!!!) so not expensive AT ALL.

I'm just using RAID1 because discs are too buggy and one of them is throwing errors, but in fact, I don't have data that REALLY need to be backed up urgently in 5 clouds storages and 10 differents hard-drives. This is just like movies, musics...

For complex mirroring stripping system, forget about it: this is just basic and you cannot really anticipate what will be the reaction of the chip in any case (like mine).

Posted

"I'm just using RAID1 because discs are too buggy and one of them is throwing errors"

 

Well what is the us of mirroring a good disk on a bad one ? You just reduce the security of your data instead of improving it. And unless the system crash, I would be surprise you dont have any message about usb or sd in syslog.

Posted

I'm just using RAID1 because discs are too buggy and one of them is throwing errors

 

If a disk starts to throw errors it's time to throw the disk away. Only reasonable solution to deal with this problem :)

 

Your USB RAID enclosure is the worst you could do in such a situation since it will prevent you from getting further errors reported (I don't know of a single cheap/crap RAID implementation that supports SMART reporting and self-tests) and UNCORRECTABLE data corruption might occur since most if not all of the cheap/crap RAID-1 implementations simply write data to two disks but read only from one later (if this is the disk that already throws errors then you're lost at this point, at least btrfs will tell you that your data is corrupt unlike most other filesystems that do not even realize that data is corrupt).

 

When you're dealing with a failing disk (which is simply insane, analyse the problem or throw it away!) then by refraining from using a cheap/crap USB-RAID implementation btrfs (or ZFS) could help: simply connect both disks directly to the host and use btrfs' own raid-1 implementation. In this case btrfs will write to both disks (data and checksums), then later read data and checksum, thereby detecting corruption, then reading from the 2nd disk, returning the corrected data to the OS and immediately repairing the data on disk (by remapping the failed blocks and storing the data again in redundant form somewhere else on disk). In this mode you can also run SMART selftests and a periodical scrub too.

 

And this RAID-1 implementation is still moronic since RAID is useless crap when you're not running a business and need availability. Instead of wasting one disk for (pseudo-)redundancy use one disk for data and the 2nd for backups (preferrable at another location). Since you already use btrfs it's soooooo easy by doing snapshopts and transferring them to another disk or location (btrfs send/receive feature). But again: Relying in your situation on a crappy USB-RAID box is the worst decision anyway.

 

For all these cheap/crap USB-RAID enclosures there exists only two use cases:

  • throw them away as fast as possible
  • do some DIY enhancement (most importantly by throwing away the crappy RAID controller inside and then re-using the enclosure for direct connections to the host)
Posted

Yeah, I think this is what I will do. I'll just change my config. And switch to BTRFS own's implementation.

This will be the simpler and less-dirty implementation.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines