Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Lucien
May 2, 2007

check it out i'm a samurai ^_^

MargotK posted:

Again, thanks a lot!
Just in case you're planning to use this for anything remotely important I want to give you a heads up that as soon as you have a source file with sentences ending in exclamation or question marks, or paragraph spacing, mine is the only script that works as expected :cool:

Adbot
ADBOT LOVES YOU

Slow is Fast
Dec 25, 2006

I have a raid 5 using mdadm in my home storage computer. Right now it's set up with 3x 500 gig drives as raid devices and a spare 500 is a hotswap. I've nearly filled the storage pool and would like to add in the hotwap drive to the storage pool. I read the man page but am unsure of what I do exactly. I've figured that I'd have to use mdadm with the grow command but am unsure of which drives to point to how in the proper syntax. Any help would be appreciated as I feel silly for not being able to figure it out.

And to avoid any argument I have my data backed up elsewhere and I know raid isn't a form of backup etc.

Here's the printout of: sudo mdadm --detail /dev/md0

code:
   1.      /dev/md0:
   2.              Version : 00.90
   3.        Creation Time : Sun Mar 23 23:41:35 2008
   4.           Raid Level : raid5
   5.           Array Size : 976767744 (931.52 GiB 1000.21 GB)
   6.        Used Dev Size : 488383872 (465.76 GiB 500.11 GB)
   7.         Raid Devices : 3
   8.        Total Devices : 4
   9.      Preferred Minor : 0
  10.          Persistence : Superblock is persistent
  11.       
  12.          Update Time : Mon Mar  9 14:36:34 2009
  13.                State : clean
  14.       Active Devices : 3
  15.      Working Devices : 4
  16.       Failed Devices : 0
  17.        Spare Devices : 1
  18.       
  19.               Layout : left-symmetric
  20.           Chunk Size : 128K
  21.       
  22.                 UUID : 08c7d6cb:c6ddd81e:b18f835b:903eef3d (local to host cellserver)
  23.               Events : 0.56
  24.       
  25.          Number   Major   Minor   RaidDevice State
  26.             0       8        1        0      active sync   /dev/sda1
  27.             1       8       17        1      active sync   /dev/sdb1
  28.             2       8       33        2      active sync   /dev/sdc1
  29.       
  30.             3       8       49        -      spare   /dev/sdd1
Thanks for helping this idiot out.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Slow is Fast posted:

I've figured that I'd have to use mdadm with the grow command but am unsure of which drives to point to how in the proper syntax.

mdadm --grow --raid-devices 4 /dev/md0

Slow is Fast
Dec 25, 2006

ShoulderDaemon posted:

mdadm --grow --raid-devices 4 /dev/md0

That's it! I suck at understanding man pages. I'll give it a go and report back.

Edit: raid looks good, it's flagged as "clean, rebuilding" in webmin and I hear the drives doing their magic. Now all I have to do is poke around and figure out how to get email notifications sent to me if bad things happen.

Slow is Fast fucked around with this message at 21:24 on Mar 9, 2009

ZorbaTHut
May 5, 2005

wake me when the world is saved
Here's something that's bugging me.

I'm trying to raise the limit of open files on a Linux box (I'm running a distributed computing network on it, 1024 open files really isn't enough.) Since I'm going to have programs SSH'ing in and running other programs, it rather needs to be automatic. "ulimit -n" reports 1024, and that isn't enough, so I went about trying to change it.

Added to /etc/security/limits.conf:
code:
*                -       nofile          32768
Added to /etc/sysctl.conf:
code:
fs.file-max = 32768
Running "sysctl -a | grep file" confirms that the sysctl.conf line is working. However, "ulimit -n" still returns 1024.

I ran into something online which mentioned that there was an SSH bug such that "UsePrivilegeSeparation yes" in the file made it ignore the limits.conf file. I changed it to "no" and it's still 1024.

There have been multiple reboots through all of this, so I don't have just stale servers running or anything :)

All of this is being done via SSH, since I can't really log in directly. Annoyingly, I have a VM with what I thought was the same setup, and it works just fine ("ulimit -n" gives 32768) - the only known difference is that it's Ubuntu 8.10 Desktop, and the new one is Ubuntu 8.10 Server.

I'm out of ideas on how to even debug this one, I can't find any info on how to track where the ulimit is coming from.

Suggestions?

ZorbaTHut fucked around with this message at 07:16 on Mar 10, 2009

JHVH-1
Jun 28, 2002

Slow is Fast posted:

That's it! I suck at understanding man pages. I'll give it a go and report back.

Edit: raid looks good, it's flagged as "clean, rebuilding" in webmin and I hear the drives doing their magic. Now all I have to do is poke around and figure out how to get email notifications sent to me if bad things happen.

Heres a handy tip to force it to speed up rebuilding if you are impatient:
http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

ZorbaTHut posted:

Here's something that's bugging me.

I'm trying to raise the limit of open files on a Linux box (I'm running a distributed computing network on it, 1024 open files really isn't enough.) Since I'm going to have programs SSH'ing in and running other programs, it rather needs to be automatic. "ulimit -n" reports 1024, and that isn't enough, so I went about trying to change it.

I'm out of ideas on how to even debug this one, I can't find any info on how to track where the ulimit is coming from.

Suggestions?
First try this in limits.conf, just in case the "-" isn't working for some reason.
* soft nofile 32768
* hard nofile 32768

Make sure "UsePAM" is set to yes in /etc/ssh/sshd.conf. (limits.conf is invoked by pam_limits.so)

If nothing works, try putting "ulimit -n 32768" into the .bashrc for your users.

Slow is Fast
Dec 25, 2006

My raid rebuilt itself and its showing the other drive as being added. The only problem I'm having is that my other computers aren't able to use the new space. Windows mapping the network drive still reports it as only being 1tb and not 1.5 like it should be with the new drive. I deleted the mount point and tried redoing it to see if that was the problem. I'm not sure where to go from here.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Slow is Fast posted:

My raid rebuilt itself and its showing the other drive as being added. The only problem I'm having is that my other computers aren't able to use the new space. Windows mapping the network drive still reports it as only being 1tb and not 1.5 like it should be with the new drive. I deleted the mount point and tried redoing it to see if that was the problem. I'm not sure where to go from here.

You've expanded the size of the underlying device, but not the filesystem on top of it. What filesystem is it?

ZorbaTHut
May 5, 2005

wake me when the world is saved

chryst posted:

First try this in limits.conf, just in case the "-" isn't working for some reason.
* soft nofile 32768
* hard nofile 32768

Make sure "UsePAM" is set to yes in /etc/ssh/sshd.conf. (limits.conf is invoked by pam_limits.so)

If nothing works, try putting "ulimit -n 32768" into the .bashrc for your users.

Tried these without luck, I finally managed to track it down - for some bizarre reason the * wasn't working. I had to specify the user name in limits.conf.

zorba - nofile 32768

No, I can't explain this either.

Thanks for the try, though :)

deong
Jun 13, 2001

I'll see you in heck!
I'm using Ubuntu 8.10 and have an annoying mimetype issue.
How can I get jpg and JPG to show up as the same? The system does not treat jpg and JPG's as the same file type. It has created an entry for JPG, but I was hoping to just add it as one of the extensions. The single entry does not have all the nautilus support etc that jpg does. My camera uses all upper case when saving pictures, and I haven't found a way to change that.

Slow is Fast
Dec 25, 2006

ShoulderDaemon posted:

You've expanded the size of the underlying device, but not the filesystem on top of it. What filesystem is it?

Oh poo poo you're right. I'm using xfs.

The man page for xfs.
http://linux.die.net/man/8/xfs_info

Looks like it's just: xfs_growfs -d /dev/md0 correct? Should I unmount it from /mnt/storage as well?

Thanks! It worked.
vvvv

Slow is Fast fucked around with this message at 00:10 on Mar 11, 2009

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Slow is Fast posted:

Oh poo poo you're right. I'm using xfs.

The man page for xfs.
http://linux.die.net/man/8/xfs_info

Looks like it's just: xfs_growfs -d /dev/md0 correct? Should I unmount it from /mnt/storage as well?

XFS needs to be mounted in order to be grown.

If it's mounted at /mnt/storage, then xfs_growfs /mnt/storage should be all you need.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

ZorbaTHut posted:

Tried these without luck, I finally managed to track it down - for some bizarre reason the * wasn't working. I had to specify the user name in limits.conf.

zorba - nofile 32768

No, I can't explain this either.

Thanks for the try, though :)
Probably some recent security patch in pam. Glad you figured it out, cause I'm making a note to save myself headaches if I run across that.

Magicmat
Aug 14, 2000

I've got the worst fucking attorneys
Does anybody know of a good live CD that supports NTFS read/write? I'm trying to save some files of a dieing NTFS drive by offloading them to a working NTFS drive. For dded fun, all I have to boot off of currently is a Ubuntu 7.10 Live CD with no hard drive (though with a 4GB USB stick and I can install a second DVD burner, but if I can get away with only one DVD drive that'd save me some work.)

JHVH-1
Jun 28, 2002

Magicmat posted:

Does anybody know of a good live CD that supports NTFS read/write? I'm trying to save some files of a dieing NTFS drive by offloading them to a working NTFS drive. For dded fun, all I have to boot off of currently is a Ubuntu 7.10 Live CD with no hard drive (though with a 4GB USB stick and I can install a second DVD burner, but if I can get away with only one DVD drive that'd save me some work.)

RIP has ntfs3g and some cool tools:
http://rip.7bf.de/current/

Theres also NTFS-3g on the partedmagic boot cd I think.

LiquidRain
May 21, 2007

Watch the madness!

Ubuntu 8.10 Live CDs use NTFS 3g. I'm not 100% positive, but I know I was doing read/write to my NTFS drive off one last week, and I'm fairly sure that's a tell-tale sign. :)

crab avatar
Mar 15, 2006

iŧ Kë3Ł, cħ gøÐ i- <Ecl8

LiquidRain posted:

Ubuntu 8.10 Live CDs use NTFS 3g. I'm not 100% positive, but I know I was doing read/write to my NTFS drive off one last week, and I'm fairly sure that's a tell-tale sign. :)
I think I recall the live CD automounting my USB HDD formatted to NTFS since at least 7.10, maybe 7.04.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

jegHegy posted:

I think I recall the live CD automounting my USB HDD formatted to NTFS since at least 7.10, maybe 7.04.
NTFS read support has been in the kernel for quite a while now. It was write that was wonky.

Anyway, I think it should be in both fedora and ubuntus lates livecds. I know it's in the installed version of fedora.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender
Even if ntfs 3g isn't on an Ubuntu livecd by default, you can install it via the package manager.

Magicmat
Aug 14, 2000

I've got the worst fucking attorneys
Awesome, Ubuntu 8.10 worked out-of-the-box perfectly! Score another one for Ubuntu, I guess.

Now for an even better question: I need to run the Samsung hard drive diagnostic utility, esTool. Problem is, it only runs off a DOS boot disk. So how do I create a DOS boot disk from within Linux? I'd prefer to get it running off my USB stick, but I'll settle for burning an entire CD for a 2 MB utility, I guess.

Samsung, as some sort of sick joke, provides two versions of esTool on their page, one for a floppy and one for a CD-ROM. The floppy version is just a zip containing estool.exe; the CD version, however, is zip file containing an ISO. Now, if you were expecting an ISO -- a file format meant to contain an exact replica of a disk -- to be able to be burned to a disk and you're good to go, oh ho ho, jokes on you: the ISO just contains estool.exe and a batch file called run.bat containing only the line "estool.exe" :ughh:

GringoGrande
Jul 27, 2001
Nah...
This page explains where to get and how to add stuff to DOS boot disks in Linux

Something Awesome
Feb 14, 2007
i mean awful
on an ubuntu system, say i have a broken installation of something (samba in this case, i deleted /etc/samba), how can i get apt-get install samba to run again, and re-write it's configs and such?

Lucien
May 2, 2007

check it out i'm a samurai ^_^

Something Awesome posted:

on an ubuntu system, say i have a broken installation of something (samba in this case, i deleted /etc/samba), how can i get apt-get install samba to run again, and re-write it's configs and such?
code:
# dpkg-reconfigure samba

hlfrk414
Dec 31, 2008
I want to update Pylint to a newer version on my laptop running ubuntu hardy. But after adding the repo to synaptic, it doesn't pick up the more recent version. Does that mean hardy can't use anything past .13 or am I doing something wrong? I am using pylint with pydev and it does not handle with statements correctly, meaning modules using with lose all static checking and warnings.

musclecoder
Oct 23, 2006

I'm all about meeting girls. I'm all about meeting guys.

hlfrk414 posted:

I want to update Pylint to a newer version on my laptop running ubuntu hardy. But after adding the repo to synaptic, it doesn't pick up the more recent version. Does that mean hardy can't use anything past .13 or am I doing something wrong? I am using pylint with pydev and it does not handle with statements correctly, meaning modules using with lose all static checking and warnings.

Just making sure you did the basics, did you do a sudo apt-get update after you added the url?

hlfrk414
Dec 31, 2008

musclecoder posted:

Just making sure you did the basics, did you do a sudo apt-get update after you added the url?

Yup. Normally I can figure stuff like this out, but I don't know what to look for. I've added the repo along with the signed key, I've done similar before and when I've done it wrong it complains very loudly. Nothing in ubuntu should be relying on pylint, so no dependencies should prevent me from using the newest version. And pylint 1.4 and above support python 2.5, so that shouldn't be an issue. I can't see what I'm missing.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

hlfrk414 posted:

I want to update Pylint to a newer version on my laptop running ubuntu hardy. But after adding the repo to synaptic, it doesn't pick up the more recent version. Does that mean hardy can't use anything past .13 or am I doing something wrong? I am using pylint with pydev and it does not handle with statements correctly, meaning modules using with lose all static checking and warnings.

That repository does not appear to include pylint. What version of pylint do you need? It looks like it shouldn't be too hard for me to throw together a backport for you against hardy.

Edit: If you have the hardy-updates apt source configured (which you should), then you should be able to install this .deb from jaunty which will bring you to version 0.15.2. If you need better than that, Debian has 0.16.0 which will probably install directly, but if not can be rather trivially repackaged for your version.

ShoulderDaemon fucked around with this message at 23:55 on Mar 13, 2009

hlfrk414
Dec 31, 2008
Thanks, that's good enough for me. I totally forgot that I could get a deb, but I kinda question why that repository doesn't contain pylint. Ah well.

bitprophet
Jul 22, 2004
Taco Defender

hlfrk414 posted:

Thanks, that's good enough for me. I totally forgot that I could get a deb, but I kinda question why that repository doesn't contain pylint. Ah well.

Silly question, why are you wanting to install it via Apt anyways? I've found the best/easiest/least painful way to manage Python modules is via easy_install or pip, so that only my core Python itself (and `python-setuptools` for easy_install) are in Apt and the rest I install via easy_install/pip.

In terms of being able to upgrade, I think those tools are capable of upgrading; in terms of removal, they can't, but use of virtualenv makes it (and management of Python libs overall) a whole lot easier.

(Note that all this doesn't imply that doing it via Apt is bad per se, but I've been a Debian sysadmin and Python coder for years, and wrestled with the problem of Python libs in/out of Apt for a long time. Switching to the above setup has been amazing in terms of keeping things straight for me.)

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
This has been strangely difficult to google, I have a remote ssh connection into my box that's been there since december 2008, I want to kill it. How? (preferably not killing the other connections coming in)

waffle iron
Jan 16, 2004

NZAmoeba posted:

This has been strangely difficult to google, I have a remote ssh connection into my box that's been there since december 2008, I want to kill it. How? (preferably not killing the other connections coming in)
/sbin/service sshd restart doesn't close any connections so you're going to have to identify the exact process for the connection and do a kill on it.

"ps aux | grep ssh" should give you a list of processes. I forget if sshd sets the username of connecting user.

Edit: Maybe the output of "who" might list it.

waffle iron fucked around with this message at 21:49 on Mar 15, 2009

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I update my time zone data in zoneinfo? I'm running Fedora Core 7. I tried yum update tzdata (which found an update and installed it, still in MST instead of MDT though).

waffle iron
Jan 16, 2004

fletcher posted:

How do I update my time zone data in zoneinfo? I'm running Fedora Core 7. I tried yum update tzdata (which found an update and installed it, still in MST instead of MDT though).
Your best bet is to download a tzdata rpm from the oldest supported Fedora updates and install that. Fedora 9 should do the trick. tzdata is noarch anyway.

http://rpm.pbone.net/index.php3/stat/4/idpl/11518506/com/tzdata-2009a-1.fc10.noarch.rpm.html

waffle iron fucked around with this message at 04:57 on Mar 16, 2009

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

waffle iron posted:

Your best bet is to download a tzdata rpm from the oldest supported Fedora updates and install that. Fedora 9 should do the trick. tzdata is noarch anyway.

Ok, got that installed. What do I do to update the time after that?

code:
[fletch@ip-12-345-678-90 ~]$ date
Sun Mar 15 20:54:30 MST 2009

waffle iron
Jan 16, 2004

fletcher posted:

Ok, got that installed. What do I do to update the time after that?

code:
[fletch@ip-12-345-678-90 ~]$ date
Sun Mar 15 20:54:30 MST 2009
Either copy or symlink the right tzdata file to /etc/localtime to make sure it's the right thing.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

waffle iron posted:

Either copy or symlink the right tzdata file to /etc/localtime to make sure it's the right thing.

Yay, thanks!

For future reference for the other idiots like me, this command:

code:
zdump -v /usr/share/zoneinfo | grep 2009
helped me locate the right file:

code:
MST7MDT  Sun Mar  8 09:00:00 2009 UTC = Sun Mar  8 03:00:00 2009 MDT isdst=1 gmtoff=-21600

fletcher fucked around with this message at 05:19 on Mar 16, 2009

juggalol
Nov 28, 2004

Rock For Sustainable Capitalism

NZAmoeba posted:

This has been strangely difficult to google, I have a remote ssh connection into my box that's been there since december 2008, I want to kill it. How? (preferably not killing the other connections coming in)

Running "lsof -i :22" would show you exactly which PIDs are active (on port 22), just kill the appropriate one.

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
Another question! (Thanks for the prior help, issue solved)

I'm trying to install rancid on this box, following the instructions from this guide: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch1_:_Network_Backups_With_Rancid

All was going well up until I got to the part where I'm supposed to run the rancid-cvs command. At first I got the error 'cvs: command not found' and quickly realised that I needed to install something else, so a quick 'yum install cvs' fixed that.

However, now when I run the rancid-cvs command, nothing happens, no error, no output at all, certainly not the output shown in the guide there. I tried re-compiling/installing rancid from the beginning in case something got missed due to cvs not being present earlier, but same problem.

Any idea on what I can do to try and diagnose the problem? I'm running Fedora 10.

to make sure nothing was happening instead of it working, just no output, I checked to see if the /usr/local/rancid//var/CVS/networking/ directory was created, it wasn't.

Adbot
ADBOT LOVES YOU

Bohemian Cowabunga
Mar 24, 2008

A simple question that has been bugging me for a while, how do i search recursively with wildcards(*) using ls?
I am trying to do the bash counterpart of C:\dir /s *.junk

Have tried to read the documentation and looked around with google, but I am unable to find a simple answer for this.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply