Ok, so I’m going to go the EXT4 route. I set up my hdd on the BPi quite a few years ago, and managed to do it without really knowing what I was doing. Unfortunately, I don’t recall how I did it all, or what it all means.
I mounted it via the fstab file. This is what my fstab file currently says:
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/mmcblk0p1 / ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-ro 0 0
/var/swap none swap sw 0 0
UUID=01D0BFF9A139B520 /media/media ntfs-3g defaults,noatime 0 2
I don’t know what pretty much all of that stuff above means.
Is it only the UUID line that is the mounted hdd? I presume the UUID is a unique identifier for the HDD. Once it is formatted in the new file system, will the UUID still be the same?
Assuming I keep all directories and labels the same, would all that needs to be done be changing the “ntfs-3g” to something with “EXT4” in it?
Any help/advice on this would be massively appreciated.
Thanks.
The UUID will change when you reformat the drive/partition, so you’ll need to run blkid
to see the new UUID. (It doesn’t need to be mounted to run blkid
.)
Change ntfs-3g
to ext4
in the /etc/fstab line and reboot. You should be able to keep the same directory structure.
Thanks again. I’ll give it all a go when I identify a suitable time to take my media offline for a while!!
Ok, disk formatted in EXT4, fstab file updated, and the drive is showing up on my network on my windows machine… so it looks like all is good so far.
However, I can’t write to it.
In windows explorer I tried dragging and dropping a file over and it says: “You need permissions to perform this action”.
How do I set it up so I get those permissions?
Thanks.
Edit in:
What i’ve tried:
I’ve edited the smb.conf file, in the ‘Share Definitions’ section, I’ve set the file creation mask and the directory creation mask to 0775, and the home directories to ‘read only = no’
Under the specific shared drive’s info, I’ve got read only = no, browsable=yes, public=yes, writable = yes, create mask = 0755
Ok, I got it writing. Not sure this is the best way to do it, but it’ll do for now!!
I changed the smb.conf file under the specific shared drive’s info to have
create mask = 0777
directory mask = 0777
force user = root
as well as all the other ones specified above.
If there’s a better/safer way to do it, let me know!
Now I’m getting write speeds between 20 and 40MB/s over the network. Not quite as good as the 115MB/s when it was ntfs and plugged into my PC. Shame I couldn’t figure out a way to write to an EXT4 drive that was plugged directly into my PC. Oh well, at least once I’ve got it all copied back across, which I’ll leave it to do over night, it’ll be faster when adding new files in future.
Annnnnd another question:
I’m in the process still of copying all my data across the network to the EXT4 drive. As I’m averaging at about 30MB/s, and there’s about 2.5TB of data, this is taking a bit of time. In that time I’ve been reading and have read comments from people on Raspberry Pi forums about using the XFS filesystem instead of EXT4, and that XFS is getting faster read/write speeds over a network.
Would I have been better using XFS? If so, I may as well change it now before I spend another 12 hours writing data!
What do you think?
No performance is not such a big difference between the two to justify a reformat.
Also generally ext4 is the more “typical” being used.