Thursday, October 3, 2019

How to format large (2TB+) drive on RHEL 6 and 7 Linux

This will work for USB drives, and internal drives too.

From https://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html

umount /dev/sdb
parted /dev/sdb # make sure it's sdb
mklabel gpt
unit TB
mkpart primary 0.00TB 4.00TB # Change 4 to whatever your drive size is
print
quit
mkfs.ext4 /dev/sdb1
mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1
df -k # Verify the drive size is correct

(Edit: Previously I had a typo in the title and said 2GB+ instead of 2TB+)

How to mount an Exfat USB drive on RHEL 6 or 7 Linux

sudo -i
yum group install 'Development Tools'
yum install fuse-devel gcc autoconf automake git
cd /usr/local/src && git clone https://github.com/relan/exfat.git
cd exfat
autoreconf --install
./configure --prefix=/usr
make && make install
make clean

or
[for RHEL 7]    yum install https://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
[for RHEL 6]    yum install https://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

From https://access.redhat.com/solutions/70050