#!/bin/bash # These times and sizes are for a 1 TB USB 3.0 external spinning hard drive. # Seagate Backup Plus Portable Drive Slim (Model SRD00F1) # User capacity (via smartctl) is 1,000,204,885,504 bytes. ########################################################################################################################### # Filesystem Time (secs) Total bytes Used Available In use (gparted) # #----------------------------------------------------------------------------------------------------------------------- # # btrfs 0.452 1,000,203,091,968 17,301,504 998,024,937,472 16.50 MiB 17,301,504 # # hfs+ 2.214 1,000,203,091,968 104,984,576 1,000,098,107,392 100.12 MiB 104,983,429 # # ntfs 2.544 1,000,203,087,872 98,095,104 1,000,104,992,768 93.55 MiB 98,094,284 # # f2fs 2.779 1,000,202,043,392 49,994,014,720 947,992,387,584 Unknown Unknown # # jfs 5.756 1,000,038,141,952 122,331,136 999,915,810,816 273.97 MiB 287,278,366 # # ext4 9.814 984,373,075,968 75,124,736 934,271,021,056 14.81 GiB 15,902,116,414 # # xfs 11.418 999,714,713,600 35,028,992 999,679,684,608 499.16 MiB 523,407,196 # # fat32 18.326 999,958,937,600 32,768 999,958,904,832 232.88 MiB 244,192,378 # # reiserfs 79.393 1,000,172,560,384 33,628,160 1,000,138,932,224 61.19 MiB 64,162,365 # # ext3 413.841 984,373,075,968 75,259,904 934,287,663,104 14.81 GiB 15,902,116,414 # # ext2 416.520 984,507,293,696 75,124,736 934,422,016,000 14.69 GiB 15,773,267,394 # ########################################################################################################################### # WARNING: This will permanently erase the disk! # Be sure that you are formatting the correct partition! # Double-check and then check again! DEVICE=/dev/sdd PARTITION=/dev/sdd1 MOUNT=/home/mmead/mnt #================================================== btrfs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: btrfs ..." time sudo mkfs.btrfs -f -L "btrfs" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### btrfs ..." sleep 2 #================================================== hfs+ sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: hfs+ ..." time sudo mkfs.hfsplus -v "hfsplus" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### hfs+ ..." sleep 2 #================================================== ntfs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: ntfs ..." time sudo mkfs.ntfs -Q -v -L "ntfs" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### ntfs ..." sleep 2 #================================================== f2fs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: f2fs ..." time sudo mkfs.f2fs -l "f2fs" $PARTITION sudo mount -t f2fs $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### f2fs" sleep 2 #================================================== jfs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: jfs ..." time sudo mkfs.jfs -q -L "jfs" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### jfs" sleep 2 #================================================== xfs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: xfs ..." time sudo mkfs.xfs -q -f -L "xfs" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### xfs" sleep 2 #================================================== fat32 sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: fat32 ..." time sudo mkdosfs -F 32 -n "fat32" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### fat32 ..." sleep 2 #================================================== reiserfs sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: reiserfs ..." time sudo mkfs.reiserfs -q -f --label "reiserfs" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### reiserfs ..." sleep 2 #================================================== ext2 sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: ext2 ..." time sudo mkfs.ext2 -q -L "ext2" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### ext2 ..." sleep 2 #================================================== ext3 sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: ext3 ..." time sudo mkfs.ext3 -q -L "ext3" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### ext3 ..." sleep 2 #================================================== ext4 sudo umount $PARTITION echo "" echo "" echo "Creating filesystem: ext4 ..." time sudo mkfs.ext4 -q -j -O extent -L "ext4" $PARTITION sudo mount $PARTITION $MOUNT/ df $MOUNT/ #sudo gparted $PARTITION echo "#################### ext4 ..."