nixers
Logical volume management on NetBSD - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Operating Systems & Administration (https://nixers.net/Forum-Operating-Systems-Administration)
+--- Forum: BSD (https://nixers.net/Forum-BSD)
+--- Thread: Logical volume management on NetBSD (/Thread-Logical-volume-management-on-NetBSD)


Logical volume management on NetBSD - Tmplt - 27-09-2017

After a Western Digital sale I managed to get my hands on a decently sized HDD in preparation for a NAS I'm gonna build. The plan was to use OpenBSD and a logical volume manager so that I could just throw all disks in a pool and easiy add more when I have more drives, but that is apparently something OpenBSD lack. Instead, I found that NetBSD has a port of the Linux LVM2 tools. Neat! But when it comes to redundancy I'm still a bit miffed. A probable general LVM question, but I don't know if the NetBSD port is 1:1.

I can't setup a good redundacy with the drives I have currently — 6TB + 2x 1TB + 4TB. Is it possible to configure redundacy when I have the drives for it, or must this be done during initial LVM configuration?

When I have multiple drives in a pool, which are the actual data written to. Are they all written to ala RAID0, or is only one drive in use until it's filled up? I presume this is configurable? I'm surprised I haven't found much on this, but it might just be a case where I don't know what to search for.


RE: Logical volume management on NetBSD - z3bra - 27-09-2017

LVM purpose is not to provide redundancy, it only abstract çs the concept of "physical disk". You'll want to use software RAID1 for that.

I suppose that LVM will write to the first disk is the group, then second when its full, and so on. I suppose that you just cannot rely on it though, and assume that if you have 3Tb of data, and 3 disks of 2tb, 2tb and 4tb, the data will only span accross the fiest two ones...


RE: Logical volume management on NetBSD - Tmplt - 27-09-2017

I see. Perhaps I should look at a solution that has redundancy in mind. I initially dismissed ZFS because extending with additional drives in the future could get troublesome. I'll have to look into it again. FreeNAS might be a good idea.


RE: Logical volume management on NetBSD - josuah - 28-09-2017

another take would be to act above the filesystem, by rsync-ing the data across the drives with a cron job. This would not be instantaneous, but would work on ANY os and any size of hard drive, and be very flexible: if you have 4TB + 2TB + 2TB, you can replicate the first half of the 4TB on the 2TB, and the second half of it in the second 2TB.

But then you need to manage which set of file you want to store into which hard drive. 'du' is you friend, then I guess.


RE: Logical volume management on NetBSD - josuah - 28-09-2017

Another take on this is object storage, like camlistore (as in the newsletter) or http://upspin.io or the like.


RE: Logical volume management on NetBSD - venam - 29-09-2017

If you have money to spare you could go with a hardware solution like a hardware RAID controller. It is less flexible but would remove the pain of having to set it yourself with LVM and software RAID.


RE: Logical volume management on NetBSD - Tmplt - 14-10-2017

A perhaps boring result, but I decided to got with FreeNAS. Nevertheless, thanks for your recommendations.