CentOS 7: How to support a 3tb, 4tb, or 5tb drive, as a single partition, without UEFI

6,003

There may be drive-capacity limits on some older controllers, but I don't know the details of that. My recommendation is to try plugging your new disk into the existing motherboard and see if it works. If Linux recognizes the disk and gives you access to its full capacity, then it should be fine with no new hardware, beyond the disk itself. If you have problems, a new disk controller card would probably work around those problems. A new disk controller card might also be faster than what you've got, but you'll need to investigate the specs for your current computer (both its disk interface and whatever slot you might use for a new plug-in card) vs. what's available as a plug-in card today.

As to copying your current disk, Linux can boot fine from a GUID Partition Table (GPT) disk even on a BIOS-based computer, so you should be able to do the following:

  1. Partition the new 5TB disk using GPT. You can do this with gdisk (GPT-only), parted or GParted (GPT or MBR; you must explicitly tell the tool to use GPT), or recent versions of fdisk (I'm not sure if it will default to GPT on such a big disk; you may need to tell it to use GPT).
  2. On the new disk, be sure to create a ~1MiB BIOS Boot Partition early on the disk. (Some BIOSes can't read beyond a certain point, so the BIOS Boot Partition must be early.) This is identified by a type code of EF02 in gdisk or by a "bios_grub flag" in parted or GParted.
  3. If your current installation doesn't use one, create a ~500MiB partition to be used as a /boot partition -- again, early on the disk. This is, again, required because some BIOSes can't read beyond a certain point (usually 2TiB for recent BIOSes, but really ancient ones have even lower limits). Because GRUB (or whatever you use as a boot loader) uses the BIOS to read the kernel, you must ensure that the kernel is readable to the BIOS; and as the kernel resides in /boot, creating a separate /boot partition and putting it below the BIOS's limit guarantees that the kernel will be readable to GRUB.
  4. Do a partition- or filesystem-level clone of the old disk to the new one. Be sure to not clone the whole disk or the partition table, just the partition(s) you want to clone. Note that if your current installation does not use a separate /boot partition, you'll need to move the contents of the /boot directory to your new /boot partition.
  5. Depending on how you copied things, you may need to edit /etc/fstab on the new disk to reflect new UUID values and, if you created one, your new /boot partition.
  6. If necessary, resize the partition(s) for the new disk.
  7. Re-install your boot loader to the new disk.

This is a fairly high-level description that omits numerous details. This is partly because you can accomplish the task with a variety of tools (emergency boot disks vs. your current CentOS installation, various partitioning tools, various partition- or filesystem-copying tools, etc.) and partly because I don't know all the details of your system or what tools you might want to use.

Share:
6,003

Related videos on Youtube

John
Author by

John

Updated on September 18, 2022

Comments

  • John
    John over 1 year

    My CentOS 7 server is running on a system that is non-UEFI and I need to clone a 500GB HD to a 5TB HD to be used as the new boot drive. What is the cheapest, least time-consuming option to support this? My mb is a older intel socket 775 MB and doesn't have UEFI. Can I get around having to buy a new MB + CPU + memory combo by using a HD controller card? How do I know if a particular controller card will support a 5TB HD? They don't explicitly specify drive-size support anywhere.