# USB HD compatibilty



## LORIF32768 (Apr 15, 2022)

Hello,

I am thinking of buying a Seagate 5TB external HD USB but want to be sure it will work with FreeBSD (I am running version 12.3). I investigated by searching the web and also these forums and it sounds as if it should but I wanted some reassurance before I splashed out. For example the specs for the model STGX5000400 only mention Windows. I will want to use NTFS as I need to also backup a Windows machine and Windows probably can't read other file system easily. I am new to FreeBSD as I used to just run Linux but finding FreeBSD to be much nicer and I am reading all the manuals and learning rapidly but I don't want to buy this drive and find it doesn't work with FreeBSD so any advice on this matter would be most gratefully received !

Regards, LF


----------



## SirDice (Apr 15, 2022)

umass(4) is a USB standard protocol.









						USB mass storage device class - Wikipedia
					






					en.wikipedia.org


----------



## jbo (Apr 15, 2022)

Hello & Welcome to this FreeBSD community!

As _SirDice_ mentioned, pretty much any USB HDD should work out of the box via umass(4). I have yet to encounter a single USB drive that isn't working on FreeBSD (personal experience).



LORIF32768 said:


> I will want to use NTFS as I need to also backup a Windows machine and Windows probably can't read other file system easily.


Personally, I'd recommend using exFat for that purpose. Microsoft Windows supports that since Windows XP. On the FreeBSD side, you can use sysutils/fusefs-exfat/ to mount the same drive/partition(s).
exFat tends to work a lot better for cross-platform drives than NTFS.


----------



## mark_j (Apr 15, 2022)

If you can find out what model the disk is inside the container, do so. I suspect these are SMR drives which have terrible write speeds. It's ok if you use them for archiving (eg write once, read often), but anything else and they're a waste of money. IMO.


----------



## LORIF32768 (Apr 15, 2022)

Thankyou very much for all the informative
replies!

I will most likely use exFat then rather than NTFS yes.

Cheers, LF


----------



## jbo (Apr 15, 2022)

mark_j said:


> I suspect these are SMR drives which have terrible write speeds. It's ok if you use them for archiving (eg write once, read often)


I second that. I accidentally ordered the wrong drives about a year ago (SMR instead of CMR). They were of course terrible for the purpose I had in mind. I gifted them to my girlfriend together with an external two-disk enclosure. She uses them for archiving her work files now which works reasonably well.

TL;DR: Stay away from SMR drives for anything other than rare-write scenarios.


----------



## LORIF32768 (Apr 15, 2022)

mark_j said:


> If you can find out what model the disk is inside the container. I suspect these are SMR drives which have terrible write speeds. It's ok if you use them for archiving (eg write once, read often), but anything else and they're a wsste of money. IMO.


Yes I am mostly using it to backup my machines
and also a large collection of MP4 music videos
so the main application is backup and play
audio files (I won't be playing the video as I don't 
want X-Windows cluttering up the machine! )

Cheers, LF


----------



## grahamperrin@ (Apr 15, 2022)

If the computer is one that you'll occasionally sleep (suspend), be prepared to methodically unmount the file system(s) of the drive before each sleep.


----------



## SirDice (Apr 15, 2022)

grahamperrin said:


> If the computer is one that you'll occasionally sleep (suspend), be prepared to methodically unmount the file system(s) of the drive before each sleep.


Why leave it constantly mounted at all? Mount, backup, unmount.


----------



## LORIF32768 (Apr 15, 2022)

I usually just Boot, use the machine then issue a 'poweroff'
So it should automatically unmount the drive.

If I was going to use sleep (you mean hibernation I
suppose) wouldn't it be good to mount the drive
read only? Since generally I won't be writing to this drive
I could configure the system to do that by default?
The only problem is that I would need rw on other USB
mass storage (memory sticks).

Regards, LF


----------



## LORIF32768 (Apr 15, 2022)

SirDice said:


> Why leave it constantly mounted at all? Mount, backup, unmount.


I will want to use it quite a lot for playing
audio files.

Cheers, LF


----------



## grahamperrin@ (Apr 15, 2022)

SirDice said:


> Why leave it constantly mounted at all?



I use a mobile hard disk drive, on USB, to store the files for Windows in a virtual machine. 

<https://old.reddit.com/r/zfs/comments/tzr230/-/i4syrzt/?context=1>


----------



## trev (Apr 16, 2022)

Nightl;y backup to an external Seagate 5TB (CMR) disk drive - no need to leave it powered on all day and night.


```
#!/bin/sh

# Check root is running the script
check=`id -u`
if [ ${check} -ne 0 ]
  then
    echo
    echo "${0} must be run by root!"
    echo
    exit
fi

# Power up external Seagate USB disk and mount
usbconfig -d 1.7 power_on && sleep 30 && mount /mnt

now=`date "+%Y%m%d%H%M%S"`
echo "Starting at: ${now}"

logger "Start local backup to da0p1"
echo "Backing up / ..."
dump -L0aun -C32 -f - / | bzip2 -2 | dd of=/mnt/dump-root-${now}.bz2

echo "Backing up /var ..." 
dump -L0aun -C32 -f - /var | bzip2 -2 | dd of=/mnt/dump-var-${now}.bz2

echo "Backing up /usr ..." 
dump -L0aun -C32 -f - /usr | bzip2 -2 | dd of=/mnt/dump-usr-${now}.bz2

echo "Backing up /www ..."
cd /www/.zfs/snapshot
snapshot=`ls | tail -1`
zfs send data/www@${snapshot} | bzip2 > /mnt/zfs-data-www-${snapshot}.bz2

echo "Backing up /tmp ..."
cd /tmp/.zfs/snapshot
snapshot=`ls | tail -1`
zfs send data/tmp@${snapshot} > /mnt/zfs-data-tmp-${snapshot}

echo "Backing up /home ..."
cd /home/.zfs/snapshot
snapshot=`ls | tail -1`
zfs send data/home@${snapshot} > /mnt/zfs-data-home-${snapshot}
logger "Finished local backup to da0p1"

echo "Disk space left"
df -h /mnt

# Unmount and power down external Seagate disk
umount -v /mnt && sleep 60 && usbconfig -d 1.7 power_off

now=`date "+%Y%m%d%H%M%S"`
echo "Finished at: ${now}"
```


----------

