Solved How can I group two or more hard drives to create a single large volume ?

Hello to everyone.

Actually on my PC there are two ssd disks. This is the first one :

Code:
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors

Disk model: CT500MX500SSD4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BBA90E37-C001-4004-823E-33D506019084

Dispositivo Start      Fine   Settori   Size Tipo
/dev/sda1      64      1023       960   480K EFI System
/dev/sda2    1024 976773134 976772111 465.8G OpenBSD data


and this is the second one :


Code:
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 564A20C2-6040-11EC-9A4A-E1D55EE21F22


Dispositivo  Start      Fine   Settori   Size Tipo

/dev/sdb1     2048    264191    262144   128M EFI System
/dev/sdb2 264192 976773119 976508928 465.6G sconosciuto

My question is easy: How can I group these SSD disks to create a single large SSD disk in FreeBSD? Since I still haven't had the chance to study and try the ZFS file system I would like to know if I can do it using UFS2. But u you can also explain how can I make that using ZFS, eventually. I want to evaluate the easiest and quickest way and not destructive method (if there is any) for the moment. I prefer to don't destroy those disks because they are occupied by OpenBSD and DragonFlyBSD. I mean, the disks should be for sure formatted using UFS2 or ZFS, not NTFS or ext3/4 because FreeBSD has problems writing on these fs.
 

thanks. Can u suggest a more structured tutorial ? I can't do nothing by reading the man pages and nothing more than that. I'm not able to use the informations stored there,in that shape,to put together all the necessary informations in a costructive way,to find the correct procedure for achieving the goal.
 
better. But I'm not sure that it will be enough. It seems that I can do that only by destroying all the content on those disks,right ?
There's no such thing as non-destructive stripe, doesn't matter the file system.
The closest you can get (and isn't available to FreeBSD) is extend a filesystem and afaik only lvm and btrfs supports this (with different partition sizes, with the performance penalty at some point).
 
"FreeBSD Mastery: Storage Essentials" by Michael W Lucas is one of the best books I've ever used. Talks about a lot of stuff that is taken for granted as "Common Knowledge" and makes it easy to understand. There is information about GEOM stuff in it.
He also has a couple of books for ZFS which are some of the best I've seen
 
Can boot and run for example OpenBSD on a RAID0 disk ? If I should destroy the content of two disks,I want to know if I can reinstall OpenBSD after having grouped them.
 
1)
I know about port sysutils/fusefs-mhddfs but I have never used it.
Code:
mhddfs - Multi HDD [FUSE] File System

File system for unifying several mount points into one
This FUSE-based file system allows mount points (or directories) to be
combined, simulating a single big volume which can merge several hard
drives or remote file systems. It is like unionfs, but can choose the
drive with the most free space to create new files on, and can move
data transparently between drives.

2) In my opinion, another easiest non-destructive way is:
Create two large files on the every SSD - dd if=/dev/zero of=fileX bs=1g count=10
Map the files to the devices using mdconfig() - mdconfig -a -t vnode -f fileX
Create a geom stripe (RAID0) from the two mdconfig's devices.
Create filesystem on a RAID0 ( [fdisk, bsdlabel,] newfs)
Mount and use it, but keep in mind that you will lost all RAID0 data if any SSD fails.

3) True hard way if you want to use the both disks as RAID0 and boot from them.
Create on the 1st disk two partitions: 1st partition for FreeBSD base system, and second for other data.
Use bsdlabel for cloning the bsd partitioning scheme from 1st disk to the second one.
Create a RAID1 from the 1st patritions;
Create RAID0 from the 2nd partitions
Copy or install FreeBSD on RAID1 partition and enjoy. System will boot from RAID1, and data will be stored on RAID0.

I have a similar system with 3 disks, but with RAID1 and RAID3:
example:
Code:
root@super1u.com:/root# gmirror status
           Name    Status  Components
mirror/6Gx3x1TB  COMPLETE  ada0s1a (ACTIVE)
                           ada1s1a (ACTIVE)
                           ada2s1a (ACTIVE)

root@super1u.com:/root# graid3 status
        Name    Status  Components
raid3/R3x1TB  COMPLETE  ada2s1d (ACTIVE)
                        ada1s1d (ACTIVE)
                        ada0s1d (ACTIVE)

root@super1u.com:/root# mount
/dev/mirror/6Gx3x1TB on / (ufs, local)
/dev/raid3/R3x1TB.eli on /usr/home/backup/R3x1TB (ufs, local, soft-updates)

root@super1u.com:/root# df -h
Filesystem               Size    Used   Avail Capacity  Mounted on
/dev/mirror/6Gx3x1TB     5,8G    2,9G    2,4G    54%    /
/dev/raid3/R3x1TB.eli    1,8T    1,5T    183G    89%    /usr/home/backup/R3x1TB
 
Can boot and run for example OpenBSD on a RAID0 disk ? If I should destroy the content of two disks,I want to know if I can reinstall OpenBSD after having grouped them.
Are you thinking about dual booting FreeBSD and OpenBSD on the same resources? I'm not sure how that would work if you do things with FreeBSD GEOM and then also install OpenBSD. I don't think OpenBSD understands FreeBSD GEOMs.
 
Are you thinking about dual booting FreeBSD and OpenBSD on the same resources? I'm not sure how that would work if you do things with FreeBSD GEOM and then also install OpenBSD. I don't think OpenBSD understands FreeBSD GEOMs.

what about mhddfs ? can I dual boot FreeBSD and OpenBSD if these oses are installed on a mhddfs fs ?
 
what about mhddfs ? can I dual boot FreeBSD and OpenBSD if these oses are installed on a mhddfs fs ?
I'm not sure, but gut reaction is "no". You'd need a freebsd-boot type partition to boot FreeBSD, UFS and ZFS have gptboot/gptzfsboot loader images, I don't think there is a "mhddfs aware" loader image.
 
Once you get complicated enough to want to stripe UFS across multiple drives, you're really going to benefit from using ZFS now.

All that being said, you should be able to make individual partitions to use FreeBSD's software RAID to host a UFS partition and have the other partitions dedicated to OpenBSD (and whatever it might have). These are different operating systems and do not use the same technologies.
 
I think you better, put a separate HD for OpenBSD, he does not understand the geometry, from FreeBSD, it will go over the data, thinking, that's just more, One Disk, it will identify as a separate disk from the data.
 
Back
Top