As @xenoid suggested, it seems you've not actually mounted the USB drive that you've connected to your RPi. Perhaps the easiest way to confirm that is to check as follows:
$ lsblk --fs
NAME FSTYPE LABEL UUID MOUNTPOINT
└─sda1 exfat SANDISK16GB 5B00-9E5C /home/pi/mntThumbDrv
└─sdb1 ext4 PASSPORT2TB 86645948-d127-4991-888c-a466b7722f05 /home/pi/mntPassport
└─sdc1 ext4 SANDISK8GB e5cb39a9-b041-4339-92f5-4172201a4b1a /home/pi/mntBackupDrv
├─mmcblk0p1 vfat boot 5DB0-971B /boot
└─mmcblk0p2 ext4 rootfs 060b57a8-62bd-4d48-a471-0d28466d1fbb /
You can plug your USB disk into your RPi, and then run the command as shown above. You will get a similar output.
Let's decipher this:
lsblk command lists block devices. I prefer it because it's simple to use, and easy to read.
man lsblk will give you all the details.
As you can see, there are 5 columns in the output. Let's look in the
NAME column at the one for
sdb as this is likely to be similar to your drive. First know that the name
sdb designates a
device name that was assigned by the system, and is indicative of the media type. Immediately below
sdb is the name of a
sdb1 in this case. So -
partitions belong to
device must have at least one
partition to be usable, and it may have more than one. Subsequent
partitions in this case would be called
Your USB drive (the
device) should have a
sdc, etc. Since you've said you created a partition, and formatted it with the
ext4 filesystem, you should also see a numbered
partition listed immediately below the
device. In the row for that
FSTYPE column should show
LABEL column may contain a string of characters that were assigned - perhaps by you when you
formatted the drive. I'll assume you know how to change this label if you like. The
UUID column will contain a UUID that may be used in your
And finally, the "payoff": the
MOUNTPOINT column will tell you if your drive is mounted, and where the mount point is located in your RPi's filesystem. Based on your question, I believe the
MOUNTPOINT column for your USB drive partition will be empty/vacant - indicating that it is not actually mounted. If this is the case, you are writing your files to
/mnt/nas/ which is just another directory in your RPi's file system - until your USB is actually
So, to answer your question:
What am I doing wrong that files aren't making it onto the external disk?
You have failed to
mount the USB drive.
You may want to first try using the
mount command to mount your drive manually; for example:
sudo mount /dev/sdb1 /mnt/nas
Once you've done that, try writing files as before & note the difference. Then, construct an entry in your
/etc/fstab following the instructions in
man fstab. You may also find this "how-to" on GitHub helpful.
Otherwise, or if you're still having problems, edit your question to include the output of your
lsblk --fs command, and we'll go from there.