![]() |
HowTo.NonNativeDiskMountWithMultiplePartitionTypes HistoryHide minor edits - Show changes to markup March 01, 2009, at 05:12 AM
by -- Note about NTFS partion not automounting later
Changed line 27 from:
to:
Added line 36:
Added lines 49-50:
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). Changed line 84 from:
CAUTION: This is probably not 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. to:
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. March 01, 2009, at 04:11 AM
by -- clarification of which swap space started early
Changed lines 83-85 from:
I went so far as to remove the third partition (swap space) describe on this page, but that did not solve the problem. The situation appears to be fixed by adding a diversion script that turned on the swap space before attempting to start the thttpd process, /unslung/rc.thttpd to:
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 March 01, 2009, at 04:10 AM
by -- caution re out of memory and doing swapon before thttpd
Added lines 80-97:
CAUTION: This is probably not 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. The situation appears to be fixed by adding a diversion script that turned on the swap space before attempting to start the thttpd process, /unslung/rc.thttpd (:table border=0 width=100% bgcolor=#eeeeff:) (:cell:) #/bin/sh # /unslung/rc.thttpd # swapon /dev/sdb3 return 1 (:tableend:) February 18, 2009, at 09:28 PM
by -- more format flailing
Changed lines 6-7 from:
Due to the odd behavior of rc.bootbin as discussed in R63DiskBehaviour, <B>it is not advisable to use two natively-formatted disks in R63 or Unslung6!</B> It is possible to to:
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 Changed line 16 from:
to:
February 18, 2009, at 09:26 PM
by -- still working formats
Changed lines 6-7 from:
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 to:
Due to the odd behavior of rc.bootbin as discussed in R63DiskBehaviour, <B>it is not advisable to use two natively-formatted disks in R63 or Unslung6!</B> It is possible to Changed line 16 from:
to:
February 18, 2009, at 09:23 PM
by -- trying to clean up appearance February 18, 2009, at 09:18 PM
by -- page creation
Added lines 1-79:
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.
(:table border=0 width=100% bgcolor=#eeeeff:) (:cell:) #!/bin/sh # # Under Linksys R63, this first mount command # is not needed if the first partition is NTFS # (or FAT?) # mount /dev/sdb1 /share/hdd/data mount /dev/sdb /share/hdd/conf swapon /dev/sdb3 return 1 (:tableend:) 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: 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 (:table border=0 width=100% bgcolor=#eeeeff:) (:cell:)
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda1 1718400 125468 1575476 7% /
/dev/mtdblock4 6528 6204 324 95% /initrd
/dev/sda1 1718400 125468 1575476 7% /share/flash/data
/dev/sda2 122963 4149 117545 3% /share/flash/conf
/dev/sdb1 302078192 111448992 190629200 37% /share/hdd/data/HDD_1_1_1
/dev/sdb2 10128084 57916 9555688 1% /share/hdd/conf
# free
total used free shared buffers
Mem: 30516 29856 660 0 12548
Swap: 200804 4840 195964
Total: 231320 34696 196624
# swapoff /dev/sdb3
# free
total used free shared buffers
Mem: 30516 29608 908 0 480
Swap: 0 0 0
Total: 30516 29608 908
(:tableend:) 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. |