# NTFS USB external hard drives (always leave them attached or not?)



## fufukauliza (Aug 3, 2022)

Hello everybody,

I have two 1TB external USB hard drives, one is a Seagate and another is a Western Digital.
They are both NTFS and since I have installed the read and write support via fuse I would like to use them to make scheduled backups through a software.
The best thing would be to keep them always connected to the PC without ever disconnecting-connecting them.
I am not a great hardware expert in general, do you think leaving them attached could risk some damage to physical sectors, clusters, etc. etc.?
Perhaps it would be better at the end of the day to disconnect them first and then turn off the PC or by leaving them connected I can feel quite calm about their future integrity?

Thank you


----------



## gpw928 (Aug 4, 2022)

I have no particular experience of NTFS and fuse.  In general, I would test that the system boots, runs, and shuts down cleanly.  If it does that (repeatedly), you would have a good level of confidence that things would be mostly OK.  You may need to verify that any external power supplies used with the USB disks are going to be on when the system boots.  You might even want to see what happens if the power is lost unexpectedly.

But the first question that comes into my head is why are you using a "foreign" NTFS file system format to back up a FreeBSD system?  Such file systems are not likely to be in the test matrix for FreeBSD releases, updates and patches.

I would therefore never choose a non-native backup format for any operating system.  It just adds one extra layer of uncertainty to the risk level you are running.

Edit: Greg Lehey and Warren Block both have good articles on FreeBSD disk partitioning with gpart(8).


----------



## fufukauliza (Aug 4, 2022)

Hello

I use NTFS because I need full compatibility with Windows but now that you made me think about it, since I don't have files bigger than 4gb, I could use FAT32.

Thank you.


----------



## tanis (Aug 4, 2022)

I make heavy use of NTFS under Linux and FreeBSD, file size ranges between several MB and a few terabytes, the process of transferring those files has been automated. My work flow is the following:


Hash the data for later data integrity evaluation
Mount NTFS usb drive mode: RW
Copy data to NTFS usb drive
Umount NTFS usb drive
ReMount NTFS mode RO and evaluate data integrity (hash)
<repeat>
That all has been automated using a script which can even detect what USB drive has been attached to the system, notifications can be send by mail, pretty straight forward process.   

Advantages:

data are always written to disk, and data integrity is evaluated
power outages are only harmful within the process, most drives "spin down" (go standby) these days anyway, so even if there is a power outage, nothing much is going to happen to your data


----------



## fufukauliza (Aug 4, 2022)

Tanis, 

Can you tell me if there is any software between the ports that can check file hashes before and after copying like your script does?

Thanks again


----------



## tanis (Aug 4, 2022)

gm5sum which is part of coreutils is the one I use under FreeBSD, under Linux it's md5sum, which is actually the same program:

`# create MD5 hashes for multiple files
gmd5sum *  > /tmp/files.md5

# verify MD5 hashes
gmd5sum -c files.md5`


----------

