Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
External USB Drive - Enhanced Capabilities
I've got a nice external USB3 RAID box, and a (5810pro) Thecus NAS that's almost full. So I started thinking: why not attach the USB3 box to the Thecus, and expand the storage capacity?

Only problem (at least with OS7 and likely other variants):
- Not obvious how to set it up for great performance
- Not obvious how to turn the external box into a fully configurable part of the sharable data store

Hence, a few hints:
1) How to attach the external storage, make it visible, formatted, and auto-mountable
a) Open an SSH window
b) Attached the external drive. Use "smartctl --scan" to ensure it's visible at the HW level (my drive is /dev/sdaa)
c) If already formatted, it will automount. But I want to use ext4 for performance, so here's how I did it:
    - "fdisk -l" -- if already formatted compatibly, the drive will show up. Mine did not.
    - "modprobe usb_storage" -- ensures that usb *is* visible to fdisk, even if not formatted
    - Unplug and replug the USB drive. Now it should be visible to "fdisk -l"
d) Use fdisk to format and partition the drive at a low level:
    - "fdisk /dev/sdaa" starts fdisk...
           - p (shows existing partitions)
           - g (creates a fresh gpt low level partition table. IMPORTANT: wipes out any existing data!)
           - p (show existing partitions; should have none now)
           - n (creates a new partition)
           - w (write partition table and exit)
e) Now format the partition as ext4:
      mke2fs -t ext4  -E lazy_itable_init=1 /dev/sdaa1
f) When that is complete, unplug and replug the USB. Now it should automount (mine: /raid/USBHDD/sdaa/1) and be visible in the GUI as an external drive

2) I want to put a shared partition on the USB. Slightly tricky but no too bad:

a) Set up the target folder in SSH
    cd /raid/USBHDD/sdaa/1
    mkdir YourDesiredFolder  (eg mine: mkdir cp2)
    chown nobody:users YourDesiredFolder
b) Create the share in the GUI
c) Using SSH, change the hard "raid" shared folder to a symbolic link to the USB folder
    cd /raid
    rmdir YourDesiredFolder
    ln -s /raid/USBHDD/sdaa/1/YourDesiredFolder  YourDesiredFolder
    chown nobody:users YourDesiredFolder

All done!

Forum Jump:

Users browsing this thread: 1 Guest(s)