**** BEGIN LOGGING AT Sat Aug 02 02:59:57 2008 Aug 02 18:41:54 hi guys... noob here so please pardon such an elementary question... I am trying to set up RAID1 on a slug running SlugOS/BE. I was advised by folks here that it saves a lot of grief by using a separate drive as the root file system and just setting up a single partition on the disks to be RAIDed Aug 02 18:42:29 so that's what I've done--I've got a 2GB USB flash drive for the primary and swap partitions, and two identical 16GB flash drives for the RAID Aug 02 18:42:59 I went ahead and got two USB hubs, one for each port on the slug--that way I'll have plenty of ports if I need them Aug 02 18:43:40 I was proceeding through the wiki article on setting up RAID1 but have hit a snag... I created all the partitions in the right places, but when I reboot the slug it is choosing one of my 16GB drives as sda Aug 02 18:44:22 I have tried alternating positions in the hub of the 2GB and 16GB drive but if both are present then linux always mounts the 16GB as sda Aug 02 18:44:56 So... first of all is there any way around that (short of removing the hub from port1 on the slug and dedicating that port to the 2gb drive Aug 02 18:45:51 Not even that will work reliably Aug 02 18:46:01 hmm Aug 02 18:46:13 so this is a common issue then? Aug 02 18:46:15 The problem is that USB devices are removable, and hence you cannot determine anything based on what port or hub they are plugged into. Aug 02 18:46:25 This is common on all USB devices. Aug 02 18:46:47 The solution is not to use /dev/sda as the identifier for the device. Aug 02 18:47:08 Rather, use the partition UUID or partition label to match them up. Aug 02 18:47:33 That's how it's done on all other linux systems, and that's how SlugOS does it in the normal case. Aug 02 18:48:07 ok well i just got worried by the verbage in the wiki "Now the NSLU2 runs Slug-OS and starts from the first partition on the first USB drive" Aug 02 18:48:29 Yeah, that probably needs to be corrected in the wiki. Aug 02 18:48:31 didn't know if there had to be a way to "force" the 2GB drive to be "the first USB drive" Aug 02 18:49:10 Probably the whole procedure needs to be reviewed... the project has been around for a while, and the wiki is often a bit "disorganized". Aug 02 18:49:39 well i'm grateful to have any kind of writeup at all :) Aug 02 18:50:57 i mean I could just follow the wiki exactly (it specifies using only 2 disks but not using the first two partitions on the second disk) Aug 02 18:51:33 but that wastes space and folks here (might have even been you--can't remember) said it was better to have a dedicated drive for the OS/swap Aug 02 18:53:48 so if you'll pardon noob follow-up questions, given your suggestion of not using /dev/sda, does that mean I should prevent those identifiers from being assigned, or does that just mean I need to create (or are they already created) new identifiers Aug 02 18:54:14 would just assigning a label to the drive be all that is necessary? Aug 02 19:06:37 ok looks like i can assign labels to partitions when i format them (i.e. mkfs.ext3 /dev/sda2 -l Swap) but I don't think that's what you meant? I should be looking for a way to label the entire disk, not just a partition on the disk, right? Aug 02 19:07:49 ok scratch that, just re-read what you wrote... looks like that is what i need to do Aug 02 19:08:30 but im still not sure how that will change how I follow the wiki article Aug 02 19:09:46 maybe i should make this easier on myself and just use the boot drive in port 1 on the slug, then plug in both of the raid drives into a hub on port 2... from my testing it looks like the slug tries to mount anything in port 1 first, then proceeds to port 2 Aug 02 19:11:13 I had originally wanted to hang one of 16GB off port 1 and the other off port 2. Wouldn't it be faster that way (and less prone to failure)? Aug 02 19:28:44 hehe they are abandoning ship :) Aug 02 19:29:04 sorry for being lame... i'll keep reading and see what i can come up with Aug 02 19:29:18 this is just a hobby thing so i have no time constraints Aug 02 19:29:37 meanwhile if anyone wants to take pity on me any help would be much appreciated Aug 02 19:32:59 If you're looking for a "how-to" from someone that's done this before, I'm afraid you're out of luck. You're one of a very few people, most of whom would consider themselves experts (hence the poor info on the wiki), who have undertaken this. Aug 02 19:33:32 Frankly, the slug lacks the I/O bandwidth to do this effectively, so if it's RAID you want you can get it, but if you expect RAID *and* performance, you'll need to consider other devices. Aug 02 19:33:42 So, I'm afraid you're trailblazing... Aug 02 19:36:43 heh, story of my life Aug 02 19:37:01 do you think this would actually incur a performance hit? Aug 02 19:37:17 I'm not looking for any increased performance--i want raid for the redundancy Aug 02 19:38:01 basically all i am wanting to use this for at this point is a svn server Aug 02 19:38:17 presently that is running on another box i need to decomission Aug 02 19:38:23 It will cut your I/O bandwidth in half. Is that a performance hit? :D Aug 02 19:38:27 ha Aug 02 19:39:05 well that should just be for writes, correct? Aug 02 19:39:32 with raid1 reads are theoretically faster (at least on normal setups) Aug 02 19:40:21 i think id be willing to take the hit on writes since reads will occur much more often Aug 02 19:41:06 but if somehow this makes reading crawl also i may scrub the idea and just do periodic rsyncs or something Aug 02 21:41:16 ok so i'm trying to add a label to my swap partition with mkswap -L but it appears that switch isn't supported? Aug 02 21:42:05 the wiki discusses doing this but mkswap -L SWAP /dev/sdc2 just brings up the list of allowable commands Aug 02 23:53:18 mwester: you around? Aug 02 23:55:37 or anyone who can help me label my swap partition? mkswap -L doesn't seem to be functional in busybox 1.01 Aug 03 00:27:15 luv2chill: I'd use UUIDs instead of labels; but you can mix them. Aug 03 00:27:42 You may need to use the ipkg search tool (link is on the wiki) to find an alternate mkswap utility that's a bit more full-featured. Aug 03 02:18:34 thanks mwester... yeah it seems the swap partition isn't assigned a UUID either :| Aug 03 02:19:12 the blkid command shows a UUID for every partition but that one Aug 03 02:19:30 /dev/sda3 Aug 03 02:19:35 From my fedora system Aug 03 02:19:49 So I think it works, there's just something missing :( Aug 03 02:20:04 what command did you use to give that output? Aug 03 02:20:15 That's from /etc/blkid/blkid.tab Aug 03 02:20:47 (the blkid cache file) Aug 03 02:22:44 hmm Aug 03 02:23:01 well I googled some and saw other folks talking about no UUID on their swap partition Aug 03 02:23:05 so i figured it was normal Aug 03 02:23:16 maybe I'll try recreating it Aug 03 02:23:24 Ok. Perhaps fedora is abnormal; that's been claimed before :) Aug 03 02:23:30 heh Aug 03 02:23:42 But certainly you should be able to put a label on it with the correct mkswap command, no? Aug 03 02:24:26 I would think... but it seems that the version of busybox is very old (circa 2006) Aug 03 02:26:26 looks like there's a pkg called swap-utils that contains mkswap Aug 03 02:27:51 oh, nvm that is an unslung package Aug 03 02:28:02 busybox is almost certainly not going to do the job for anything serious. The first thing I do when I "turnup" a SlugOS system is install the coreutils, procps, bash, and a lot of other standard utilities. Busybox is excellent to get a system booted up, but it's never claims to be a full replacement for the real stuff. Aug 03 02:30:43 Strange. Searching for mkswap using the ipkgfind page comes up with lots of hits. Aug 03 02:31:19 heh can you give me that link? I must be using a different search engine Aug 03 02:31:29 here's what I was using: Aug 03 02:31:30 http://ipkgfind.nslu2-linux.org/details.phtml?package=swap-utils&official=&format= Aug 03 02:31:30 You should be able to download and install one of those, even though they may not be in the same feed as SlugOS 4.8 Aug 03 02:32:13 Try entering "mkswap" for the string, and search with the file in package option set. Aug 03 02:32:26 ah oops Aug 03 02:32:33 I was just searching name and description Aug 03 02:33:03 looks like util-linux is what I want Aug 03 02:33:04 :) Aug 03 02:33:45 Hmm... you'll even get a real fdisk with that. :) Aug 03 02:34:09 doh... no space left on device Aug 03 02:34:13 what an idiot Aug 03 02:34:21 Yeah, you need to be turned-up to do it. Aug 03 02:34:42 Usage: mkswap [-c] [-v0|-v1] [-pPAGESZ] [-L label] /dev/name [blocks] Aug 03 02:34:50 :) Looks like it'll do a label. Aug 03 02:35:02 ok well I've got a label assigned to my sdc1 partition I guess I can turn up to that? Aug 03 02:35:37 and I will need to edit fstab with the label Aug 03 02:35:40 right? Aug 03 02:35:55 Yeah, you can always undo it later -- you just need to get things labeled first. Then you can "turnup flash", erase the contents of the sdc1 partition, and go from there. Aug 03 02:37:02 But either way you shouldn't have to edit fstab. Aug 03 02:37:24 If you "turnup disk", the turnup procedure will set things up so that it automatically mounts by UUID. Aug 03 02:37:39 Hey. Attempting to install Unslung firmware using upslug2. At this point, the nslu2 will boot to a solid green Ready/Status light. However, when I look at the logs for my router, there hasn't been a DHCP request and it's not in the device list. I can't find web interface. Aug 03 02:37:40 SlugOS will do the right thing for your root filesystem. Aug 03 02:38:32 ah ok... will I need to edit fstab to reference the label/uuid of the swap partition? or will slugos handle that also? Aug 03 02:38:53 You'll have to handle the rest yourself. Aug 03 02:39:02 OK :) Aug 03 02:39:13 thanks a lot for your help Aug 03 02:40:09 guardoftheguards - it should be at whatever IP it was at before you flashed unslung onto it Aug 03 02:40:36 which if you didn't change it before is 192.168.1.177 Aug 03 02:41:14 if you have the install disc that came with it you can use that to find it and change the IP if needed Aug 03 02:43:47 Not sure where the install disk went. Also, it beeps right as the light turns solid green. I had Unslung installed before, and I don't think it always did that. Did it? Aug 03 02:44:07 yeah I'm pretty sure the beep is normal Aug 03 02:46:30 here's a link to dl the install util: Aug 03 02:46:31 http://www.linksys.com/servlet/Satellite?c=L_CASupport_C2&childpagename=US%2FLayout&cid=1166859881077&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper&lid=8107719312B13&displaypage=download#versiondetail Aug 03 02:47:16 oh wait nevermind thats just a pdf Aug 03 02:47:45 stupid linksys... lemme get my CD real quick and see how big it is Aug 03 02:51:28 ah found it on their ftp Aug 03 02:51:58 ftp://ftp.linksys.com/pub/network/NSLU2-SetupWizard.zip **** ENDING LOGGING AT Sun Aug 03 02:59:56 2008