/srv/irclogs.ubuntu.com/2013/05/12/#ubuntu-server.txt

p7ank5te7I'm trying to change my hard drive out on my home server, which is just a single disk, and trying to go to a Raid 1, but I'm not understanding how I can do this.00:36
p7ank5te7Can anyone give me a few pointers?00:36
p7ank5te7Also to top it off, when the server was built, it appears that only 2 partitions were made, 1 being the root( / ) and 1 being the swap. Does that pose additional problems00:37
RoyKp7ank5te7: create a new raid-1 with a missing drive on the other drive and copy the data over00:39
RoyKyou can't convert a normal partition to a raid-100:39
p7ank5te7See my problem is with the tutorials, they say I'm supposed to have root, boot, and swap partitions but I only have root and swap?00:40
RoyKthen create a small boot partition on the new drive00:44
RoyKcopy /boot there00:44
RoyKuse lvm for the rest00:45
RoyKif  you're new to linux, ask, it may take some turns to get it fixed right00:45
RoyKor - just use partitions - one for /boot, one for the root, and one for swap00:46
p7ank5te7I am still a bit new to it, at least for the partitions and stuff, I have been learning slowly but surely.00:46
RoyKthen just use partitions for now00:46
RoyKfdisk /dev/whatever00:46
RoyKcreate a small boot partition, max 1GB00:46
RoyKthen the swap, then the root00:46
RoyKswap should be on the start of the disk, since that's fastest00:47
RoyKbut start with the boot partition00:47
RoyKthen mount the lot in /mnt or smoewhere and rsync -avPHAx / /mnt00:48
RoyKas in, mount the root on /mnt00:48
RoyKcreate /mnt/boot00:48
RoyKmount /boot there as well00:48
RoyKand then do the rsync00:49
RoyKthen install grub on the new drive00:49
RoyKtry to reboot into it00:49
p7ank5te7RoyK, I appreciate it, so let me make sure I understand, create the partitions on the "Extra" drive, then rsync the content from the current to the new one, install grub, and try it?00:50
RoyKp7ank5te7: erm00:51
RoyKp7ank5te7: I think you'll need to do this slowly00:52
RoyKp7ank5te7: first, create a partition for boot, swap and root00:52
p7ank5te7Sorry for being a complete idiot with this.00:52
RoyKno, I was giving wrong advice00:53
RoyKcreate these partitions as raid partitions00:53
RoyKthen create raid devices on them with something like "mdadm --create --level=1 --raid-devices=2 /dev/sdXY missing"00:54
RoyKmeaning you create a degraded raid on each of them00:54
RoyKthen create raid devices on them with something like "mdadm --create --level=1 --raid-devices=2 /dev/md0 /dev/sdXY missing"00:54
RoyKetc00:54
RoyKmd0 md1 etc00:54
RoyKone for each partition00:54
RoyKthen mount the root on /mnt or somewhere and create /mnt/boot, mount the boot partition there, and do the rsync00:55
RoyKthen install grub on the new system00:56
p7ank5te7So mount my current setup on mount then mount md0(boot) as /mnt/boot is that right?00:56
RoyKp7ank5te7: yes01:00
RoyKp7ank5te7: just make sure you mount the new raid on -mnt first01:00
RoyKp7ank5te7: /mnt/even01:00
RoyKp7ank5te7: /mnt even01:01
=== Madkiss_ is now known as Madkiss
p7ank5te7Ok. So I follow now, mount the raid root as "/mnt" then the raid boot as "/mnt/boot"01:03
=== Ursinha-afk is now known as Ursinha
RoyKp7ank5te7: mount raid root on /mnt, mkdir /mnt/boot, mount raid boot on /mnt/boot, do the rsync01:08
RoyKinstall grub01:08
RoyKtry to reboot into that - should work01:08
=== heathjs is now known as heath
p7ank5te7Let's see if it works01:12
=== ejnahc_ is now known as ejnahc
=== phunyguy_ is now known as phunyguy
p7ank5te7RoyK, i'm up to the Rsync part. As far as install grub, when I do that, just purge it and reinstall it and have it set to the secondary drive?01:37
=== Sargun_ is now known as Sargun
RoyKp7ank5te7: install-grub /dev/blah02:03
RoyKtypically /dev/md002:06
p7ank5te7Will that work with grub 2?02:11
RoyKyes02:14
RoyKbut gotta go - time's like 4:1502:15
amarcolinoHi, I have added myself to the web group (www-data), when creating a directory the ownership goes to the user then the group (foobar:www..) is there a way to set it to the group then owner or what I would like is to keep it as the group but still permit me the user to add, delete and read files?02:35
=== Guest49957 is now known as jrib
heymanI have an emergency for work! I'm having problems mounting devices so I decided that I'll try wget or curl or something to retrieve the files from another location.02:37
heymanAre we able to use ubuntu one with server, or even dropbox? I just need a simple solution to get two small files on my ubuntu server vm02:38
amarcolinodropbox has a command interface so yes, n a quick check on google has given me to support what I thought http://rbgeek.wordpress.com/2012/08/19/how-to-install-and-configure-dropbox-on-ubuntu-server-12-04-lts/02:44
amarcolinoI assume ubuntu one would be the same but I havent checked02:46
heymanthanks amarcolino02:57
=== roasted_ is now known as roasted
KomplexCan anyone answer a question?04:42
KomplexConsidering moving multiple services that are currently running on winblowz servers presently.  Does anyone know if 12.10 or 13.04 server edition fully utilizes the RAM on a machine?04:44
Komplexfor some reason I am only seeing 8 gigs out of 16 on a box I installed it on... just seemed odd... wanted to see if anyone ran into the same issue or not... thanks for your time.04:45
=== blkperl_ is now known as blkperl
=== DasIch_ is now known as DasIch
Questi dont see any /var/log/fail2ban.log . the  iptables and service  fail2ban status says that fail2ban is running fine.. any clue?07:42
=== klaas- is now known as klaas
Questi would say then which distros are best for servers if wanted to be free and maintain our selfs?08:08
Questports can be forwarded by routers/switches and NATing can be done. how to do that if the thats a linux server instead?10:23
dassoukiwhat is the terminal command that goes through the folder / file sizes and let's you go through them like if it were explorer10:24
dassoukii remember it starts with "n" ?10:24
bekksdassouki: "find" and "du -sh" :)10:31
dassoukiya i use those two but there was a command app, that cycles through your folders and displays the info in a tree, so you can go deeper into a folder, etc10:33
=== hodge is now known as Hodgestar
=== sygnous_ is now known as sygnous
=== Jever| is now known as Jevermeister
=== sygnous is now known as malikeye
=== malikeye is now known as sygnous
amarcolinoHi, I have added myself to the web group (www-data), when creating a directory the ownership goes to the user then the group (foobar:www..) is there a way to set it to the group then owner or what I would like is to keep it as the group but still permit me the user to add, delete and read files?13:31
qman__amarcolino, www-data is the user the web server runs as and should not own any files; you should create a new group for website file ownership14:30
qman__take note that, out of the box, all files in /var/www are owned by root, not www-data14:31
amarcolinoI've already changed ownership to the www directory as well as adding myself to the www-data group, however, the issue is when I add files or directories www-data gets second ownership, which is not helpful because some directories and files can't be auto-updated since the web group is meant to have full access, so I am wondering how I can solve this and if it is possible other then manually changing ownership?14:34
RoyKanepanal1ptos: chmod +t /var/www14:41
RoyKthat should make group ownership stick14:41
amarcolinoRoyK, will try that even knowing it was intended for someone else14:44
RoyKheh - sorry ;)14:45
RoyKchmod g+t, perhaps14:46
amarcolinoRoyK, no good, if I were to create a test directory ownership would be my username and group would be www-data, however, I just thought that wouldn't be a problem if everytime something is created it would be given read and write permission by default, which it isn't15:03
amarcolinoRoyk, thanks I will work on this when I have more time15:05
RoyKthen the umask is wrong15:05
amarcolinoRoyk, how would I check the umask?15:07
userrchat clients disconnect (after a while) when i switch to another Xorg server (by using ctrl+alt+F8). how does the former Xorg server ("at F7") tell that i switched away from it? i need to suppress that.15:15
RoyKamarcolino: depends on how you upload things15:24
bjrohanIn my home directroy in Ubunty server, I have a file "=" what is this file?17:52
bjrohancat "=" gives 13.04 12.1017:53
jacobwbjrohan: That's not part of the distribution17:56
shaunoseems a pretty sane guess that it's a mistake somewhere.  something that's directing when its meant to be comparing17:57
bjrohanHmm. I installed the distro fresh, installed KDE, and alfresco (with tomcat, sql etc) that is all17:58
jacobwThere's might be an error in the Alfresco installer that creates that file in $PWD18:01
jacobwbjrohan: Did the installer exit successfully?18:06
bjrohanYes18:06
jacobwIn that case, I'd remove the file and carry on18:06
bjrohanOk. I am the owner of the file18:07
jacobwIf you ran the script as your user, you'll be owner of any files created by the script18:07
bjrohanWhat would the ownership look like if it was something that was created during the dist install?18:10
bjrohanAlso, I encrypted the user home directories on install. Given this, can I using sudo 1.) see, or 2.) access files in another users encrypted directory?18:12
bjrohanSay the file and dir both do NOT have not permissions granted to anyone but the user18:14
jacobwsudo ecryptfs-recover-private18:16
bjrohanjacobw: If I am understanding right, that is a way to recover encrypted data if one knows the passphrase (say a hdd craps out and you can no longer boot from it, use this command from a livecd to recover the date)?18:22
jacobwThat's right18:23
jacobwbjrohan: ecyptfs volumes are mounted when the user logs in and unmounted when the user logs out18:24
bjrohanTo get down to brass tacks, if users home directories are encrypted, I as the sys admin, can not use sudo to access their files b/c I don't have their passphrase, whereas if it is NOT encrypted, I can use sudo to access the files.18:24
jacobwThat's right18:24
bjrohanNice, I understood it correctly :-)18:24
jacobwbjrohan: You can see their files when they're logged in because you have root access to the filesystem and their encrypted data is mounted in the filesystem18:26
jacobwbjrohan: When they're logged out, their encrypted data is just an encrypted file that you don't have the passphrase to18:27
bjrohanThat makes sense :-)18:27
bjrohanThank you for the info18:28
jacobwbjrohan: However, there's the passphrase and the encryption key, the passphrase is just a wrapper around the encryption key. If you have the encryption key you can always decrypt the file18:28
jacobwbjrohan: The encryption key cannot change after the file is created, if you log the encryption key when the ecryptfs is created, you can access it whenever you want18:29
jacobwbjrohan: The passphrase is just a way of accessing the encrypted encryption key on disk with the login password18:30
bjrohanVery similar to GPG18:32
jacobwIt's the same scheme18:32
Jeeves_Mosswhat would cause a SSH session to hang during a write to a new ZFS tank?  I just made a new tank with RAIDZ2, and now when I move anything larger than a 1Gb file, it locks up19:00
RoyKJeeves_Moss: zfs-fuse?19:09
three18tido apparmor profiles use "#" for comments?19:09
three18tithis is my /etc/apparmor.d/libvirt/TEMPLATE: http://paste.scsys.co.uk/24770919:10
three18ti#include <abstractions/libvirt-qemu>19:10
Jeeves_MossRoyK, no, native19:10
three18tiis that actually including anything?19:10
Jeeves_MossRoyK, there dosen't look to be any disk activity19:10
RoyKJeeves_Moss: ubuntu doesn't have native zfs19:11
Jeeves_Mossapt-get install ubuntu-zfs19:11
RoyKno such package19:12
Jeeves_MossRoyK, and have they fixed the expand features so you can add disks to a pool to expand the sapace?19:12
Jeeves_MossRoyK, ubuntu-zfs is already the newest version.19:13
RoyKJeeves_Moss: it's not in the repos19:15
=== wizonesolutions_ is now known as wizonesolutions
Jeeves_MossRoyK, I literly just ran it19:16
RoyKE: Unable to locate package ubuntu-zfs19:16
RoyKthat's on raring19:16
RoyKand quantal19:16
Jeeves_Mosshttps://launchpad.net/~zfs-native/+archive/stable/19:16
RoyKyes, it's a ppa19:17
Jeeves_Mossyea19:17
RoyKnot official ubuntu19:17
Jeeves_Mosshummm19:17
Jeeves_MossI'm wondering if I should roll the data out of the tank and fire up the fuse version19:17
=== Jikan is now known as Jikai
RoyKI've been working with zfs for some years19:19
RoyKon opensolaris/openindiana19:19
RoyKand it's brilliant for its use, but I chose md for my home server19:20
RoyKzfs lacks flexibility19:20
blkperlhow does zfs lack flexibility?19:21
blkperlzfsonlinux works rather well on ubuntu19:22
jacobwIt depends what you need, most of the components of ZFS are available in other stacks19:24
jacobwRAID/LVM is simple, COW isn't19:24
Jeeves_Mossugh, this lockup is pissing me off19:27
Jeeves_Mosshow can I track IO issues19:27
jacobwJeeves_Moss: iotop19:28
jacobwJeeves_Moss: Also, see IO wait/delay in top and other things19:28
Jeeves_Mossjacobw, shows nothing moving19:28
jacobwJeeves_Moss: Do you see anything in syslog/dmesg/kernlog?19:30
Jeeves_Mossjacobw, checking.  I've tried moiving from USB to the root disk, and everything works.  It just locks up when I try to write to the ZFS tank19:30
Jeeves_Mossjacobw,  failed: use vmalloc=<size> to increase size.19:32
=== Jikai is now known as Jikan
=== lifeless_ is now known as lifeless
RoyKblkperl: you can't add more drives to a VDEV19:42
RoyKblkperl: you can't rebalance a pool if more VDEVs are added19:43
RoyKblkperl: really, it's just fixed - it's good for well-planned long-term storage, but not if you want it flexible19:43
RoyKblkperl: and you can't change RAIDz levels either19:44
RoyKnothing can be changed19:44
Jeeves_Mossyea.  once it's built, you're kinda effed19:45
Jeeves_Mossthis one is for a storage pool for VMs19:45
RoyKzfs rocks - but it's not very flexible - that's my motto19:46
jacobwIt's flexible if you have a large array19:46
RoyKno, it's not19:46
RoyKyou can add a new VDEV, ok, but it won't rebalance the raid19:46
jacobwvdev being a block device?19:47
jacobwLV/whatever the ZFS term is19:47
RoyKthat'll require the block pointer rewrite, which was posted as an idea some four year back19:47
RoyKbut never implemented19:47
RoyKa vdev is a mirror or a raidz?19:48
RoyKzpool create mirror d1 d2 mirror d3 d419:49
RoyKmakes two vdevs19:49
jacobwI haven't heard the term vdev before19:49
RoyKheh19:49
RoyKthen you don't know zfs19:49
jacobwWell, I don't19:49
jacobwNow Unity has crashed :|19:50
RoyKzpool create asdf raidz2 d1 d2 d3 d3 d4 raidz2 d5 d6 d7 d8 d919:50
RoyKtwo vdes19:50
RoyKvdevs19:50
RoyK(albeit bad syntax)19:51
blkperlRoyK: ah ok, yep those things will probably be around for a long time19:51
jacobwOK, so vdevs are PV in the LV group in ZFS terminology?19:51
jacobwhttp://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/19:54
jacobw:)19:54
RoyKjacobw: really, I've been working with zfs for 3 years or so :P19:55
jacobwOK19:56
RoyKno, in LVM terminalogy, a PV is a disk, a VDEV is a group of disks set in a mirror or raidz-something19:57
jacobwI see19:57
RoyKbetter use MD if you want flexibility19:57
RoyKchances for silent errors are rather low with small volumes, as in <20TB19:58
RoyKor <100TB even19:58
jacobwAgreed19:58
jacobwEr, silent errors? As in write holes?19:59
RoyKsilent errors are when the drive doesn't report an error but delivers bad data19:59
jacobwI see19:59
RoyKwhenever they get bp rewrite into zfs, it'll be fun20:00
jacobwWhat do you mean by rebalance the RAID?20:00
jacobwBP?20:00
RoyKblock pointer rewrite20:01
RoyKif you add another drive to an md raid, it'll re-balance the data20:02
RoyKif you add another vdev to zfs, it won't do much, just try to smear the data over the lot20:03
RoyKrebalancing means moving the data over the existing vdevs to make performance better20:03
jacobwI see20:03
=== highvolt1ge is now known as highvoltage
jacobwWhat kind of performance difference does that make?20:05
jacobwI didn't know mdraid did that20:06
RoyKjacobw: it means new writes will only go to the new vdev20:13
RoyKearlier it would make the zfs performance almost halt, but that's been fixed20:13
jacobwI see20:16
jacobwIt sounds as if rebalancing is different the RAID and ZFS contexts20:16
jacobwI'm trying to find references to it and hitting a lot articles about distributed filesystems like GlusterFS and proprietary SAN stuff20:18
RoyKglusterfs comes on top of zfs or md20:24
RoyKzfs is fine if you have a fixed set of disks and can plan things well20:25
RoyKif you want to add more disks, it gets complicated20:25
Quest In Linux, how is it possible to merge/combine 3 internet connections (Dsl/fiber) (actually by eth1,2,3) and supply those to eth4. many client can be connected on a switch that is connected to eth4 of the server. The server does the load balancing and if one eth of 1,2,3, goes down. it shifts traffic to remaining 1,2. I have seen this in microtck router.  How is it possible in Linux?20:26
RoyKQuest: see http://www.lartc.org/20:28
RoyKQuest: it's not trivial, but quite doable20:28
QuestRoyK,  hm. thats how microtick did it?20:32
RoyKQuest: well, just try20:34
Questwhere to start20:34
RoyKread the docs, for a start20:34
Questoh ok20:34
codepython777is there a way to put a network bandwidth quota on each user when the network usage reaches above certain threshold? (something easy to use compared to ip tables)20:56
=== heath is now known as data_scientist
=== data_scientist is now known as data_astronaut
jacobwQuest: Mikrotik RouterOS can bond interfaces using LACP, if that's what you want to do21:16
=== data_astronaut is now known as heath
Questjacobw,  what is lacp?21:20
jacobwQuest: If you want to balance sessions over 3 subnets read those docs, and have a look at this, http://parkersamp.com/2010/03/howto-using-linux-as-a-simple-load-balancer-nat-router-firewall/21:21
jacobwQuest: Link Aggregation Control Protocol, it combines Ethernet ports in to channels, like port channel21:23
Questhm\21:23
Questjacobw,  i thought they used http://lartc.org/howto/lartc.rpdb.multiple-links.html21:24
Questjacobw,  and i think you have experience with mikrotick OS. its linux of their own? or theres some underlying os they use like centos or ubuntu?21:24
jacobwQuest: I wasn't sure what you were talking about at first21:25
Questjacobw,  and i think you have experience with mikrotick OS. its linux of their own? or theres some underlying os they use like centos or ubuntu?21:26
jacobwQuest: RouterOS is Linux based, but Mikrotik have replaced parts of the networking stack and included in house implementations of things like MPLS21:28
jacobwQuest: If you look at the firewall interface, it's quite clearly iptables21:28
Questhm21:29
Questjacobw,  i was wondering if it uses a known os underneath so i can use a package manager and install apps further in it?21:29
jacobwQuest: No, that's certainly not possible :)21:30
Quest:(21:32
jacobwQuest: RouterOS uses the Linux kernel only, it uses Mikrotik own userspace21:33
Questhm. thanks21:34
Questit will take quite long for me to do what mikrotik doesn, in pure linux and iptables21:34
jacobwQuest: http://wiki.mikrotik.com/wiki/Manual:IP/Route#Multipath_.28ECMP.29_routes21:35
jacobwQuest: The page you just linked from LARTC has everything you need for your scenario21:37
Questjacobw,  thanks!21:41
=== bobbyz_ is now known as bobbyz

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