[01:33] <vhaylor> hi, i'm working on a kickstart script for ubuntu-server-mini 14.04, anyone have much experience with kickstart?
[01:34] <_1_jb> m/f
[06:29] <jeffreylevesque> i have a bash script called `bash_loader`.  I'd like this script to run at each ubuntu (14.04) bootup.  Do i simply create `/etc/init/my.conf` (does it have to be a conf file?), with https://bpaste.net/show/73983b56fe34?
[06:31] <linocisco> I have nokia E5 and using intenet on laptop via USB cable. I want to share internet to ubuntu server from Nokia E5 via USB cable, what do i do? what to install first?
[06:37] <lordievader> Good morning.
[06:37] <linocisco> lordievader, thanks for icebreaking
[06:38] <lordievader> linocisco: ?
[06:39] <linocisco> lordievader, yes
[06:40] <lordievader> Icebreaking? I'm just saying goodmorning ;)
[06:41] <linocisco> lordievader, this server channel is still silent
[06:41] <lordievader> It's early. Stick around, be patient.
[06:43] <linocisco> lordievader, i m not from GMT-. I am from GMT+. so if this channel is only for western countries users, sorry
[06:44] <linocisco> lordievader, i have silent patience
[06:45] <lordievader> It isn't, but it is usually quiet in the morning ;)
[06:46] <linocisco> please love me or I'be gone!
[06:47] <lordievader> Going away doesn't help....
[10:18] <mv> hello im running ubuntu server, my package system is broken and the help of other people broke my kernel i think. i was upgrading from ubuntu server 14.04 to 14.10. also grub is broken, now i start from livecd and mount the systeem and chroot to it. can this still be repaired? (#ubuntu told me to ask more info here), i would prefer to fix it somehow instead of full reinstall
[10:25] <lordievader> mv: Do you still have broken packages?
[10:26] <mv> im not sure, apt-get -f reports error, install gives error that it needs other packages
[10:27] <lordievader> mv: Could you pastebin that output?
[10:28] <mv> il try, which one do you want? from -f install?
[10:28] <lordievader> To start with, yes.
[10:31] <mv> pastebin.com/1cx7iUR2
[10:32] <lordievader> update-initramfs: not found.... Wut?
[10:32] <lordievader> Did you remove initramfs-tools?
[10:33] <mv> some people tried to help me, and they did remove it.
[10:33] <lordievader> Why?
[10:33] <mv> because it came up in the list of errors from apt-get
[10:33] <mv> they removed a couple of packages
[10:38] <mv> lordievader would you want to look at the system yourself? i installed ssh-server on the livecd to acces it.
[10:38] <jpds_> mv: We talked about this yesterday.
[10:40] <mv> jpds_ yes, but after trying all night i was able to get into the system again using the livecd
[10:42] <mv> i tried to use boot-repair to fix grub, but it comes up with the same error that apt-get -f install isnt working succesfully
[10:50] <RusAlex> q: getting this error uvt-kvm: error: timed out waiting for dnsmasq lease for. after command `uvt-kvm wait <machine> --insecure`
[10:50] <RusAlex> virbr0 networking interface has IP address
[10:50] <RusAlex> no ip address only on vnet0
[10:55] <lordievader> mv: No, remoting in is not something I do.
[10:55] <lordievader> mv: Install initramfs-tools then reinstall the kernel.
[10:56] <mv> lordievader thanks, im now trying to instal initramfs-tools, downloading from ubuntu archive and then dkpg -i initramfs-tools*.deb
[10:58] <mv> installing initramfs-tools gives dependecy problems, http://pastebin.com/xmmYGtDV
[10:59] <rbasak> RusAlex: has the VM itself got an IP address?
[10:59] <rbasak> RusAlex: you can use --log-console-output when creating the VM and then examine /var/log/libvirt/qemu/ (IIRC)
[10:59] <lordievader> !info initramfs-tools utopic
[11:00] <rbasak> RusAlex: or look in /var/lib/libvirt/dnsmasq/ and try to match up against the VM's MAC address (virsh dumpxml <name>)
[11:00] <lordievader> !info initramfs-tools trusty
[11:00] <lordievader> mv: From where did you get the package?
[11:01] <mv> http://packages.ubuntu.com/precise-updates/all/initramfs-tools/download
[11:02] <mv> uhm after changing the url im thinking i should use this one? http://packages.ubuntu.com/trusty-updates/all/initramfs-tools/download
[11:02] <lordievader> Precise?
[11:03] <lordievader> No wonder you get dependency issues.
[11:03] <lordievader> mv: What does /etc/issue say?
[11:03] <RusAlex> rbasak: there is cloud-init-nonet[16.90]: waiting 120 seconds for network devic
[11:03] <RusAlex> and then gave up waiting for a network device
[11:04] <mv> it says Ubuntu 14.10
[11:04] <mv> trudy initramfs-tools also gives error http://pastebin.com/H71UR8xR
[11:05] <RusAlex> Booting system without full network configuration...
[11:05] <lordievader> mv: Then get the utopic one.
[11:05] <lordievader> mv: And try to use apt.
[11:06] <mv> lordievader: both gave dependencie problems http://pastebin.com/sdeRSCuX
[11:07] <lordievader> mv: Hence the notion to use apt.
[11:08] <mv> apt-get install initramfs-tools right? i used that one and put the log in the same text here http://pastebin.com/sdeRSCuX
[11:09] <rbasak> RusAlex: sounds like DHCP isn't working on your virbr0.
[11:09] <RusAlex> yes
[11:10] <rbasak> Are you running Vivid?
[11:10] <RusAlex> reading libvirtd help
[11:10] <lordievader> mv: What is the output of "apt-cache policy initramfs-tools initramfs-tools-bin"?
[11:11] <RusAlex> rbasak: i have 14.02 ?
[11:11] <mv> http://pastebin.com/SKXwDxLi
[11:11] <lordievader> mv: apt-get install initramfs-tools-bin
[11:12] <lordievader> !info util-linux utopic
[11:14] <mv> http://pastebin.com/mzUgfPJA
[11:15] <lordievader> mv: Do as it says.
[11:17] <RusAlex> rbasak: thanks . finally enabled
[11:17] <RusAlex> sorted
[11:17] <mv> apt-get -f install http://pastebin.com/4pdi23s8
[11:18] <lordievader> mv: Select those pacakges it want to remove for install.
[11:18] <lordievader> Then try again.
[11:19] <mv> like this "apt-get remove linux-image-3.16.0-031600-lowlatency linux-image-extra-3.13.0-49-generic"?
[11:19] <lordievader> No, select them for install.
[11:19] <mv> okY
[11:20] <mv> http://pastebin.com/B13CczsU
[11:21] <lordievader> Well that is a pickle.
[11:22] <lordievader> Perhaps 'apt-get install -f initramfs-tools-bin' works?
[11:23] <mv> http://pastebin.com/RQhhd67v
[11:23] <mv> i trusted to wrong people on facebook to help me, they made it allot worse, before them grub and initramfs was still working.
[11:24] <lordievader> apt-get install util-linux
[11:24] <lordievader> apt-get install util-linux udev
[11:24] <lordievader> apt-get install util-linux udev initramfs-tools-bin
[11:25] <mv> http://pastebin.com/TwTnztjD
[11:26]  * ogra_ wonders how you actually got into that situation ... 
[11:26] <lordievader> mv: Dependency hell :P
[11:26] <lordievader> You could manually go through everything...
[11:26] <ogra_> do-release-upgrade should efinitely have cared for this properly
[11:27] <mv> i tried upgrading from 14.04 to 14.10 (in the past running older version, i thought 12)
[11:27] <lordievader> Or find someway of removing those kernels/preventing apt-get install -f to remove them before fixing things.
[11:27] <lordievader> ogra_: I think it is rather what he did trying to fix things that got him in this mess.
[11:28] <mv> im afraid lordievader is right
[11:28] <ogra_> lordievader, point is that there shouldnt be anything to fix :)
[11:28] <lordievader> mv: Do you have a backlog of what you did exactly?
[11:28] <ogra_> do-release-upgrade gets tested in 100 variations and corner cases nowadays ... and should cover you from such mess
[11:29] <ogra_> (unless you pull the power plug in the middle of an upgrae or some such ... )
[11:29]  * lordievader whispers ppa's
[11:29] <mv> here you can see a backlog, and the people who tried to help me. https://www.facebook.com/photo.php?fbid=828768073837036&set=gm.1062529163761527&type=1&theater
[11:29] <ogra_> lordievader, it disables them all :)
[11:30] <lordievader> Was more talking about the dependency hell thing than the upgrade.
[11:31] <lordievader> You installed a kernel outside of the Ubuntu repo?
[11:31]  * lordievader sigh
[11:31] <mv> they send me 3 links to kernel files to install
[11:32] <lordievader> So much for FB support....
[11:32] <lordievader> mv: Use dpkg to purge those kernels.
[11:32] <ogra_> lol
[11:32] <mv> i will never ever ask on an FB group for help anymore
[11:33] <lordievader> mv: The trouble is they didn't ask questions on what the problem was. They assumed you were running Debian and started shouting things...
[11:33] <mv> lordievader: dpkg --purge "linux-image.."?
[11:33]  * ogra_ would actually start with: sudo apt-get -f install ... 
[11:34] <ogra_> to get back to a half way consistent state
[11:34] <ogra_> and then move forward from there
[11:34] <lordievader> ogra_: That is broken because it tries to remove the kernels but it need initramfs-tools for it, which is broken too.
[11:35] <lordievader> mv: Not all of them, just those installed outside of the Ubuntu repos.
[11:35] <ogra_> lordievader, it doesnt remove everything cleanly ?
[11:35] <lordievader> ogra_: The postrm script fails on calling initramfs (since its broken) and then apt gives up.
[11:36] <ogra_> so create a link to from /usr/sbin/update-initramfs to /bin/true
[11:36] <ogra_> to overcome that ...
[11:37] <ogra_> one you are back in a semi consistent state, make sure the sources.list is proper, then install "linux" ... that should pull in all kernel related bits
[11:37] <ogra_> (might need some manual grub love later though)
[11:37] <mv> i tried purging the kernel, http://pastebin.com/FcERJga3
[11:38] <ogra_> (and make sure to *never reboot until you are sure it is all fixed)
[11:38] <lordievader> mv: Follow ogra_'s advice.
[11:38] <lordievader> ogra_: He is in a live-cd chrooted ;)
[11:38] <mv> yeah they made me remove grub, and an other friend made me reboot to livecd
[11:39] <lordievader> mv: You know, even now, you should use common sense.
[11:39] <lordievader> Is a good idea to remove grub? Hmm, perhaps not...
[11:39] <mv> lordievader your so right, i made the mistake to trust them blindly
[11:40] <mv> they sayt like yeah remove grub and etc. and after apt-get -f inistall reinstall grub
[11:40] <lordievader> Sure it is possible, but why?
[11:41] <lordievader> Without a good reason I wouldn't do it.
[11:42] <RusAlex> q: im trying to restore my custom iptables rules
[11:42] <RusAlex> tried 2 ways already
[11:42] <lordievader> RusAlex: iptables-restore < iptables-file?
[11:43] <RusAlex> yes. but tried to run this command in /etc/network/if-up.d/iptablesload as per Network Howto
[11:43] <lordievader> Meh, you could put it in there. I don't like things dissapearing based on interfaces.
[11:44] <lordievader> Personal preference I guess.
[11:45] <RusAlex> but where do you place it?
[11:45] <RusAlex> I also tried to use /etc/network/interfaces file with pre-up iptables-restore < /etc/iptables.rules
[11:45] <RusAlex> but no success. after reboot it does not restore
[11:47]  * ogra_ always uses ufw ... 
[11:48]  * lordievader dislikes ufw
[11:48] <lordievader> :P
[11:48] <mv> "dpkg --purge linux-image-extra-3.13.0-49-generic" is failing "FATAL: could not load /boot/System.map-3.13-0/49-Generic: no such file"
[11:49] <lordievader> Copy some other system map? (Ugly hacks save the day????)
[11:49] <mv> oh, also. my friend yesterday made me copy /boot from ubuntu 14.04 server cd to my system, so now i get the cd grub when booting without livecd
[11:51] <lordievader> Before you copied stuff did you happen to remove the contents of /boot?
[11:51] <mv> i didnt remove. i just used cp -R /cdrom/boot /mnt. i mounted my system on there
[11:52] <mv> contents of /boot now are "grub  memtest86+.bin  memtest86+.elf  memtest86+_multiboot.bin"
[11:53] <lordievader> Just that?
[11:53] <mv> yes
[11:54] <lordievader> Did you nuke /boot or did you forget to mount it?
[11:54] <mv> uhm, im not sure
[11:55] <lordievader> mv: Go figure it out ;)
[11:56] <mv> boot isnt in the mount list. so that would mean its not mounted
[11:57] <lordievader> If it is a seperate partition, yes.
[11:57] <mv> im not sure if it is a seperate partition. i used the default settings from the ubuntu cd when installing it in the past
[11:57] <lordievader> mv: parted -l
[11:58] <mv> parted isnt installed :c
[11:58] <lordievader> fdisk -l
[11:59] <mv> fdisk is from util-linux, which they also nuked...
[12:00] <lordievader> Pfff.
[12:00] <lordievader> Use the one of the live-cd.
[12:01] <mv> should i do it outside of chroot? or on the desktop from the livecd?
[12:01] <lordievader> Outside of the chroot, yes.
[12:03] <mv> outside of chroot both commands return nothing
[12:03]  * lordievader is back in a bit
[12:03] <mv> ok
[12:03] <lordievader> Use sudo ;)
[12:04] <mv> ahh thanks, im feeling stupid for that mistake >_<
[12:05] <mv> http://pastebin.com/X5zpKsKF  the 30GB is my SSD running the system, /dev/sdi
[12:19] <RusAlex> hwo can I get root access to a kvm machine ?
[12:20] <RusAlex> it allows me to login only with ubuntu@host
[12:21] <ogra_> use sudo ... thats ubuntu ...
[12:22] <RusAlex> will try
[12:35] <mv> lordievader: tell me when your back?
[12:36] <arcsky> CRITICALUbuntu 10.04 LTS / 12.04 LTS / 14.04 / 14.10 : libtasn1-3, libtasn1-6 vulnerability (USN-2559-1)
[12:36] <arcsky> still got that after apt-get update
[12:37] <jpds_> arcsky: Tried upgrade ?
[12:40] <arcsky> do I have to do reboot after upgrade?
[12:40] <arcsky> maybe thats why it doesnt work
[12:40] <jpds_> arcsky: No, it's more the fact that update doesn't update the package.
[12:54] <lordievader> mv: Does the live-cd come with parted? Else install it...
[12:54] <lordievader> fdisk doesn't do gpt.
[12:56] <mv> parted -l says http://pastebin.com/2j9EZSsu
[12:58] <mv> lordievader: should i use ok?
[12:59] <lordievader> Auch.
[12:59] <lordievader> No cancel that.
[13:00] <lordievader> mv: Make it 'sudo parted /dev/sdc print'
[13:00] <mv> "error: end of file while reading succes, retry/ignore/cancel?"
[13:00] <mv> ok
[13:01] <mv> "error end of file while reading invalid argument"
[13:01] <mv> retry/ignore/cancel?
[13:03] <lordievader> This if from the live-cd right?
[13:03] <mv> yup
[13:03] <lordievader> gdisk?
[13:03] <mv> should i use gdisk?
[13:04] <lordievader> You can give it a shot. Installing it doesn't really matter as it is a live-cd anyways.
[13:04] <mv> hmm, anyway i think you would wanted to see this? http://pastebin.com/XSgw7E3V
[13:05] <lordievader> Hmm, yeah. Did I get sidetracked?
[13:05] <mv> dev-sdc is one of the drives from my RAID
[13:06] <mv> dev-sdi is my system
[13:06] <lordievader> Right, no seperate /boot.
[13:06] <lordievader> Is the /boot on sdi1 really that empty?
[13:07] <mv> http://pastebin.com/aaLY7qL0
[13:07] <lordievader> That is the chroot?
[13:08] <lordievader> Could you give the 'mount' output?
[13:08] <mv> yes its the chroot
[13:08] <mv> ok
[13:08] <mv> http://pastebin.com/ZEuRuYGu
[13:10] <lordievader>  /boot doesn't happen to be on the raid device?
[13:10] <mv> i dont think so. when i installed it it didnt have raid yet
[13:11] <lordievader> So you nuked /boot :P
[13:11] <mv> yup :c
[13:11] <lordievader> mv: Time to get drastic. Under normal circumstances you shouldn't do this: force dpkg to do all it needs to remove those two kernel packages.
[13:12] <mv> "dpkg --fore-yes --purge"?
[13:14] <lordievader> dpkg -P --force-all <packages>.deb
[13:16] <mv> http://pastebin.com/k7abhcxV
[13:17] <mv> it seems it is removed
[13:17] <mv> now try apt-get -f install?
[13:19] <lordievader> The lowlatency kernel is removed too?
[13:20] <mv> ignoring request to remove linux-image.... which isnt installed
[13:20] <mv> dpkg: warning: ignoring request to remove linux-image-3.16.0-031600-lowlatency which isn't installed
[13:20] <lordievader> Hmm, odd. Try the apt fix, I guess.
[13:22] <mv> http://pastebin.com/pmu85s9C
[13:24] <mv> it keeps complaining about linux-image-extra-3.13.0-49-generic while dpkg says it isnt installed
[13:29] <lordievader> mv: dpkg -P --force-all http://pastebin.com/pmu85s9C
[13:29] <lordievader> Err...
[13:29] <lordievader> mv: dpkg -P --force-all
[13:30] <lordievader> mv: dpkg -P --force-all linux-image-extra-3.13.0-49-generic
[13:30] <lordievader> Copy pasting in Windows is hard.
[13:30] <mv> haha okay :P
[13:30] <lordievader> Especially when it is swapping.
[13:31] <mv> http://pastebin.com/ZxsJpChg
[13:31] <mv> windows makes everything slow~
[13:33] <lordievader> Windows can be allright...  Usually it performs quite okay. Guess I'm torturing it with a A0@300dpi PS file.
[13:33] <mv> ahh thats why xD
[13:34] <mv> next week i wil start troturing it with a 4K screen, but specially for PS i got 32GB DDR3
[13:35] <mv> did you see the error message? http://pastebin.com/ZxsJpChg
[13:35] <lordievader> Even more ugly hack fixing: edit /var/lib/dpkg/info/<package>.postrm
[13:37] <mv> http://pastebin.com/qY4tPMia
[13:39] <lordievader> mv: Comment lines 9 through 15.
[13:41] <mv> done, now dpkg command again?
[13:41] <lordievader> Yes.
[13:42] <mv> done, now going to do apt-get -f install again
[13:42] <rberg> It looks like that error is comming from /usr/sbin/mkinitramfs.. line 11 very odd
[13:43] <lordievader> rberg: That's the one wich we are trying to fix. But apt want to remove the kernels before fixing initramfstools.
[13:43] <lordievader> In short, it's a mess.
[13:44] <rberg> ahh.. thats super weird to not have gnuopt
[13:44] <mv> http://pastebin.com/X5nBpBvB
[13:46] <lordievader> Whoo, there is an initramfstools :D
[13:46] <mv> its back? :D
[13:46] <lordievader> Maybe it is not configured...
[13:47] <lordievader> Anyhow, is ts3server/sickbeard required?
[13:47] <mv> they are my personal programs
[13:48] <mv> and i have 2 different sickbeard installations, one under the name animebeard
[13:48] <lordievader> Their initscripts are a mess.
[13:48] <mv> i see the error on the animebeard script. i think thats because i tried to make it work as service :c
[13:49] <lordievader> Read lines 34 till 40.
[13:49] <mv> can i just remove theire scripts somehow?
[13:51] <lordievader> You can.
[13:51] <lordievader> They are in /etc/init or /etc/init.d
[13:52] <mv> seems like apt-get -f install worked :D
[13:52] <mv> il post results
[13:52] <mv> http://pastebin.com/9cMPYFQy
[13:55] <mv> before i go do crazy things. tell me what do now first :3
[13:58] <lordievader> mv: Reinstall linux-image-generic, for starters.
[13:58] <mv> installing now :)
[13:58] <mv> so happy now it seems everything acts normal again :D
[14:08] <ogra_> install the "linux" metapackage ... not just the -image-generic one
[14:09] <mv> okay, il start that when its finnished with the image-generic
[14:14] <davegarath> Hi, I've installed proftpd on a server. Logrotate is configured for rotate weekly and run postrotate : invoke-rc.d proftpd restart
[14:14] <davegarath> but proftpd will stop and not start
[14:15] <davegarath> executing by hand invoke-rc.d proftpd restart proftpd remain stopped
[14:18] <davegarath> ok I found a bug https://bugs.launchpad.net/ubuntu/+source/proftpd-dfsg/+bug/1246245 I've inserted sleep statement in init.d script file
[14:18] <mv> still got an error when it tried to configure http://pastebin.com/QnvvaAix
[14:19] <mv> i tried the apt-get install linux, but linux package isnt found~
[14:25] <mv> now it gives errors on the linux-image-generic, etc. uhh what to do now?
[14:38] <mv> are you busy?
[14:40] <lordievader> Actually I have no idea how to fix that one properly. I've read of dirty ways (disableing the hook), but I do not know what it does, nor what the consequences of such an action are.
[14:41] <mv> ok, i tried removing the packages that where in the error list and now try installing linux-image-generic again. when removing it asks to make an boot menu file but if i say yes it gives an error.
[14:42] <mv> if it doesnt work il try your dirty way. i have nothing to loose right? now its not working so it cant get worse :P
[14:45] <lordievader> Heh, that is what you say now.
[14:46] <mv> i dont understand what you mean
[14:48] <lordievader> Now you say you got nothing to loose. Until, say, you loose all your data...
[14:50] <mv> lordievader: 2 years ago i already lost 6TB of data. im used to the hurt now xD also my most important data is on the mdadm raid
[14:51] <mv> also the really most important data, my photography, i have already on backup
[14:55] <mv> still got the same error http://pastebin.com/UwP6JyWh
[14:55] <mv> you knew a dirty way to fix it? lets try that i guess
[14:56] <lordievader> Hunt out the fixtrc script and take away its execute rights.
[14:59] <mv> you mean searching it like this (find / "*fixtrc*")? but it doesnt find anything
[14:59] <lordievader> No, your output tells you where it is.
[15:01] <mv> oh fixrtc i see
[15:01]  * lordievader is off to make dinner
[15:03] <mv> it workd! :D
[15:04] <mv> succesfully setup linux-image-generic
[15:04] <stiv2k> hi
[15:04] <mv> what should be the next step to take?
[15:04] <stiv2k> so i've had this bug on my server since day 1 of installing ubuntu 14.04... https://bugzilla.samba.org/show_bug.cgi?id=8449
[15:05] <stiv2k> and associated launchpad bug: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1257186
[15:05] <stiv2k> i read the comments in the samba bugzilla and it says they fixed it in samba 4.1
[15:05] <stiv2k> but i checked my samba...
[15:05] <stiv2k> samba -V
[15:05] <stiv2k> Version 4.1.6-Ubuntu
[15:05] <mv> stiv2k i also had the talloc error but it seemed it just worked without problems
[15:06] <stiv2k> yes i never noticed any problems either
[15:06] <stiv2k> other than shell users complaining that the message is annoying
[15:06] <mv> lordievader: can i try apt-get upgrade now? (apt-get -f install now returns without errors)
[15:07] <rbasak> stiv2k: if somebody can provide a backported fix that works and doesn't introduce any regressions, I'd be happy to upload it.
[15:07] <OpenTokix> rbasak: yes
[15:07] <rbasak> I haven't spent much time myself as I understand that it's mainly just an annoyance.
[15:07] <stiv2k> well i just wanted to know if the fix is issued in our samba packages yet
[15:07] <stiv2k> i was under the impression that they fixed it upstream in 4.1
[15:08] <stiv2k> and im running 4.1.6 so it should already be fixed....?
[15:08] <stiv2k> or am i missing something?
[15:13] <mv> lordievader: can i just try to use apt-get upgrade now? or should i do something else first?
[15:14] <rbasak> stiv2k: I think upstream backported it to their 4.1 stable branch, but if they've released it it's after 4.1.6.
[15:19] <stiv2k> rbasak: so no worries? just wait longer?
[15:21] <rbasak> stiv2k: we don't automatically update to samba's latest stable release, so it is waiting on somebody to backport and test. I don't know if it'll get to the top of our list or not any time soon.
[15:21] <rbasak> Volunteers welcome.
[15:22] <stiv2k> rbasak: let me graduate college first
[15:22] <stiv2k> ;)
[16:19] <faust> How can I get the command executed by an user via ssh in /etc/ssh/sshrc? I'm looking for something like "SSH_ORIGINAL_COMMAND"
[16:32] <pmatulis> faust: not sure what you mean.  you want a command issued automatically when a user connects via ssh?
[16:33] <faust> pmatulis: e.g. an user run "ssh root@server uname -a" I want my /etc/ssh/sshrc to know that the user run "uname -a"
[16:34] <pmatulis> faust: you want that b/c sshrc will act on it in some way?
[16:35] <faust> I'm looking for something like the SSH_ORIGINAL_COMMAND enviroment variable defined for the script run by ForceCommand
[16:35] <faust> pmatulis: yes
[16:39] <pmatulis> faust: i don't think it's possible b/c sshrc is run before the remote command is run
[16:42] <faust> pmatulis: when you use ForceCommand that script is run before the remote command, but you have access to its command line via SSH_ORIGINAL_COMMAND, but probably you are rigth it is not possible...
[16:53] <lordievader> mv: You have a kernel installed?
[16:54] <mv> lordievader: yes, no i was trying apt-get upgrade but its just finished with some errors
[16:54] <ogra_> lordievader, well, if the fixrtc hok failed there is something seriously essential missing (did you check what it copies)
[16:54] <lordievader> ogra_: No, as I mentioned before I have no idea what it does.
[16:55] <ogra_> that looks more like something like core-utils and e2fsprogs are missing
[16:55] <mv> but the kernel installed succesfully. http://pastebin.com/mS9AcCuy
[16:55] <ogra_> it copies three files around
[16:55] <ogra_> these three are: /bin/date /sbin/hwclock /sbin/dumpe2fs
[16:56] <ogra_> if it cant find them i assume there was more essential stuff remnoved than just the kernel or grub
[16:59] <mv> e2fsprogs seems not installed. should i try install it?
[17:00] <ogra_> is ubuntu-minimal installed ?
[17:00] <ogra_> that pulls the most essential bit in
[17:00] <mv> no i dont think so. il try to let it install.
[17:01] <pmatulis> faust: yes, but SSH_ORIGINAL_COMMAND is within the user's shell/environment.  sshrc is not run within that environment so i don't know how it could ever discover it
[17:03] <mv> it looks like its downloading fonts and installing them~
[17:03] <mv> now adobe-flash-plugin
[17:03] <ogra_> when you install the ubuntu-minimal task ?
[17:04] <mv> yup
[17:04] <mv> its done now, no errors
[17:04] <ogra_> this sounds surely mseed up
[17:04] <ogra_> *messed
[17:04] <pmatulis> faust: however, ~/.ssh/rc (user level) is run within the user's env so you could grab it in that way
[17:04] <mv> maybe its because of previous updates
[17:05] <ogra_> what else did it install ?
[17:05] <mv> yes, all upgrades have been done now, only 120 updates are held back
[17:05] <ogra_> err
[17:05] <ogra_> you should not have any held back updates
[17:05] <ogra_> (never)
[17:05] <mv> it says so now
[17:06] <faust> pmatulis: mm I cannot use ~/.ssh/rc, but thanks anyway
[17:06] <mv> if i try apt-get upgrade
[17:06] <ogra_> dont use upgrade ...
[17:06] <ogra_> use dist-upgrade
[17:06] <lordievader> Ah, what happens when you do apt-get dist-upgrade
[17:06] <mv> doing so now
[17:06] <mv> its installing allot more updates
[17:06] <mv> 120 and 97 newly installed
[17:07] <ogra_> anyway, missing ubuntu-minimal is quite serious and actually the point where i would start to suggest a reinstall ...
[17:07] <ogra_> but finish that dist-upgrade first and see where that leaves you
[17:07] <mv> but its reinstalled now right? and its updating. ok il wait for it to finish
[17:08] <mv> it will take a while now it says 31~20 mins
[17:09] <mv> i never knew i should use dist-upgrade. i always been told to use upgrade from my teacher... (our teacher just got a linux mint workshop of a couple hours and a linux mint book, so he also didnt know much)
[17:10] <ogra_> upgrdae will only update installed packages ... if it needs to remove something due to a changed dependency it will hold back the package and all its dependencies
[17:10] <ogra_> dist-upgrade will always also remove and replace other packages to fulfill everything
[17:10] <mv> ohh good to know :) i learn so much more from the community then from teachers at school
[17:10] <ogra_> also ... mint != ubuntu
[17:11] <ogra_> they hack up things like the upgrade mechanism heavily
[17:11] <ogra_> nothing we have any experience with in here
[17:11] <mv> so ubuntu is much better then mint? :)
[17:11] <ogra_> not saying that
[17:11] <pmatulis> i wonder why mint would hack such a thing?
[17:11] <lordievader> Better is a matter of opinion.
[17:11] <mv> okay, better in your opinion?
[17:12] <ogra_> pmatulis, to suppress kernel upgrades, xorg and grub upgrades etc
[17:12] <lordievader> Have never used Mint, can't say.
[17:12] <pmatulis> ogra_: wow interesting ok
[17:12] <ogra_> pmatulis, they also replace some essentiual libs with their own patched versions (sometimes without bumping the ABI ...)
[17:13] <ogra_> and i doubt do-release-upgrade even works on mint ...
[17:13] <ogra_> ... while on ubuntu this is the only official way to go from one release to another
[17:14]  * ogra_ wont say anything more about mint ... the last time i did i ended up with a 3 week long shitstorm and and presonal threads from mint people ... 
[17:14] <mv> im curious if grub would be working again now? if i could later restart and wont use livecd anymore~
[17:15] <mv> ogra_ omg thats really crazy. people shouldnt be so hatefull
[17:15] <ogra_> well, they thought it was a canonical conspiracy ... :)
[17:15] <mv> but still they shouldnt be so hatefull
[17:15] <ogra_> http://www.omgubuntu.co.uk/2013/11/canonical-dev-dont-use-linux-mint-online-banking-unsecure
[17:16] <ogra_> well, there was a lot clickbait stuff going on ... i made a comment on a developer mailing list and the press pulled it out of context and added sensationalist headlines
[17:17] <mv> im reading it now~ but the press nuked it all? thats to bad
[17:17] <ogra_> just google "wouldn't do homebanking with mint"
[17:17] <ogra_> you will find a lot more articles
[17:17] <mv> il take a look
[17:18] <mv> i just notice your from germany, greetings from your neighbour from the netherlands :D
[17:20]  * ogra_ waves west 
[17:20] <ogra_> :)
[17:20] <mv> :)
[17:21] <lordievader> Oehh, more dutchies :)
[17:21] <mv> lordvader: im curious where your from?
[17:21] <mv> im a dutchie yes :P
[17:21] <Seveas> too many dutchies
[17:21] <mv> really? why? :c
[17:22] <lordievader> mv: Make an educated guess ;)
[17:22] <mv> lordievader: my guess would by a dutchie too? :#
[17:23] <lordievader> Wow, first guess.. and it's right....
[17:23] <Seveas> lordievader: Tatooine
[17:23] <ogra_> lol
[17:23] <mv> haha you wish
[17:25] <mv> just a curiouse question. for a home server would you recomend not updating at all? (if it works dont mess with it~)
[17:25] <Seveas> for a home server I'd enable automatic dist-upgrades and even reboots.
[17:26] <ogra_> i would keep the reboots manual ... but thats just me :)
[17:26] <ogra_> but yeah, enable unattended-upgrades
[17:26] <mv> i wouldnt know howto do that~ now i just use webmin and sometimes when neccesery ssh/cli
[17:26] <Seveas> webmin is more of a security risk than mint
[17:26] <lordievader> !webmin
[17:26] <mv> but its totally safe to enaable unattended upgrades?
[17:26] <ogra_> LOL
[17:27] <mv> looool
[17:27] <ogra_> https://help.ubuntu.com/community/AutomaticSecurityUpdates
[17:27] <mv> so webmin is a really no go? xD
[17:27] <lordievader> Not on Ubuntu/Debian.
[17:27] <ogra_> if the machine is visible on the internet it definitely is a no-go
[17:28] <Seveas> it's always a no-go
[17:28] <Seveas> just like cpanel
[17:28] <mv> hmm its at my home, but i enabled it so i can access webmin from school~
[17:28] <Seveas> and most other web based admin frontends
[17:28] <ogra_> well, if you have a safe firewall and only use it for a home network i guess thats not that bad
[17:28] <ogra_> as soon as it can be seen by others it definitely is a security hole
[17:29] <mv> so i should better block webmin from being vissible from the internet? il do that then
[17:29] <mv> what about ssh? is it safe to keep that vissible to the internet?
[17:30] <lordievader> mv: You have ssh for remote management.
[17:30] <mv> i already dissabled ftp anonymous login because a couple months ago i saw google indexing my files
[17:30] <mv> yup i use ssh. even now on ssh
[17:30] <Seveas> *backing away slowly from this trainwreck*
[17:31] <mv> haha is it that bad?
[17:33] <lordievader> mv: You might also want to disable the remote management on your router, or at least disable the gues login.
[17:33] <mv> my router doesnt have remote management, i never enabled it~
[17:34] <mv> whoooo the install just ended succesfully :D
[17:34] <lordievader> mv: Is your network 10.1.1.0?
[17:34] <mv> yup, how you know?
[17:34] <lordievader> Like I said, remote management on your router is on and accesible for guests.
[17:34] <mv> WHAT?!
[17:34] <faust> o.o
[17:38] <mv> somehow my routers remote management was enabled~
[17:38] <mv> :O
[17:39] <ogra_> call the NSA, tell them they forgot to disable it ... so it doesnt happen again
[17:39] <mv> i think so xD
[17:40] <mv> anyway the dist-upgrade finished succesfully. what should i do now?
[17:41] <lordievader> Make sure grub is installed?
[17:41] <mv> it is installed. i hope it also is working
[17:41] <ogra_> it is installed in the boot record of the disk ?
[17:41] <ogra_> or just the package ...
[17:41] <lordievader> ^ that.
[17:42] <ogra_> thats the tricky part :)
[17:42] <mv> how do i know? i checked the apt-get install grub and it says installed. and i saw something in the log making image in boot
[17:42] <mv> ls /boot
[17:42] <mv> abi-3.16.0-34-generic         memtest86+.elf
[17:42] <mv> config-3.16.0-34-generic      memtest86+_multiboot.bin
[17:42] <mv> grub                          System.map-3.16.0-34-generic
[17:42] <mv> initrd.img-3.16.0-34-generic  vmlinuz-3.16.0-34-generic
[17:42] <mv> memtest86+.bin
[17:42] <lordievader> By installing it again ;)
[17:42] <mv> so reinstall it?
[17:42] <lordievader> grub-install /dev/<some-disk>
[17:43] <ogra_> https://help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2
[17:43] <ogra_> for reference :)
[17:43] <mv> okay thanks :) im really worried about trying things found on google now after all this trouble. i listen to you guys only~
[17:43] <lordievader> ...
[17:43] <lordievader> With a bit of common sense applied I hope?
[17:44] <lordievader> Else you haven't learned a thing.
[17:44] <mv> yes, i wont do anything without thinking anymore
[17:45] <lordievader> Good :)
[17:45] <mv> after grub install i get some log and then "The file /boot/grub/stage1 not read correctly.
[17:45] <mv> "
[17:45] <lordievader> Right, everything needs to error... -.-
[17:46] <mv> i see a site telling me to try from grub cli
[17:48] <lordievader> From what I read... How large is the inode size of your drive?
[17:48] <ogra_> you used sudo for that command i hope ?
[17:49] <ogra_> sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda
[17:49] <ogra_> from the wikipage above
[17:49] <mv> i used sudo
[17:50] <mv> umm, trying to find inode size. but my system drive is just 30GB
[17:51] <ogra_> then follow the next paragraph on the page "Fixing a Broken System"
[17:51] <ogra_> and since you are on the livecd ... pick "via the LiveCD terminal"
[17:52]  * ogra_ wanders afk ... 
[17:52] <lordievader> mv: dumpe2fs -h /dev/sdi|grep Inode size
[17:52] <lordievader> mv: dumpe2fs -h /dev/sdi|grep "Inode size"
[17:53] <mv> "bad magic number in super-block while tring to open /dev/sdi"
[17:54] <lordievader> Err, sorry that needs to be /dev/sdi1
[17:54] <mv> 256
[17:55] <lordievader> If the internet is right... Grub only works with inode size 128.
[17:56] <lordievader> Hmm, that might be about grub-legacy...
[17:57] <mv> i just thought, i need to install grub2 instead of grub right?
[17:57] <mv> thats the problem~
[17:58] <lordievader> mv: What is the output of 'apt-cache policy grub-pc'?
[18:00] <mv> just installed grub2 and it gave me a complete installing setting screens. and it seems now grub is working
[18:01] <mv> update-grub gives good results. everything is found and then done
[18:01] <mv> so my guess grub is working now
[18:02] <mv> shall i try to reboot?
[18:02] <lordievader> mv: Did you install grub?
[18:03] <mv> apt-get install grub2. got all the setup screens and to my it feels it installed corectly
[18:03] <mv> it let me select which drive to put it on
[18:04] <lordievader> Hmm, okay.
[18:04] <mv> i feel safe to reboot now. going to try, wish me luck? :D
[18:04] <lordievader> Good luck ;)
[18:11] <mv> it rebooted but my network card isnt visible. not network connection. and on ifconfig it doesnt show my network card
[18:14] <mv> lshw says network dissabled
[18:21] <mv> it looks like dbus doesnt start when booting
[18:23] <mv> when trying "sudo ifconfig p2p1 up"(this is my primary network card), it says "p2p1: ERROR while getting interface flags: no such device"
[18:30] <mv> can the dbus fail cause the network card not to work
[18:34] <mv> oh it isnt dbus, my fault. high resolution. its jsut bleutooth~
[18:38] <mv> is my network card driver maybe nuked?
[18:50] <mv> network-manager isnt installed. any tips on installing it without network access?
[18:52] <mv> there we go to the livecd again, hopefully last time now xD
[18:52] <sarnold> ... are you sure you want network manager installed on a server? most people prefer their servers to have predictable networking..
[18:52] <rberg> its not bad if you are pluged into ethernet.. try 'dhcient eth0'
[18:52] <mv> what else should i use? now network isnt working at all
[18:53] <sarnold> mv: /etc/network/interfaces
[18:54] <mv> yes, it still had my p2p1 connection. but it wont come up.
[18:59] <mv> dhclient gave me my internet acces back. should i install network-manager now?
[19:00] <rberg> sure if thats what you want.. another on a server you may be better served by a static config in /etc/network/interfaces
[19:01] <rberg> /another/although/
[19:01] <mv> i have yes, i see online i should use networking package
[19:04] <mv> it seems like networking is already installed. but at boot my internet p2p1 wont come up
[19:06] <mv> how can i fix networking?
[19:27] <mv> only problem left is network that wont work. but with dhclient eth0 i get internet access again. dont know how to fix it now but at least the other part are working again :D
[19:27] <sarnold> mv: pastebin your /etc/network/interfaces, and maybe whatever error messages you had on the terminal and in the logs when you ran 'ifup eth0'
[19:51] <mv> i want to thank everyone on here for all the help (all of the day) thaaanks!! :D
[20:19] <ebonics> im trying to follow this guide: https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin     - i get to the point where i "verify permissions" by doing "ls -ld /var/mail" ,, but the output for "vmail" in the guide is just "mail" for me. i don't really understand what the vmail/mail string is referring to?
[20:45] <st1v2k> why does ubuntu server get stuck at grub menu? it happens particularly if there is a power failure
[20:46] <st1v2k> ffs, it's a SERVER, no minotor no keyboard
[20:46] <st1v2k> just boot!
[20:49] <st1v2k> any idea why its programmed to do this? how to stop it?
[20:50] <rberg> I think the whole grub recordfail stuff is to prevent boot loops.
[20:50] <st1v2k> ick
[20:53] <st1v2k> its never happened before
[20:53] <st1v2k> now all of a sudden, dont know if it is due to an update or something
[20:53] <st1v2k> but whenever there is power failure, it no longer boots up until i hook up a keyboard and press ENTER
[20:53] <st1v2k> to get past GRUB screen
[20:54] <st1v2k> please advise, thanks
[20:55] <st1v2k> no i dont live in a third world country if that's what you're wondering
[20:55] <st1v2k> but in the land of flo-ri-da we get monsoon rains every day
[20:56] <bekks> "monsoons every day" in flo-ri-da?
[20:56] <st1v2k> yes bekks
[20:56] <bekks> That climate change is catastrophic, isnt it?
[20:56] <st1v2k> yes, the climate changes over time
[20:56] <rberg> now I have never done this but it looks like you can disable this in /etc/grub.d/00_header line 236
[20:57] <st1v2k> rain super hard -> tree branch or something hit the line -> voltage brownout -> server dies
[20:58] <st1v2k> rberg: sounds like something not meant to be edited? its not in the regular grub config?
[20:59] <rberg> looks like you can also add that var to /etc/default/grub
[20:59] <st1v2k> ok
[21:00] <st1v2k> i will check it out
[21:00] <st1v2k> brb
[21:00] <st1v2k> i will be back to give you proper thanks if it worked
[21:00] <rberg> "set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}" means use the variable GRUB_RECORDFAIL_TIMEOUT or if its not set use -1
[21:01] <rberg> so put GRUB_RECORDFAIL_TIMEOUT= some time in /etc/default/grub
[21:37] <stiv2k> hey
[21:37] <stiv2k> who was i talking to ?
[21:37] <stiv2k> rberg: hi
[21:43] <sarnold> stiv2k: the bit you missed, < rberg> "set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}" means use the variable GRUB_RECORDFAIL_TIMEOUT or if its not set use -1 < rberg> so put GRUB_RECORDFAIL_TIMEOUT= some time in /etc/default/grub
[21:43] <stiv2k> ok
[21:43] <stiv2k> thanks!
[21:54] <rberg> (also consider a UPS :) )
[21:55] <andre_pl> I have 3 of the 4 disks that used to comprise a raid 5 array, and I've booted an ubuntu server live disk in the machine, how can I go about reconstructing the array so that I can transfer the data to a new machine?
[22:00] <rberg> andre_pl: Hi if this is mdadm software raid you can start here https://raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID
[22:02] <rberg> gtg good luck
[22:03] <andre_pl> darn, thanks. that looks far more complicated than what I'm dealing with.. i'll try to make some sense of it
[22:08] <andre_pl> it  doesn't touch on lvm at all, which I do have sitting on top of my raid array, not sure how relevant that is.  I also don't have any disk handy to do the overlay stuff they're doing there... so I'm really not sure I can glean anything useful from it :\
[22:09] <patdk-lap> heh? not sure how it can be more complicated
[22:09] <patdk-lap> if you have a broken raid, you fix the raid
[22:09] <patdk-lap> if you have a broken lvm, you fix lvm
[22:09] <patdk-lap> you don't fix lvm, and ignore your broken raid
[22:10] <andre_pl> I'm not really trying to fix the raid, more like trying to migrate a degraded array into a new machine
[22:10] <patdk-lap> you don't build the second story of your house, without first making sure the first floor will hold it up
[22:10] <sarnold> the third paragraph of that page is "In the following it is assumed that you have a software RAID where a disk more than the redundancy has failed. " -- are you sure that page is relevant to you?
[22:10] <patdk-lap> if it's degraded, it is *fine*
[22:11] <patdk-lap> lvm will function ok, you won't notice anything is wrong
[22:11] <patdk-lap> if you have a raid issue, you are no longer degraded, but broken
[22:11] <andre_pl> patdk-lap: in that case, all I'm looking for is how to reassemble it so I can read the data from a live cd.
[22:11] <patdk-lap> mdadm auto reassymbles
[22:11] <patdk-lap> assuming enough of it to be atleast degraded is functional
[22:12] <patdk-lap> blkid post maybe?
[22:12] <andre_pl> thing is, the OS is gone, all configuration is gone, its just the 3 disks in a new machine. so I don't know how to get mdadm to reassemble / mount it
[22:13] <patdk-lap> what does the os and config have to do with anything?
[22:13] <andre_pl> well if I put these disks in the old machine where the OS is, mdadm will (as you said) auto-reassemble it, and all is well... when I boot a live cd, no such thing happens
[22:13] <andre_pl> and I don't know the manual steps to make it happen
[22:13] <patdk-lap> mdadm --assemble
[22:14] <patdk-lap> that is all you have to do, it's pretty simple :)
[22:14] <patdk-lap> does your *live cd* have mdadm installed on it? and lvm?
[22:15] <andre_pl> afaik yes, its the 14.04 ubuntu server live cd (usb)
[22:15] <andre_pl> something like: mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdc ?
[22:16] <sarnold> "Assemble  the  components  of a previously created array into an active array.  Components can be  explicitly  given  or  can  be searched  for." http://manpages.ubuntu.com/manpages/trusty/man8/mdadm.8.html
[22:16] <sarnold> may not even be necessary to specify them
[22:17] <andre_pl> it didn't like that way, I'll try specifying
[22:17] <patdk-lap> shouldn't have to
[22:17] <andre_pl> if I just do mdadm --assemble /dev/md0 it says: /dev/md0 not identified in config file
[22:18] <andre_pl> hmm, and when I specify all the disks it tells me they're all busy
[22:18] <andre_pl> that's  odd
[22:19] <andre_pl> they're not mounted or anything
[22:19] <patdk-lap> define mounted?
[22:19] <patdk-lap> not sure exactly how you mount a raid
[22:20] <andre_pl> i just mean `mount` doesn't show anything interesting, no physical disks or partitions aside from the boot disk
[22:20] <patdk-lap> why should it?
[22:20] <patdk-lap> did you run blkid yet?
[22:20] <andre_pl> it shouldn't, but mdadm is telling me my 3 disks are 'busy' whatever that means
[22:20] <andre_pl> my only idea of what 'busy' involves would require them to be mounted
[22:20] <patdk-lap> mounted has nothing to do with busy
[22:21] <patdk-lap> busy means they are in use
[22:21] <patdk-lap> mount is only ONE way it could be in use
[22:21] <patdk-lap> mdadm is another, lvm another
[22:21] <andre_pl> ok, I'm not sure what they're in use by then. i've done nothing but boot the live diskc
[22:21] <patdk-lap> did you run blkid yet?
[22:22] <andre_pl> just now, it printed some uuids for the raid partitions
[22:24] <andre_pl> is there a way to find out why mdadm thinks they're busy and what I can do about it?
[22:24] <andre_pl> i'm worried its writing to them and they're all that's left of my data :)
[22:44] <andre_pl> ok it looks like the os tried to reassemble the array on its own, which is why they're busy, but its given me an 'inactive' array on md127 which i'm not sure how to activate.  `mdadm -A /dev/md127` tells me md127 is not in the config file.
[22:44] <patdk-lap> mdadm --detail /dev/md127
[22:45] <andre_pl> mdadm: md device /dev/md127 does not appear to be active
[22:45] <patdk-lap> we are guessing, cause you don't appear to be posting any pastebins
[22:45] <andre_pl> the machine has no network atm, I'm re-typing things :\
[22:46] <andre_pl> I can type out the results of cat /proc/mdstat which is how I determined its got some kind of inactive array
[22:47] <andre_pl> if that will help
[22:47] <patdk-lap> ok
[22:49] <andre_pl> http://pastebin.com/TcYRxsHa
[22:50] <patdk-lap> try a mdadm --stop /dev/md127
[22:50] <patdk-lap> mdadm -A --scan -v
[22:52] <andre_pl> ok, lots of output, the stop worked.  the scan found the 3 relevant partitions, 2 of them were (possibly out of date) which resulted in "/dev/md/0_0 assembled from 1 drive - not enough to start the array"
[22:53] <patdk-lap> now the question is, are you really sure you should force it to assemble
[22:54] <patdk-lap> change -v to --force if you feel good
[22:55] <andre_pl> that is a good question, the 3 disks likely ARE out of sync, I had been attempting to replace each disk in the array with new disks, resyncing after swapping out each one, and a small amount of data was written during that time. :|
[22:55] <andre_pl> i'm assuming a force would be catastrophic in that case?
[22:56] <andre_pl> i dont mind losing the small amount of data that was written
[22:56] <andre_pl> but i'd like to avoid losing all of it
[22:56] <patdk-lap> not really
[22:56] <patdk-lap> it is possible, not not hightly likely
[22:58] <andre_pl> I'm not sure what you mean by that :)  its highly unlikely to cause catastrophic data loss? or highly unlikely not to?
[22:59] <patdk-lap> it is not likely to destroy your data
[22:59] <patdk-lap> but it is always possible
[22:59] <patdk-lap> it feels like the old system was not shutdown cleanly
[22:59] <patdk-lap> so the raid is complaining and won't assymble cleanly
[22:59] <patdk-lap> soa force would be needed
[23:00] <patdk-lap> but this is based on the amount of info I have
[23:00] <andre_pl> not exactly. its kind of a long story how it got in this condition, but they are definitely not in sync.  I'll try to explain what I did, please bear with me
[23:01] <andre_pl> I had a 4x2TB raid array at one point, and a disk failed. so I bought 4 new, bigger disks and was going to grow the array...
[23:01] <andre_pl> I replaced the faulty drive with a new bigger one and let it resync. then repeated the process 3 more times with the remaining larger drives.
[23:01] <andre_pl> during that time, I was using the array, writing data.
[23:01] <andre_pl> not a lot, but some.
[23:02] <andre_pl> now the new array didn't work out... i screwed up the partition tables, couldn't reassemble it. so i was hoping to rebuild the original array on a separate machine out of the remaining 2TB drives, build a brand new array out of the new 3TB drives, and copy data over.
[23:03] <patdk-lap> oh, that won't work
[23:03] <andre_pl> but then realized, the 2TB's are not in sync due to the writes that happened while i was swapping in the 3tbs
[23:03] <patdk-lap> yep
[23:04] <sarnold> patdk-lap: out of curiosity, how well would zfs handle that?
[23:04] <andre_pl> in theory, the 3tbs have all the data, but the array may be in worse condition due to the crazy things i did to screw it up :P
[23:04] <patdk-lap> sarnold, not well
[23:04] <patdk-lap> but after a lot of pain, you could roll back the transaction to a common point
[23:04] <patdk-lap> but it is not fun
[23:04] <sarnold> patdk-lap: thanks :)
[23:05] <patdk-lap> andre_pl, well, I think force is your only option
[23:05] <patdk-lap> but your filesystem will be strange
[23:05] <patdk-lap> and you need to repair it
[23:05] <patdk-lap> but you should be able to recover anything not being changed during that time
[23:05] <andre_pl> patdk-lap: I think restoring the 3tb array may also be an option, but I'm not sure exactly how badly I've hosed it
[23:05] <andre_pl> i can try to explain what I did there :P
[23:08] <andre_pl> basically. once the array was completely rebuilt out of 3tb's, I attempted to grow it, but I only got 500GB extra because I had neglected to use GPT partition tables.  I was told I might be able to write the correct partition tables without losing data, I was going to do this from a live disk again, but i missed the boot menu and it attempted to boot the original OS again, which hung trying to reassemble the array with a message a
[23:27] <andre_pl> patdk-lap: I've booted up the other machine with the "new" array, on a live disk. mdstat shows the array as active, so I'm thinking it has all my data safe. how can I proceed to mount the lvm volume that should exist on that array?
[23:27] <patdk-lap> it should have automounted
[23:27] <patdk-lap> vgs
[23:27] <patdk-lap> lvs
[23:30] <andre_pl> its not mounted, but vgs and lvs appear to be showing me the correct bits :) the VG is 'lvm-raid' and the LV is called 'media'
[23:30] <patdk-lap> what exactly does lvs show?
[23:30] <patdk-lap> you probably need, lvchange -a y ......
[23:31] <andre_pl> LV: media VG: lvm-raid Attr: -wi-a---- LSize: 5.46t
[23:31] <patdk-lap> ok, so you just need to mount it then
[23:31] <patdk-lap> mount /dev/lvm-raid/media
[23:33] <andre_pl> sweet. I see all my data, and it looks good :) so I think my safest option at this point (since I need to rebuild this array with correct partition tables) is to copy all of this data to the degraded 2TB array on the other machine, then rebuild this one, then copy it back
[23:33] <andre_pl> sound sane-ish?
[23:33] <patdk-lap> no
[23:33] <andre_pl> oh.. :\
[23:33] <andre_pl> that's the best I've got :)
[23:33] <patdk-lap> you could do that as is
[23:34] <patdk-lap> just remove a disk, reformat it, and add it back in
[23:34] <patdk-lap> but is mdadm using anything >2tb yet?
[23:34] <patdk-lap> if no, just add a 2tb disk into it
[23:34] <patdk-lap> then just remove and readd them one by one
[23:34] <patdk-lap> then finally remove that 2tb
[23:34] <patdk-lap> make sure you add the 2tb as a replacement, not a new disk
[23:35] <andre_pl> afaik it can't use >2tb becuase of my bad partitioning
[23:35] <patdk-lap> so the 2tb disks are fine to use
[23:35] <patdk-lap> just do what you did when you upgraded from 2tb to 3t
[23:35] <patdk-lap> 3tb
[23:35] <patdk-lap> but just take one of them back down to 2tb
[23:35] <patdk-lap> and rotate through them
[23:36] <patdk-lap> replace 3tb with 2tb, repartition that 3tb, add it back in, replacing a 3tb, redo that one, ...
[23:36] <patdk-lap> and finally change the last 3tb to replace that 2tb again, done
[23:38] <andre_pl> ok, basically what I did before but with one extra re-sync...
[23:39] <andre_pl> that's gonna be about 4 days :)
[23:39] <patdk-lap> coping it is going take awhile too
[23:39] <patdk-lap> and you can't really use it while it's being copied
[23:39] <patdk-lap> at risk of missing stuff
[23:39] <andre_pl> true, but if I use it I risk ending up in this same situation with out of sync disks if I screw it up again :)
[23:40] <andre_pl> only thing that scares me is that I did manage to resize the array on these new disks for an extra 500GB or so, so i'm not sure the 2TB will suffice...
[23:41] <andre_pl> even the 2TB it could allocate on these drives was more than was actually available on the 2tb drives
[23:41] <andre_pl> i didn't fill it up, but the partitions are bigger
[23:45] <patdk-lap> no, you don't
[23:45] <patdk-lap> you only risk out of sync if you attempt to use OLD disks
[23:45] <patdk-lap> not the ones currently in use
[23:45] <patdk-lap> don't use parititons
[23:45] <patdk-lap> just use the whole disk
[23:46] <andre_pl> i've never done that before. does that mean i don't have to worry about the GPT tables or anything? just fail / remove one, and re-add the disk itself instead of the partition?
[23:47] <patdk-lap> yep
[23:48] <andre_pl> and hypothetically speaking, if I was an idiot.. (or if it won't let me use a 2tb drive in this array) I could just let it go degraded between swaps?
[23:48] <patdk-lap> you could
[23:48] <patdk-lap> at the disk of no protection if something happens
[23:49] <andre_pl> do I lose the autodetect stuff if I don't use partitions?
[23:49] <patdk-lap> no
[23:49] <andre_pl> I've never seen that suggested, but it seems like the obviously superior method, so I'm wondering why...
[23:49] <patdk-lap> the only thing you loose, is if you want to attempt to control the size to something smaller
[23:50] <patdk-lap> you aren't able to load grub or anything onto the disks then
[23:50] <patdk-lap> so if you don't use it as a boot disk
[23:50] <patdk-lap> if you do, you need space for grub
[23:51] <andre_pl> yeah no need for any of that junk. its just a pure storage array
[23:51] <andre_pl> I'm going to attempt to swap in a 2TB now then... but I'm expecting some kind of complaint about the size mismatch
[23:52] <andre_pl> I think I'll have to format it first since it thinks its part of the same array, things could get confusy
[23:53] <patdk-lap> just wipe the first meg or so
[23:53] <patdk-lap> dd if=/dev/zero of=/dev/.... bs=1M count=1
[23:54] <andre_pl> awesome will do... need to shuffle some hardware around again first.. 1 spare monitor is not enough! :)