RAID on files instead of HDDs? Is it possible? How?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
RAID on files instead of HDDs? Is it possible? How?
Hello.
I need ultra safe storage for backups. I came with idea of RAID in mirror level on 6 devices, but here the problem starts. I have 6 HDDs, but all of them contain data and only 5 of them could repartitioned - 6th cannot be, as data, which is there won't fit anywhere else. So I came up with idea, that I would use 6 file-partitions. Now how make dm or lvm use it? Basically all of them are 5GiB files (should be enough for several months or even years).
RAID is not designed as a backup system. it is intended to provide fault tolerance for an running system in the even of one or more physical drive failures. RAID can be used with partitions instead of entire drives. Just specify the partitions to be used as the RAID devices when creating the array.
Though from your intended purpose, you would be just as well off rsynching your data to a secondary storage system (additional HDD, external HDD, NAS) as well as to some form of off-site storage be it an off-site server or cloud account.
First of all. I stated, that partitions go out of question, as one HDD won't ever be partitioned (I would have to loose data to do that). I have NAS on those those drives.
Second rotating isn't solution! I need backup of every change made to system, not just last one. It is not just failure-proofing, but it is simply store every change.
I guess you could make files and mount them loop or fuse and then construct an array that way.
To get every change though you ought to look at some other file system. ZFS might be a solution. It will take a lot of resources to rsync or otherwise copy all this. Software raids tend to be cpu intensive.
The reason you don't see thousands of web pages devoted to this idea is because of what was stated above. It kind of stinks from an admin point of view. But you are welcome to try.
I felt your response was in anger. I guess that is just me.
No my response wasn't in anger. Simply need to make hard point why I need it that way not the other. I thought about btrfs, but it is not real solution, casue btrfs isn't stable yet and fsck isn't ready yet. ZFS is going out of question, as there is no support in kernel for ZFS yet (maybe in 3.3, but I dislike fresh branches - I have learnt, that they are free of errors).
At the moment I am using 3.2.14 and it won't change any time soon - I just started to use it and I tend to run on single boot for weeks even for desktop (that is why its hard to separate me with Virtualization), simply rebooting GNU/Linux, seams like joke to me (it is designed to run and run and run, even in case of almost grave errors).
Maybe I would be able to shift all data around and back, then I would have two LVM arrays (one for RAID0 and one for RAID1). RAID0 would used mostly for building software (journalled data - it is bit slow) and RAID1 obviously only for backup.
P.S. I am security and data integrity obsessed, so I am using acl, journal checksum and journalled data to prevent data loss and SELinux to secure my servers (and quite big set of IPtables and protected keys for SSH - no passwords for SSH).
my suggested approach:
-scrap the existing partitions on each of the 5 devices that you can afford to do so on.
-build a RAID6 using those 5 devices.
-format and mount
-copy the big data that you have stuffed on device #6 over to your newly created RAID6.
-confirm both sides match
-scrap the partition on device 6
-add it to the RAID 6 as a new member
-expand your RAID to use all available device space
-expand your filesystem to use all available RAID space.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.