bitcoin does a lot of disk activity so hardware is a consideration. If you run this 24/7 you may expect USB drive failures (got back-up?), I corrupted a USB running bitcoin like this.
What is a perhaps a better method, not quite as secure but just about, is to move the whole -datadir into a RAM disk (/dev/shm/ on ubuntu/debian), although it is quite large but still doable at around 700-800Mb.
0. Mount USB with bitcoin client and datadir
(Ubuntu/Debian)
1. Check available space on RAM disk
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 53G 8.9G 42G 18% /
none 743M 668K 742M 1% /dev
none 749M 1.5M 748M 1% /dev/shm
none 749M 96K 749M 1% /var/run
none 749M 0 749M 0% /var/lock
/dev/shm needs to be bigger than 750M. Make sure you aren't running some other RAM hogging code that could cause issues (i.e. don't run any other programs unless you know what you are doing.)
2. Copy .bitcoin folder onto RAM disk
$cp -R /media/MyUSBDrive/.bitcoin /dev/shm/.bitcoin
3. Run bitcoin
bitcoin -datadir=/dev/shm/.bitcoin
When you are done copy the whole thing back from RAM onto USB (first $srm the existing wallet.dat on USB if one exists, make sure you have another copy of wallet.dat elsewhere because at this point you will only have one copy and it is in RAM, be careful) and then reboot.
4. Secure remove previous wallet
$srm /media/MyUSBDrive/.bitcoin/wallet.dat
5. Remove existing datadir on USB drive
$rm -rf /media/MyUSBDrive/.bitcoin
6. Copy everything back from RAM onto USB drive (could also do an update and skip step 5 above)
$cp -R /dev/shm/.bitcoin/ /media/MyUSBDrive/.bitcoin
7. Check wallets are identical (probably should encrypt first anyway but outside of scope here)
$diff /dev/shm/.bitcoin/wallet.dat /media/MyUSBDrive/.bitcoin/wallet.dat
8. Reboot.