Welcome! Log In Create A New Profile


Post-boot use of faster storage

Posted by nigelhealy 
Post-boot use of faster storage
October 29, 2010 12:16PM
Thanks to this forum, I have a working Dockstar with Debian :)
However, I could not get my fast USB harddrive to be my boot host, it was too slow to spin-up and would boot say 25% of the time, but I have a 2GB USB which boots reliably. I am using the harddrive for data a post-boot mount, that is also working reliably.
What I'd like to do is remove the OS cap of 2GB, move SWAP and other performance-sensitive functions to the harddrive.
I'd like to basically put a load of edits in the /etc/fstab to begin using the harddrive as early as possible. I know how to do this, in terms of say copying /usr, /var, /lib etc to USB harddrive and place lines in the fstab, but I want some help on when I can do this.
If the USB harddrive is not ready to be a boot device, will it be ready to mount any of the above critical directories?
Right now, the very end of the boot process I have in /etc/rc.local some mount statements to mount. If I place mounts in the fstab that will bring it much more forward in time.
Which can I safely move into fstab?
Re: Post-boot use of faster storage
October 29, 2010 01:12PM
So far, I've played safe. I've added a higher priority swap via editing rc.local
tail /etc/rc.local
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

mount -t ext3 /dev/sdb1 /mnt/SG500G
swapon -p1 /mnt/SG500G/swap

exit 0
Which seems to work
root@dockstar:~# swapon -s
Filename				Type		Size	Used	Priority
/dev/sda2                               partition	361452	0	-1
/mnt/SG500G/swap                        file		327672	0	1

What else can I do. My 500GB /dev/sdb disk is faster at sequential, but slower than my flash /dev/sda for random, benchmark results.
Benchmarking /dev/sda [1987MB]
Results: 652 seeks/second, 1.53 ms random access time
Benchmarking /dev/sdb [476940MB]
Results: 38 seeks/second, 25.84 ms random access time

root@dockstar:/tmp# sudo hdparm -t /dev/sda 
 Timing buffered disk reads:   32 MB in  3.08 seconds =  10.38 MB/sec

root@dockstar:/tmp# sudo hdparm -t /dev/sdb
 Timing buffered disk reads:   64 MB in  3.03 seconds =  21.09 MB/sec
Re: Post-boot use of faster storage
October 29, 2010 05:00PM
I don't know the bootloader internals.... but according to the uboot manual (http://www.denx.de/wiki/DULG/Manual) there is a sleep function available. So if you add a 'sleep 5;' in front of your bootcmd your drive gets more time to spin-up.

I don't think these (25% wasted) 5 secs will matter.

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.