Disks with different sizes and controllers

I'm currently converting my old PC to a file server.
The PC has four hard drives:

1. SATA 80GB: already installed FreeBSD with ZFS on this drive.
2. SATA 250GB
3. SATA 500GB
4. PATA 160GB: connected on the Asus motherboard (P5KR) through a JMicron controller.

Questions:

1. Considering the different sized disks, what would be the best "mirror" layout.
I was thinking of mirroring the second disk with half of the third one, and the other half of the third one with the fourth one.
2. Is this ZFS mirroring going to work fine with the fourth drive?
 
You really shouldn't mix disk types (IDE/SATA) within the same vdev (mirror, in your case). The speed of the vdev will be limited to that of the slowest device in the vdev. IOW, your SATA disk will be "limited" to IDE speeds, as you cannot write anything to the faster disk(s) until the slower disk is finished.

You'd probably be better off using the 160 GB disk as a bulk storage or backups disk, and not use it as part of any mirror vdev.

Then create a GPT partition on the 250 GB disk. And 2 GPT partitions on the 500 GB disk (each 250 GB in size; make sure the size of the first partition matches that of the 250 GB disk). And create a ZFS mirror vdev with the first partitions on each disk.

Then, if you want, you can use the "extra" 250 GB as scratch space.

Or, if performance really doesn't matter, you can (be sure to label the partitions):
  • create GPT partition on the 160 GB disk
  • create GPT partition on the 250 GB disk
  • create 250 GB partition and 160 GB partition on 500 GB disk/list]
    Then:
    1. # zpool create mypoolname mirror gpt/160-disk gpt/160-partition
    2. # zpool add mypoolname mirror gpt/250-disk gpt/250-partition
That way, you have two mirror vdevs, one 160 GB in size, one 250 GB in size, striped together into one pool.

The downsides are that performance won't be that great due to head-thrashing and disk contention on the 500 GB disk, and if you lose the 500 GB disk, both mirror vdevs are then degraded.
 
Thanks for the feedback. I've already created two separated mirror pools.

The performance won't be really affected since it's for a home file server and I'm only writing at one mirror at the same time.

Yesterday I copied all my Images over the network and achieved speeds up to 100MB/s!
Average speeds were way over 40MB/s.

As soon as the hard disk prices are down again, I'm planning to add some bigger equal sized drives.
 
wondering the same, I paste my output of different commands to show how it is right now, but it will be some combination that let me not waste a lot of space and have some redundancy? or is OK like this (also dont know where large files will be stored, say I download some files of more than 100Gb)

Code:
tyoc213@bzd151:~ $ mount
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs)
/dev/gpt/efiboot0 on /boot/efi (msdosfs, local)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)
devfs on /compat/linux/dev (devfs)
fdescfs on /compat/linux/dev/fd (fdescfs)
tmpfs on /compat/linux/dev/shm (tmpfs, local)

Code:
tyoc213@bzd151:~ $ zpool status zroot
  pool: zroot
 state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       ONLINE       0     0     0
     nda0p4    ONLINE       0     0     0
     nda1p4    ONLINE       0     0     0
     nda2p4    ONLINE       0     0     0

errors: No known data errors

Code:
tyoc213@bzd151:~ $ zpool list zroot
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
zroot  1.52T  10.8G  1.51T        -         -     0%     0%  1.00x    ONLINE  -
tyoc213@bzd151:~ $ zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot               10.8G  1.46T    96K  /zroot
zroot/ROOT          8.91G  1.46T    96K  none
zroot/ROOT/default  8.91G  1.46T  8.91G  /
zroot/home           925M  1.46T   925M  /home
zroot/tmp           42.1M  1.46T  42.1M  /tmp
zroot/usr            983M  1.46T    96K  /usr
zroot/usr/ports       96K  1.46T    96K  /usr/ports
zroot/usr/src        983M  1.46T   983M  /usr/src
zroot/var            908K  1.46T    96K  /var
zroot/var/audit       96K  1.46T    96K  /var/audit
zroot/var/crash       96K  1.46T    96K  /var/crash
zroot/var/log        368K  1.46T   368K  /var/log
zroot/var/mail       156K  1.46T   156K  /var/mail
zroot/var/tmp         96K  1.46T    96K  /var/tmp

Code:
tyoc213@bzd151:~ $ gpart show
=>        40  2000409184  nda0  GPT  (954G)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    67108864     3  freebsd-swap  (32G)
    67643392  1932765184     4  freebsd-zfs  (922G)
  2000408576         648        - free -  (324K)

=>       40  976773088  nda1  GPT  (466G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528   67108864     3  freebsd-swap  (32G)
   67643392  909129728     4  freebsd-zfs  (434G)
  976773120          8        - free -  (4.0K)

=>       40  500118112  nda2  GPT  (238G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528   67108864     3  freebsd-swap  (32G)
   67643392  432474112     4  freebsd-zfs  (206G)
  500117504        648        - free -  (324K)

I mean, I can reinstall and try again, but wondering if I just should leave as stripe which I believe is raid 0??? or should I try another install option?
 
Back
Top