Just curious, I had a USB hub with external power, like 8 ports. If I wanted to do so, could I hook one HDD for each, would it work on a router?
Possible, yes. Good idea? Maybe not.
You won't get stellar performance with most all-in-one plastic router USB ports + file sharing because of the processor in the router being relatively limited for general purpose computing, so don't count on the multiple drives as a means of making a JBOD or RAID NAS that would serve a large number of users and/or high bandwidth activities.
Further, using a router as a NAS is possible and it does work, but it is not necessarily the best option to have extra services running on your router that aren't actually necessary (increases the attack surface of your router, could reduce routing performance if heavily utilized, and a bunch of other reasons).
So yes, it should work, but no, I wouldn't recommend it in most cases.
Yes
there can be lots of power problems tho
some hubs like to reverse power the USB port
and keep the router half alive without its power etc
it would be nice to have external drives with external power
but the more plug packs you have, the more earthing problems you have
plug them up then turn all power on after as the plug and play starts to kill things
you can get around this by a large single power supply like 12V 10A
and use splitters like use in home security presuming the all devises are 12V
as long as the drive don't revers power the USB port
after all that
limited use as a NAS for a PC samba works ok
but KSMBD seems to have problems with multiple connections at once
but what is good is using say a dumb access point server your tv area
where people gather and sit
and that also having a large attached HDD for media server via minidlna for you tv's
you use samba for just moving files on & off and to other direct network media playable devices
I do this myself
That sounds too complicated. Id rather build a x86 intel nas, which is also low power.
NAS for pc's need to be a pc based thing can be openwrt tho
but for tables and laptops limited by wifi speed it's ok for simple stuff
but for fun and education go for it's if you like that sort of thing
lot's of us here do
IMO, this would be the more logical option. You can get an enclosure that supports many drives, or connect an external drive enclosure that connects over USB or thunderbolt. Or, there's always just the idea of buying a purpose built NAS for the setup.
Obviously the internal drive options only make sense if you have standard drives that can be easily used as internal storage -- if they are already in a USB enclosure shell and/or not easy to 'shuck', a bunch of USB drives hanging off an x86 system would still work.
I do want to note
as I do use external USB drives to back my internal drives
you also have the power problems with PC's and lots of external USB drives
I have killed a few external drive shells (drives still worked after remoing them)
and usb ports on adding cards
via lots of plug packs on 240V power lot of nice sparks trying to plug in USB
or power jack into drives
I have learnt to plug things in and out only with the power off to everything (not just turned off)
then turn power on all together
oh, hubs kept dropping out witch is why i switched to add in USB cards