![]() |
How to add a second drive with multiple partitions to R63/Unslung6This is an extension of the description of a non-native disk mount at NonNativeDiskMount. It is also related to CustomSizedPartitions. Due to the odd behavior of rc.bootbin as discussed in R63DiskBehaviour,'''it is not advisable to use two natively-formatted disks in R63 or Unslung6!''' It is possible to partition, format and add a second drive manually without complications. This method creates three partitions -- one NTFS, one ext3 and one swap. Following WhichUSBPortforUnslung6 recommendations, root will be installed on the NSLU disk port 2 (/dev/sda) and the hard disk in port 1 (/dev/sdb). The instructions will use a memory stick for the root device. Start with a fresh NSLU2, and have access to a Windows machine.
NOTE: My [R63] slug auto-mounts the NTFS partition that is the first one on the disk. During my first attempt, I put a couple dummy partitions on the drive before adding the NTFS one, so it ended up third on the disk. I might be recalling incorrectly, but I don't think it was auto-mounted later. NOTE: After some time and unknown events...possibly due to temporarily swapping the disk drive to a Windows machine, the automount of the NTFS partition stopped working. When that occurred I had to uncomment the first mount command in the above script (and change some scripts towards the new mount point). NOTE: Regarding the size of a swap partition. Probably best to make sure it is at least as large as the slug's memory (32MB), better twice the memory (though that might be a bit overkill on a slug). If you do the command p (print) in fdisk, you'll see that a cylinder is about 8 MB. I used 25 cylinders in my swap and have around 200 MB available. After rebooting, you should be able to see the new partitions
That free output was from a baseline slug with only mt-daapd added. As the second free shows, if the swap is removed it just uses up the buffers. The point is, if it has swap available, the slug is going to tend to use it for some things. CAUTION: I do not believe this is related, but mentioning it just in case. At some point after doing this, my slug started booting slowly, was not available via the web server and after about one out of ten boots the ssh daemon would not start and I couldn't log in. Looking into /var/log/messages, I discovered warnings about Out of Memory conditions and killing of processes. The first such message was the first message after the system time had been updated. And that message was alway about killing the thttpd process. I went so far as to remove the third partition (swap space) describe on this page, but that did not solve the problem. (Re-created it later). The situation appears to be fixed by adding a diversion script that turned on the new swap space before attempting to start the thttpd process, /unslung/rc.thttpd
|