Mount SATA drives using motherboard SATA ports for NAS

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> X86 based Hardware
Author Message
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 152

PostPosted: Sun Jan 21, 2018 21:41    Post subject: Mount SATA drives using motherboard SATA ports for NAS Reply with quote
I have spare SATA drives I would like to put on the SATA ports on the motherboard. I can't figure out how to make DD-WRT to mount them so I can configure the drives to be shared on the network through a native SATA connection on the motherboard. I just want to do this so I do not have to use external USB 2.0 enclosures. I just want to share internal hard drives on the network. I wanted to see if it will improve transfer speeds too. See if it goes over 34mb to 40mb a second which USB 2.0 is limiting me.


I can get the USB enclosed drives to mount fine.

I do have them formatted as EXT3 and EXT4 filesystems.

The drives are shown on the CMOS/BIOS setup. But no way to configure them on DD-WRT GUI page.
Sponsor
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 152

PostPosted: Thu Jan 25, 2018 2:29    Post subject: Re: Mount SATA drives using motherboard SATA ports for NAS Reply with quote
I finally figured it out. The Wiki was totally wrong.


First you need to know how is the drive is seen by dd-wrt.
Run this command in telnet.

ls -la /dev It will scroll with everything loaded.
Your looking for sbd1 or sbd or sbc1 or sbc and so forth for the assignment. sbda is the boot drive with 4 assignments for the 4 partitions it has. Do not use this drive for storage.

Then you run this command.
mkdir /tmp/mydisc If adding a second drive or more just put a number after mydisc like this
mkdir /tmp/mydisc1

Then run this command to mount it.
mount -o rw /dev/sdb1 /tmp/mydisc Change the sdb1 to match your drive that you want assigned.

If mounting a second drive the command would be this.
mount -o rw /dev/sdc1 /tmp/mydisc1

Then go to the NAS tab to enable SAMBA and it will show up in the list to make the drive available on the network.

I would type this up on your text editor in order of what you mounted if using several drives.

Then put these commands in the webgui in the commands section and save them as a startup so the drives will be automatically mounted when dd-wrt boots up. I am surprised after using dd-wrt for 4 years no one could have explained this to me which is a bummer.
boochi99
DD-WRT User


Joined: 31 Jan 2012
Posts: 77
Location: North Carolina

PostPosted: Sun Aug 05, 2018 21:59    Post subject: Reply with quote
This does not work. Data is gone after a reboot.

edit: Data is missing when accessing the share via FTP

?
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 152

PostPosted: Sun Aug 05, 2018 22:37    Post subject: Reply with quote
The data is not gone. You have to save the script as a commands to run at startup. Then save and apply. Then at every reboot it will remount the drives.

If you only run the commands once it will work until its powered off or rebooted.

So type up what you had that worked then once your done click on the button save startup. It will run those commands on reboot. Then reboot the dd-wrt system. Then check the NAS sharing options and see if its mounted the drives. If it says not available you may need to add another share since it does like to mix the drive assignments around.



This is my startup script.

mkdir /tmp/mydisc

mount -o rw /dev/sdb /tmp/mydisc

mkdir /tmp/mydisc1

mount -o rw /dev/sdc /tmp/mydisc1

mkdir /tmp/mydisc2

mount -o rw /dev/sdd1 /tmp/mydisc2

mkdir /tmp/mydisc3

mount -o rw /dev/sdf2 /tmp/mydisc3


Now if your using USB drives it really likes to mess with the drive assignments. I would just add a new share to what its listed as in the webgui.

With my rig with USB drives you have to power cycle the drive or just unplug them and plug them back in. To get them back on the network share. You might be able to force mount them with the startup script. They do not auto remount for some reason.
boochi99
DD-WRT User


Joined: 31 Jan 2012
Posts: 77
Location: North Carolina

PostPosted: Sun Aug 05, 2018 23:21    Post subject: Reply with quote
If I navigate via the samba share I see the data.
There is a problem with the ProFTPD module I guess as I get blank directories after rebooting.
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 152

PostPosted: Mon Aug 06, 2018 3:02    Post subject: Reply with quote
I never used the ProFTPD option just the Samba networking options.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> X86 based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum