Uh,
This post is more or less to just keep me reminded of this, as it seems I tend to forget this every time I happen to need it. Frustrating to try to find it again when in need.
As there happens to be slight problems with storage media connected to USB ports and mounting them to correct places, it’s whole lot easier to refer to the storage media in /etc/fstab by it’s UUID. This way the device will be mapped even if it’s order in USB hub/chain/whatnot changes and therefore it’s /dev/sdx path would change at the same time.
So, long story short. if you have an external storage media connected to USB, say port 1, and you see it as /dev/sdb1, you then go and create an entry for it into /etc/fstab and continue working normally, thinking “now it works, yay.”, you’re wrong. Next time you have the device on USB port 2 and whoop-de-doo, the device is seen as /dev/sdc1 “oops” you whisper when you realize that the /etc/fstab entry you created, fails this time.
Instead of /dev/sdx1 use UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
To get UUID for the storage media, use one of the following methods:
1) ls -l /dev/disk/by-uuid
2) vol_id /dev/sdx1
note that with this you need to know the path to the partition/disk you wish to get the UUID