3TB + 4TB HDD - should I deploy ZFS?

I have a production machine at work that was running on a single 3TB HDD. Now I've added another 4TB drive into it. The 3TB drive has been used for 1,5 years at this point, the 4TB is brand new.

I have about 1500 GB of unique data (ignoring backups) on the 43 TB drive at this point. I'll be storing about 500 GB of archives from other machines on the network, giving the Samba shares for accessing their old files. It doesn't need to be fast, but should be redundant (I have the only copy of the data).

I'm not sure how I should organize the storage to maximize security of the data with what I have right now. I will probably be able to add another 4 TB drive to this machine in 2 years, it'd be good to be ready for that.

I basically need 3 different types of storage:

  1. System - place to boot and run my production Linux OS
  2. Data - place to store current projects and files served to other users on the network
  3. Archive - place to keep old projects (preferably with compression)
  4. Backup for system and current data, should I blow anything up by accident at any time on my main pool.
  5. Hopefully some redundancy for archive as well (as these will be only copies of old projects)

I'm thinking about partitioning my 4TB disk: 1 ТБ для SWAP, GRUB и ОС Linux 3 ТБ для ZFS And adding 3TB mirror across the whole 3TB drive for redundancy.

ZFS snapshots could to some degree replace my usual production files backups, that'd save me a lot of space probably. However - if anything happens to the Zpool, I am in big trouble.

I know I can create single disk vdev (on a 3TB partition on the 4TB drive) I can then move there all my data, freeing up my 3TB drive. I could prepare a boot and swap partition (not sure how to do this though right now though) in the last 1TB of my 4TB disk, the clear my 3TB drive, and add it to my zpool as mirror, gaining redundancy.

Does this sound like a good idea?

I have about 12 years experience using Linux, I have built my own Kernel and installed Gentoo, I use it daily for all my work with graphic design and media production, I do a bit of system administration at the company where I work, but I would by no means call myself as sysadmin. I don't have a lot of ZFS experience - I mostly deployed it for fun on USB flash drives and USB hard disks in the past few months, trying to learn about it as much as I can.

An alternative is to just use the 4TB drive as an archive + backup storage with EXT4 + SWAP (to reduce the stress on the main drive - the SWAP is particularly been grinding hard at times for the past 1,5 years).

That could be a better idea, as it's way simpler and doesn't require me to move all my system to a new drive, and I still have redundant copies (though no filesystem compression or checksumming). Also I know the 3TB drive will probably die first so I'd rather move everything to the new 4TB one to put less stress o n the old 3TB one, so it can last longer.

2
задан 8 February 2018 в 14:59
1 ответ

Есть несколько способов использовать второй диск емкостью 4 ТБ. Один из возможных способов - это то, что вы упомянули, установить новый диск емкостью 4 ТБ, а затем скопировать данные. Однако я предлагаю этот другой подход.

  • Скопируйте все свои данные из 3 ТБ в 4 ТБ
  • Установите исходные 3 ТБ в качестве загрузки с ZFS
  • Скопируйте данные из 4 ТБ обратно в 3 ТБ (теперь с ZFS)
  • Настройте 4 ТБ как зеркало 3 ТБ. Вы потеряете 1 ТБ использования из 4 ТБ, но позже, когда вы получите еще 4 ТБ, вы можете увеличить vdev

PRO:

  • Ваши данные находятся в безопасном состоянии на каждом этапе операции. На всякий случай предлагаем вам использовать rsync с флагом контрольной суммы каждый раз, когда вы копируете данные.
  • В итоге вы получаете RAID 1

Минусы:

  • Вы теряете 1 ТБ из 4 ТБ. Вы можете установить ZFS в раздел размером 3 ТБ, но это ограничит вашу способность наращивать ZFS позже
  • . Это займет несколько раундов копирования ваших данных, поэтому может потребоваться немного времени (хотя в основном машинное время)

Если данные действительно важны, я бы также предложил использовать резервную копию на 3-м диске, если он у вас есть, или в облачной службе, такой как B2. Вы упомянули 1500 ГБ. Если посмотреть на цены B2, похоже, что это будет около 7,5 долларов за такой объем данных. После завершения операции и перехода в конечное состояние (RAID 1 на ZFS) вы можете удалить резервную копию на B2, если хотите (хотя, вероятно, было бы неплохо просто продолжить резервное копирование). https://www.backblaze.com/b2/cloud-storage-pricing.html

Самое важное в этом упражнении - убедиться, что ваши данные в безопасности. Прямо сейчас у вас есть только один диск, поэтому долгое бездействие тоже нехорошо.

Переход с ZFS дает вам снимки состояния и RAID1, что может быть очень полезно по сравнению с тем, чтобы, например, вставить второй диск и просто выполнить синхронизацию с ним или используя его как дополнительное хранилище. Когда дело доходит до резервного копирования, моментальные снимки значительно экономят место; особенно если большая часть ваших данных не меняется.

2
ответ дан 3 December 2019 в 11:26

Теги

Похожие вопросы