NSLU2-Linux
view · edit · print · history

HowTo.UseSharesOnTwoNativeDisksInUnslung68 History

Hide minor edits - Show changes to markup

September 20, 2008, at 10:15 AM by MarkHu --
Changed lines 101-104 from:

Take a look on an other kind of solution

http://www.nslu2-linux.org/wiki/HowTo/CorrectBadSharingWithTwoDrives

to:

Take a look at an other kind of solution: CorrectBadSharingWithTwoDrives

May 12, 2008, at 09:50 PM by maisondouf --
Changed lines 98-100 from:
to:

Firmware Version: V2.3R63-uNSLUng-6.10-beta

May 12, 2008, at 09:47 PM by maisondouf --
Changed lines 96-106 from:

to:

Maisondouf on 20080512

Take a look on an other kind of solution

http://www.nslu2-linux.org/wiki/HowTo/CorrectBadSharingWithTwoDrives

Alain.

May 08, 2008, at 07:24 PM by BenMcDui -- small edit to my latest entry
Changed line 90 from:

BenMcDui 0m 20080508:

to:

BenMcDui on 20080508:

May 08, 2008, at 07:23 PM by BenMcDui -- Added the results on how to get rid of sdb2
Added lines 89-96:

BenMcDui 0m 20080508: This is my recipe: Take your HDD to an other machine to remove partition sdb1. I did it on a PC with Knoppix, and also on a PC with PartitionMagic?. The latter gives me a better feeling of control; it can delete, extend, format partitions even in ext2 and ext3. So I got rid of sdb2 and added its space to sdb1. I then went back to the slug and connected the HDD. It doesn't mount automatically anymore so you need a script in /opt/etc/init.d like Snnmount_sdb1, containing the command

mount /dev/sdb1 /share/hdd/data

April 17, 2008, at 07:23 PM by BenMcDui -- text edit
Changed line 85 from:

My suggestion, which I will test shortly, is to write a startup script /opt/etc/init.d/SnnRemount, which unmounts /share/flashconf and mounts sda2 on /share/flas/conf.

to:

My suggestion, which I will test shortly, is to write a startup script /opt/etc/init.d/SnnRemount, which unmounts /share/flash/conf and mounts sda2 on /share/flas/conf.

April 17, 2008, at 07:21 PM by BenMcDui -- textdit
Changed lines 63-64 from:
to:
 BenMcDui
Changed line 85 from:

My suggestion, which I will test shortly, is to write a startup script /opt/etc/init.d/SnnRemount?, which unmounts /share/flashconf and mounts sda2 on /share/flas/conf.

to:

My suggestion, which I will test shortly, is to write a startup script /opt/etc/init.d/SnnRemount, which unmounts /share/flashconf and mounts sda2 on /share/flas/conf.

April 17, 2008, at 07:20 PM by BenMcDui -- text edit
Changed lines 63-64 from:
to:
Changed line 88 from:

BenMcDui? on 20080417

to:

BenMcDui on 20080417

April 17, 2008, at 07:13 PM by BenMcDui -- Suggestion added
Added lines 83-88:

My suggestion, which I will test shortly, is to write a startup script /opt/etc/init.d/SnnRemount?, which unmounts /share/flashconf and mounts sda2 on /share/flas/conf. Details will follow soon!

BenMcDui? on 20080417

December 11, 2007, at 07:19 AM by paul -- Added evidence for mounting different disks configs to the same share
Added lines 81-82:

How would we be able to modify this behaviour and making it to mount the flash/conf and hdd/conf to sda2 and sdb2 ?? Any suggestions that would survive a reboot or disk hot plug? -- Paul

November 28, 2007, at 09:59 AM by paul --
Changed lines 63-80 from:
to:
 BenMcDui?

I'm glad that others seem to suffer from the same thing: assigning /dev/sdb2 to both /conf directories of both drives.

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs               307426936 174358716 129944944  58% /
/dev/root                 6528      6344       184  98% /initrd
/dev/sda1            307426936 174358716 129944944  58% /
/dev/sda1            307426936 174358716 129944944  58% /share/flash/data
/dev/sdb1            480482192  96632024 378968740  21% /share/hdd/data
/dev/sdb2               116661      4144    111313   4% /share/hdd/conf
/dev/sdb2               116661      4144    111313   4% /share/flash/conf
#
November 21, 2007, at 09:37 AM by BenMcDui --
Changed line 63 from:
to:
November 21, 2007, at 09:37 AM by BenMcDui -- added comment about sdb2 mounting on /share/flash/conf
Added lines 56-63:

I have been puzzled by the line:

/dev/sdb2               116661     27009     88448  23% /share/flash/conf

for a while, happy to see I'm not the only one. My suspicion is that this also leads to the system writing to my HDD every once in a while, thereby frustrating my spin down proces which attempts to spin down the HDD after one hour of inactivity.

BenMcDui?

January 11, 2007, at 08:17 PM by Keks --
Changed lines 39-40 from:

<hr>

to:

January 11, 2007, at 08:09 PM by Keks --
January 11, 2007, at 08:09 PM by Keks --
Changed line 39 from:
to:

<hr>

January 11, 2007, at 08:05 PM by Keks --
Added line 53:
January 11, 2007, at 08:05 PM by Keks --
Added line 41:

[@

Added line 51:

return 1 @]

January 11, 2007, at 08:03 PM by Keks --
Added lines 39-51:

I've got the same problem and the reason for it seems to be (at least in my case), that the conf partition of disk 1 (/dev/sdb2) on startup is mounted to both conf shares, to /share/hdd/conf as well as to /share/flash/conf, as you can see below:

  1. df

Filesystem 1k-blocks Used Available Use% Mounted on rootfs 153660192 149967244 2131832 99% / /dev/sdb1 6528 6332 196 97% /initrd /dev/sdb1 153660192 149967244 2131832 99% / /dev/sda1 157393964 155564908 230028 100% /share/flash/data /dev/sdb1 153660192 149967244 2131832 99% /share/hdd/data /dev/sdb2 116661 27009 88448 23% /share/hdd/conf /dev/sdb2 116661 27009 88448 23% /share/flash/conf So anyway on which disk (share.info in the conf dir) you create a share, it is always written to the share.info on disk 1. On reading the shares for each disc the web interface in fact is directed to exactly the same file, assuming, that identical shares have been created on both disks and adding the ~1 thing to the secondly found (non existent) shares of disk 2. After manually mounting sda2 to /share/flash/conf everything is working fine - until the next reboot. Keks

September 28, 2006, at 08:36 PM by NickLe --
Added lines 37-38:

I've tried this workaround and now get strange behaviour. After a reboot the Linksys management GUI shows the shares as I want them, as per this file. But in reality they stay as before with the 'tilde' versions in place. Unless I hit SAVE in the linksys GUI, when they take effect.... for a while.... then they appear to revert again

April 25, 2006, at 08:59 PM by adriaan --
Changed lines 3-4 from:

In Unslung 6.8 I got a problem with the firmware creating unwanted shares. The know errors page for Unslung 6.8 states:

to:

In Unslung 6.8 I got a problem with the firmware creating unwanted shares. The known errors page for Unslung 6.8 states:

April 25, 2006, at 07:52 PM by adriaan --
Added lines 1-36:

HowTo Use shares with two native formatted drives with Unslung 6.8

In Unslung 6.8 I got a problem with the firmware creating unwanted shares. The know errors page for Unslung 6.8 states:

Creating a share, or adding a user with a private share, via the Linksys Web GUI can create two shares: one with the original name, the other with the original name with "~1" appended -- each is associated with a different drive in a two-drive NSLU2 configuration. Since the share directory only actually exists on one of the two drives, only one of the two shares will work. This is not an Unslung 6.x bug -- this is actually completely consistent with the (strange) behavior of the native Linksys R63 firmware. Since the shares are managed by Linksys code for which we have no source code, this is not something that can be changed in Unslung.

I found the following bypass for this problem:

  • Just install and unsling Unslung 6.8 the normal way (I use a 1GB stick on port 1 and a 320GB WD on port 2)
  • Create users with private shares and/or other shares the way you want it. Be careful NOT to reboot yet.
  • telnet into the slug and execute the following copy statements:
    • cp /share/hdd/conf/share/share.info /share/hdd/conf/share/share.info.ok
    • cp /share/hdd/conf/share/smb.conf /share/hdd/conf/share/smb.conf.ok
Now you've saved the definitions of the just created shares to the files ending on .ok. The share.info is used by the linksys firmware to present the shares and users on the web interface, the smb.conf is used by Samba.
  • Now create /unslung/rc.samba with the following content:
#! /bin/sh
# Diversion script: customize Samba config before starting Samba
#
# Reason: alter samba to use original configs instead of the bootup-rebuilds
#
cp -p -f /share/hdd/conf/share/smb.conf.ok /share/hdd/conf/share/smb.conf
cp -p -f /share/hdd/conf/share/share.info.ok /share/hdd/conf/share/share.info
#
# Continue to start samba
#
return 1 
This script will copy your saved configs to the active files just before starting Samba and will overwrite the erroneous files created by the Linksys firmware when booting.
  • Reboot the slug

If you did it right you will now still only see the shares you created, instead of every share duplicated with one with the same name on the other disk and with ~1 appended. Advantage of this method is that you can still use the linksys interface to create shares and users.

Of course you'll have to be careful to do the copy to the *.ok files again after changing anything in the shares and users definitions in the linksys webinterface!

Adriaan

view · edit · print · history · Last edited by MarkHu.
Based on work by maisondouf, BenMcDui, paul, Keks, NickLe, and adriaan.
Originally by adriaan.
Page last modified on September 20, 2008, at 10:15 AM