/srv/irclogs.ubuntu.com/2014/06/28/#ubuntu-server.txt

=== Guest61418 is now known as esde
=== not_phunyguy is now known as phunyguy
=== hxm is now known as Guest36663
=== Adri2000 is now known as Guest49824
smaptyEarlier today, I had a server running 12.04 go down. Found out that a package got updated that removed firmware for a aic94xx controller. Seems like it got removed from a package for legal reasons, but there was no warning before it removed the firmware.03:27
Patrickdkthere is always a warning03:31
Patrickdkit's in the change logs03:32
smaptyFair enough. Unless I was looking for it in the changelogs specifically, amongst all the other updates that the machine received, it’s incredibly easy to overlook.03:42
Patrickdkhmm, I have mine set to show me all the changelog when I update the machine03:48
PatrickdkI also have it set so all updates get emailed to me, and I look over them03:48
Patrickdkjust sign up on the maillist to receive them03:49
Patrickdkit just matters exactly how much you care03:49
smaptyIt’s not a matter of if I cared or not, the server is a tool and it’s maintainence is important, but it’s not my primary responsibility. It’s a tool I use for development for other things. Thanks for the direction toward getting the changelists when I go to update.03:53
smaptyI’ll take a look at getting that setup.03:54
morenoh152hello all05:27
morenoh152can I use gparted to make my current server raid 1?05:30
morenoh152I already used it to format my new hdd. But I need to make the new hdd work with my current hdd. Anyway to avoid a installation?05:30
morenoh152*reinstallation05:30
morenoh152how can I make a partition extended with gparted?06:01
=== Lcawte|Away is now known as Lcawte
=== mswart_ is now known as mswart
lordievaderGood morning.08:21
=== Lcawte is now known as Lcawte|Away
=== airtonix_ is now known as airtonix
=== Ursinha is now known as Ursinha-afk
bitbyteIs there a way to run chmod, on a full directory and tell it only to do files not folders ?10:14
bitbyteso I want to it to run through check every folder and amend every file10:14
maswanyou'd need to use find to do that10:15
TJ-bitbyte: " find /path/to/base -type d -execdir chmod .... {} \;" maybe?10:15
TJ-bitbyte: oops, "-type f" !10:16
bitbytemmmm i’ll give it a shot, i’m currently just amending my plex directory so you can see lots of folders and files scattered all over10:16
bitbyteTJ- : so you think this will do without the quotes “ find /media/data/plex_source/ -type f -execdir chmod 644 {} \; “10:17
bitbyteTJ- it worked like a charm thanks for the help10:36
bitbyteAnother quick one guys if you don’t mind, im trying to run “ find /media/data/plex_source/anime/One\ Piece/ -type f -execdir rename -v 's/L@mBerT/ /' *.mkv {} \; “ without the quotes but when it gets to the @ sign it dies thinking it needs a package11:02
=== Ursinha-afk is now known as Ursinha
TJ-bitbyte: does it need escaping, with "\@"11:12
bitbytei’ll give it a shot thanks11:12
=== Ursinha is now known as Ursinha-afk
=== Lcawte|Away is now known as Lcawte
=== luminous_ is now known as luminous
histot14:35
ahmadgbgHi, i need to put 20TB in raid 5. Which drives should i use? I heard something about "Nonrecoverable Read Errors per Bits read". Thanks for the help!14:37
ahmadgbganyone14:42
RoyKahmadgbg: well14:49
RoyKahmadgbg: what sort of use?14:50
ahmadgbgRoyK: Storage and like 5 websites14:50
RoyKwhat sort of storage? VMs? archive?14:51
RoyKwhat sort of i/o pattern do you expect?14:51
RoyKahmadgbg: if you don't know, just describe the use of the server as well as you can14:52
ahmadgbgRoyk: Archive, i will put raw videos from the cam to save them, I will even use a NAS to back them up.14:53
ahmadgbgRoyk: The websites will be wordpress14:53
andolahmadgbg: Not sure if you want to use RAID5 for a 20TB array. With that amount of data there is supposedly a significant risk of a second disk failuring during the rebuild which happens after a firsk disk dies.14:54
RoyKahmadgbg: do you expect lots of traffic on the websites? if not, it shouldn't matter a lot14:54
RoyKandol++14:54
RoyKahmadgbg: better use raid6 - rebuild time for a large raid is significant14:54
ahmadgbgRoyk: not so much.. like 2000 unique visitors/month14:54
RoyKahmadgbg: I guess my mobile phone could do that ;)14:54
ahmadgbgRoyk: haha :D... So if i use Raid 6.. which drives should i use14:55
RoyKahmadgbg: for such use, probably WD Red or something14:55
bekksahmadgbg: how man drive ports does your controller have?14:55
RoyKahmadgbg: doesn't seem to be very i/o intensive14:55
RoyKbekks: I guess it's better to get controllers enough or controllers large enough than just basing it on what's there14:56
ahmadgbgRoyk: so i can use 10^14 drives?14:56
ahmadgbgbekks: 6 ports14:56
bekksRoyK: yeah, so it would be interesting wether he already has a controller.14:57
tonyyarussoDoes it need to be hardware RAID or would mdadm work?14:57
RoyKahmadgbg: IMHO there's very little difference between enterprise drives and consumer drives. it's mostly marketing BS14:57
RoyKtonyyarusso: MD usually does a better job than hw raid ;)14:57
tonyyarussoRoyK: I often use MD myself.  It's an ongoing debate at the office.  :)14:57
RoyKahmadgbg: I'd recommend md raid for flexibility, or zfs if you're nervous about data consistency14:58
RoyKahmadgbg: but then - a bitflop or two won't ruin a video14:58
ahmadgbgRoyK: i was thing about zfs2 i think its named?14:58
tonyyarussoSo, add a couple of plain SATA cards and you can support that amount a heck of a lot cheaper14:58
andolWell, having the HW RAID battery backup can sometimes be nice, but otherwise I too have a preference for mdadm.14:58
RoyKahmadgbg: zfs2? no such thing afaik14:58
tonyyarussoI also normally go for 10 rather than 5/6 - a few more drives, but better performance and safer.14:59
RoyKtonyyarusso: sure, but doesn't look like he needs the performance14:59
ahmadgbgRoyk: Z2 :D14:59
RoyKtonyyarusso: and no, raid1+0 isn't really safer than raid614:59
RoyKahmadgbg: ah - raidz2 - it's zfs' implementation of raid614:59
RoyKahmadgbg: raidz3 if you're really paranoid (and don't care much about write performance :P)15:00
ahmadgbgRoyK: ye.. should i go with that and WD red drives?15:00
RoyKahmadgbg: keep in mind that if you choose zfs, you'll lose most of the flexibility offered by md15:00
ahmadgbgRoyK: well im going to backup the data on a NAS so that wont be needed right?15:00
ahmadgbgRoyK: like?15:00
RoyKahmadgbg: so, on top of my head, I'll suggest setting up an mdraid with 4TB WD Red drives in RAID615:01
tonyyarussoI've had good luck with my handful of reds so far, fwiw.  Small sample size, but since when does the Internet care about reproducible validity of opinions?  :P15:01
RoyKahmadgbg: flexibility of adding/removing drives to the raid etc15:01
ahmadgbgRoyK: ok then i will use that :D15:01
RoyKso, 7 4TB drives in RAID6, that'll give you 20TB, or 18TiB (TiB as in what the OS reports as terabyte)15:02
RoyKso perhaps get 8 drives15:02
ahmadgbgRoyK: but i saw something about if i use 10^14, there is a change that it wont rebuild if a drive crashes15:02
RoyKahmadgbg: that's why you should use raid6 ;)15:03
ahmadgbgRoyK: smart :D15:03
RoyKahmadgbg: is this a home server or a production thing?15:03
ahmadgbgRoyK: its in between :D15:03
tonyyarussoHome *is* production!15:04
RoyKif it's a production thing and you have the budget, I'd go for seagate constellation 4TB drives15:05
RoyKtonyyarusso: hehehe15:05
ahmadgbgRoyK: its a home then :D15:05
ahmadgbgRoyK: WD red are much cheaper...15:05
RoyKahmadgbg: so, 7 or 8 drives in raid6 plus maybe a spare drive if you're nervous15:05
ahmadgbgRoyK: it wont be a problem right :D15:06
RoyKahmadgbg: and perhaps a controller like this http://www.ebay.com/itm/LSI-SAS-9211-8i-6Gbps-8Port-PCI-Express-SATA-SAS-Host-Bus-Adapter-New-/380703631558?pt=US_Server_Disk_Controllers_RAID_Cards&hash=item58a3b468c615:06
RoyKthose are good15:06
RoyKyou'll need sas-sata cables, though, but sata plugs neatly into sas, so it'll work well15:07
RoyKhttp://www.ebay.com/itm/Mini-SAS-4i-SFF-8087-36P-36-Pin-Male-to-4-SATA-7-Pin-Splitter-Adapter-Cable-0-5M-/111316051784?pt=US_Drive_Cables_dapters&hash=item19eaf4274815:07
RoyKa cable like that15:07
* RoyK likes working with storage ;)15:08
ahmadgbgNice :D.. and if i want to add more drives it will be easy right15:08
RoyKwith mdraid, yes15:08
RoyKwith zfs, no15:08
ahmadgbgis it easy to setup?15:09
RoyKit'll probably take a week (or two) to add a drive to a raid that size, but it'll work well (and the raid will be usable during that time)15:09
RoyKyes15:09
ahmadgbgnice :D15:09
ahmadgbgNow its buy time :D15:09
RoyKhehe15:10
RoyKgood luck :)15:10
luminoushi! what permissions does logstash need to read /var/log/* ?16:32
luminousI've added logstash to the adm group as an initial attempt on this, but that is not sufficient, and logstash is still getting permissions errors16:32
RoyKluminous: normally group membership in adm16:50
luminousI thought that would work too16:50
luminousapparently not16:50
=== Sieb is now known as sieb
RoyKluminous: restarted logstash?16:50
luminousyes, even restarted the whole system16:50
RoyKwhich logs does it fail to read?16:51
luminousthe init.d does some chroot stuff, but it can read other logs in /var/log just fine16:51
luminousRoyK: auth.log and all those that are owned by root:adm16:51
luminousor root:root16:51
RoyKchrooting it to disallow it to read /var/log disables it to do its job :P16:52
luminousRoyK: don't get confused there, it can read /var/log/*16:53
luminousbut it doesn't have permissions to read some of these files16:54
luminouslet me look at the script to be more specific16:54
luminousis it ok to paste 4 lines here?16:55
luminoussorry, 516:55
RoyK!pastebin | luminous16:55
ubottuluminous: For posting multi-line texts into the channel, please use http://paste.ubuntu.com | To post !screenshots use http://imagebin.org/?page=add | !pastebinit to paste directly from command line | Make sure you give us the URL for your paste - see also the channel topic.16:55
luminousok, thanks for confirming16:55
RoyKluminous: find out which files that aren't readable16:59
luminousRoyK: right now, it's anything that logstash does not own17:00
luminousbut actually, let me add world readable to auth.log17:00
luminousand we can confirm17:00
luminousI was also thinking of dropping the chroot in that init script17:00
luminousto test17:00
luminousbut the chroot chroot's logstash to /17:01
luminoushrm, it seems removing the chroot let's logstash read auth.log with the perms I've given it (added to adm group)17:04
luminousthat's weird17:04
luminousI don't know if I can debug this deeply enough right now, it might have to wait17:04
luminoussomehow the chroot --userspec seems to be limiting what logstash can see17:04
luminouseven though it's in the adm group17:05
RoyKluminous: sudo su -c "cat /var/log/auth.log" logstash17:05
luminousRoyK: logstash has no shell, so that doesn't work17:05
RoyKluminous: sudo su -s /bin/bash -c "cat /var/log/auth.log" logstash17:06
luminousthat worked17:06
RoyKthen the logstash user can read those17:06
luminousbut not when run in the chroot17:07
luminousbut I'll need to redeploy this vm to test that theory some more17:07
luminousbut I'll need to push that out till later17:07
luminoustoo many deadlines17:07
luminous:)17:07
luminousthanks for the assistance so far RoyK :)17:07
RoyK:)17:08
=== sieb is now known as Sieb
=== Guest49824 is now known as Adri2000
SpaceBasshey folks20:42
SpaceBasstrying to upgrade an old 10.10 (PPC) server which hasn't been online in a while. when I run apt-get update I get a lot of 404s and it fails. Any tips?20:43
Patrickdkuse the archive20:46
andolSpaceBass: That being the result of 10.10 not having been supported for a while, and not longer being availible in the regular repo server.20:46
SpaceBassandol, exactly20:46
SpaceBassPatrickdk, is that http://old-releases.ubuntu.com ?20:46
andolSpaceBass: Yepp20:47
Patrickdkyes20:47
Patrickdkedit your /etc/apt/sources.list to use it20:47
SpaceBassany way to apply that change to the entire sources.list ?20:47
Patrickdkyour best text editor20:47
Patrickdkor sed20:47
Patrickdkor perl20:47
Patrickdkor ...20:47
SpaceBassyeah...my see and regx are too rusty... vi it is20:47
andolSpaceBass: Still, a reinstall might be preferable, given that your current upgrade path looks something like 10.10 -> 11.04 --> 11.10 -- 12.04.20:48
SpaceBassyeah...probably easier to stand up a basic amazon instance20:49
SpaceBasshad the hardware and thought it might be worth reviving20:49
Havenstanceso i installed ubuntu 14.04 server, and it put GRUB on my USB Key, not really a problem except it wasn't the USB Key I'd like it on. how can I low level copy one drive to the other?20:56
Havenstanceanyone able to answer a question about Grub?21:10
bekksHavenstance: why dont you install grub onto where you want it?21:11
Havenstancebekks, I haven't the foggiest how, I hit the guided, Whole Disk Encryption with LVM. and when I do grub-install /dev/sdb it gives an error about installing it on encrypted disk, so I did what it said and it said it installed successfully and I now have a /boot directory which I didn't have before21:13
Havenstancebut when i reboot it throws up non-system disk or disk error replace and strike any key when ready. I put in the flash drive reboot it boots fine21:14
HavenstanceMay need to reinstall, I've had this issue before and I usually pull the USB key and let it fail then tell it where I want it to go.21:14
=== Lcawte is now known as Lcawte|Away
dkorrashi all. please can you help me, my ubuntu server has WLAN and LAN enabled and conencted to the same network, when i boot wihtout LAN connected and then connect it later, all traffic still flows over WLAN, how can i make the switch automatic to use LAN when available ?21:29
SierraARdkorras: If by WLAN you mean wireless and by LAN you mean wired, disconnect from the wireless network when you hook up the cable21:35
SierraARdkorras: I'm not certian if there's a way to automatically switch from wireless to the wired connection21:36
Patrickdksure, using metric's21:36
SierraARI also just realised this is for  aserver not a desktop, and I'm probably gave a rather stupid answer21:36
Patrickdkbut it won't switch, just new connections will use the lower one21:36
dkorrasi have search there is a program called guessnet21:39
dkorrasthere is no documentation to set it up though21:39
=== lool- is now known as lool
r4dohi guys. i'm trying to open my perl application in browser (http-service is nginx) and i getting such error: An error occurred while reading CGI reply (no response received)21:53
r4doi'm using unix socket fcgiwrap, ubuntu 14.0421:53
Patrickdkand?21:53
Patrickdkfix your perl application21:53
r4dowhat i need to fix? it worked on other server21:54
Patrickdkhow should I know?21:54
Patrickdkyour perl application does log it's errors right?21:54
r4doyes, but there are no errors in log file21:54
PatrickdkI'm not talking about the nginx log file21:55
Patrickdkdid you attempt to run the perl app yourself?21:55
r4donginx error.log is clear21:55
Patrickdkyes I know that21:55
Patrickdkthat is why you should not be looking at it21:56
Patrickdkbut at your perl applications log file21:56
r4doPatrickdk: my application log file is clear, just thar data which i write there22:00
Patrickdkwell, your perl application is crashing for some reason22:00
r4dorun from bash is ok, any errors22:00
=== circ-user-8TaE5 is now known as Thatguy
Thatguydoes any one here use proftpd?22:35
luminousopenssh sftp?22:38
ThatguyLuminous if you talking to me for some reason all my config files for it need to be able to be read as everyone22:52
Thatguyso 777 or so22:52
Patrickdk777?22:59
Patrickdkeveryone needs to write to your config files?22:59
Thatguywell i got t as22:59
Thatguy74422:59
Thatguyfor some reason it cant read the config files unless it can be read by everyone even thought the process is run under root23:00
Thatguyreally wierd23:00
Patrickdkwell, that is simple23:01
Patrickdkthe file is owned by the wrong user/group23:01
Thatguycurrently root but when i look at ps aux o see who is running proftpd its root23:02
Patrickdkwhat is the /etc/proftpd folder owned by?23:02
Thatguy"root      8720  0.0  0.0 118484  2400 ?        Ss   Jun28   0:00 proftpd: (accepting connections)"23:02
Thatguyroot23:03
Thatguyand group root23:03
Patrickdkhmm23:03
Patrickdkmine is the same23:03
Patrickdkexcept the config files I have passwords in, is owned by proftpd and only readable via proftpd user23:04
Thatguyhmm23:04
ThatguyI'll see if there a ruser caled proftpd23:04
Patrickdkproftpd   1446  0.0  0.0  84076  2184 ?        Ss   Jun22   0:02 proftpd: (accepting connections)23:04
Thatguyhmm23:06
Thatguyjust set the user of the files to proftpd and nothing23:06
Patrickdkya, in the proftpd you configure the user/group23:06
Patrickdkso it's up to you23:06
Patrickdkthe debian maintainer never really *debianized* it23:06
Thatguysays root23:07
ThatguyI believe its set to root so I can set the ftp user uid23:07
Thatguyso say if you login as23:07
Thatguyuser1 it will use say thatguy on the system23:08
Thatguyhow i gt it setup for my websites23:08
Thatguyeach website under different user23:08
Thatguythen each ftp account needs to be under a different user as well23:08
Patrickdksame with me23:08
Thatguygot mine reading off mysql db :D23:09
Thatguyfor the users23:09
Thatguyin your init.d/proftpd does it say what user to run as?23:10
Patrickdkno23:10
Thatguyok23:11
ThatguyI think i have fixed it23:12
Thatguysoon know23:12
ThatguyPatickdk thanks I think we've fixed it23:21
Thatguyyay23:21
Patrickdk:)23:22
z1hazewould someone please help me make a script that would make backups for a directory for me every like every hour? im trying to setup a backup system for this game server im running.. but the console is very primitive because its in alpha still23:25
histoz1haze: use cron23:28
histoz1haze: where are you copying the backup to?23:28
z1hazei just want to create a backup folder within the game folder23:28
z1hazei dont know what cron is, im sorry i dont know how to program i just play games :\ lol23:29
z1hazei found a tut on making a shell script to backup23:29
histoz1haze: cron is just what you want.23:29
z1hazebut can it be automated, like if the server process is running, it does this every hour23:29
z1hazeok great: how do i use this?23:30
histoz1haze: you can schedule a task to run every hour of every day of the month to cp /some/file /to/another/place23:30
histoz1haze: crontab -e23:30
z1hazeok great, but in my case its a series of region files23:30
z1hazewell actually i want to do the entire contents of the region folder23:31
z1hazeonly because new region files are generated when players scout new land23:31
z1hazeand of course id like to have something like FILENAME=ug-$(date +%-Y%-m%-d)-$(date +%-T).tgz23:31
ThatguyI would be zip my self23:31
histoz1haze: so you want to create a tgz?23:31
z1hazei juist want the concept of a backups folder, generating a new zip/tar each time so its not overwriting23:32
z1hazesay like, someone gets griefed 2 days ago, but i wasnt on23:32
z1hazei dont want th ebackups to overwrite the loss, i want to be able to go back and fix that region if i need to23:32
Thatguy"zip -r date(date thinghere).zip /path/to/folder/"23:33
histoz1haze: then use tar czf /path/to/save/location.tgz /path/to/compress/directory23:33
histoz1haze: oh nvm you want sequential backups23:34
z1hazeok can we kinda start from crontab -e23:34
z1hazeyes sequential23:34
z1hazeim in contrab now, and i opened with nano23:34
histoz1haze: http://catlingmindswipe.blogspot.com/2010/02/linux-how-to-incremental-backups-using.html23:35
histoz1haze: keep in mind that you will fill up your drive unless you monitor how many of the backups you are going to create23:36
z1hazeoh wait histo, i dont need this type23:36
z1hazeit seems that backup ur describing will overwrite the same file, but only modifying new files or ones that have been changed23:37
z1hazehmm lets say i have region files 1.0 1.1 1.2 1.3 1.4 and 1.5.. i want tobackup all region files every hour23:38
z1hazebut lets say region file 1.5 has some issues with it that i need to investigate, i learn the time of the incident, i find the region backup with that timestamp, and i pull the 1.5 region file out of that backup and replace the real region file23:39
z1hazebasically, i need to schedule the execution of a shell script based on if a process is running23:40
z1hazei will write my own shell backup script, how can i schedule this based on IF the game is running23:40
histoz1haze: just call the script with cron23:42
z1hazecan you give me an example23:45
z1hazei dont understand the 0 0 5 0 stuff23:45
z1hazealso, i dont see how i can make it dependent upon a certain process is running23:45
histoz1haze: You will have to learn about scripting, cron is easy enough to explain in here.23:48
z1hazeso cant u explain if its easy enough23:48
histoz1haze: first fields are minutes, hour, day of month, month, day of week.23:49
z1hazeso what about one that is just every hour23:49
histoz1haze: 0 * * * *23:50
histoz1haze: that would be at 0 minutes, every hour, every day of mont, every month, every day of week.23:50
histoz1haze: or you could just do @hourly23:50
histoz1haze: there are special strings, @reboot, @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly23:51
z1hazeok 1 sec let me try this out on a new instance23:51
z1hazehow would i go about these 2 issues ill run ito though:23:51
z1hazeit will backup even if the server is offline (pointless)23:52
z1hazeand secondly, how to i say, i only want to keep.. 72 backups23:52
z1hazebut now that im thinking about it, your ideea of the incremental is not bad because if nthing is changed is those previous regions, why do i need them backed up every time23:52
z1hazeit wil make it harder to find the filse i need though i bet23:53
histoz1haze: you could just back up the changes or the whole thing.23:53
z1hazeyea i want to backup changes23:53
z1hazedo you know how to write that23:53
histoz1haze: yes23:53
histoz1haze: just write a script that checks if your process is running, if it is then create a backup.23:54
z1hazegreat, let me get this instance up and running so it can be tested23:54
z1hazehaha i have no diea how to do that but ill be back23:55
z1haze1 min, thanks for helping me23:55
histoz1haze: i'm not going to write it for you. Then you won't learn, I will answer questions that you come across though.23:55
z1hazeive never written scripts in my life im not a programmer23:56
histoz1haze: you don't have to be a programmer. It's plain text just the commands that you would type in a console.23:57

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!