Re: [Dorset] Setting up hostname in Linux
On Monday, April 04, 2011 11:37:19 PM Ralph Corderoy wrote: Hi Terry, Maybe my memory is faulty, but my recollection of doing this on earlier Unix systems, (like Solaris), is that the hostname went into the file called hostname (or similar) and that did it (after a reboot). Debian/Ubuntu still have that. $ cat /etc/hostname orac $ hostname orac $ hostname -f orac $ Note, the -f output is wrong here, I haven't got it to be correct yet which is annoying as some programs, e.g. postfix, rightly expect it to be a fully-qualified domain name (FQDN). Cheers, Ralph. FC14 seems to use the /etc/sysconfig tree to hold this kind of info /etc/sysconfig/network:HOSTNAME=myhostname /etc/rc.sysinit reads the sysconfig tree Regards Andy -- Next meeting: Bournemouth, Tuesday 2011-04-05 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] DNS on an isolated (1:1) network
On Thursday, March 10, 2011 08:17:20 pm John Carlyle-Clarke wrote: On 10/03/11 18:59, Terry Coles wrote: On Thursday 10 Mar 2011, Chris Dennis wrote: dnsmasq[1] is relatively simple to work with, and is probably available in your favourite distro. [1] http://www.thekelleys.org.uk/dnsmasq/doc.html Thanks. That looks like a good start. +1 for dnsmasq. I have configured dhcpd and bind to do DHCP, DNS and dynamic DNS updates before, but it was not easy. dnsmasq, by comparison, takes about 10 minutes to set up (and that includes the time to make a cup of tea). -- Next meeting: Bournemouth, Tuesday 2011-04-05 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue I completely agree with you - I had the same trouble. +2 to dnsmasq -- Next meeting: Bournemouth, Tuesday 2011-04-05 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] [OT] DNS port number
On Friday, February 25, 2011 05:25:29 pm Ralph Corderoy wrote: Hi Andrew, Once a connection is made (an incoming connect request to an allowed port) accept(2) will grab another port so that the original port is free for further connect requests. For the benefit of others, since I know you really know this already :-), accept(2) creates another *socket* to handle the connection that's been made, not another port, so further connection requests on the existing socket can be accepted. The port number is the same for both sockets; that's fine since the 5-tuple overall with be distinct between the two. Cheers, Ralph. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue Yup! sincerest apologies. You are of course right - its the 5-tuple that identifies the endpoint. Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] [OT] DNS port number
On Wednesday, February 23, 2011 11:11:59 pm jr wrote: On 23 February 2011 23:03, Tim xendis...@gmx.com wrote: Any thoughts? I'd look into setting up a DMZ box (if you've a spare machine), separating the internal network from the Virgin/BT/whatever supplied h/ware. extreme, admittedly, but what price peace of mind? Hi Tim, I have precisely this kind of setup simply by having two network interfaces on my main system which runs iptables and is connected vis the internal lan cable and hub to a wireless repeater on which connect to my wifi gadgets like ps3, nokia phone bravia tv. What I really like is the level of control I have from configuring iptables right down to monitoring with wireshark and dhcp contro of clients. Perish the thought of a cable wifi router. incidentally, as Dan sys 8.8.8.8 is google dns. Whya are you not using Virgins own dns - which can be set via dhcp? Regards Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Slight OT: Regular Expressions in Winblows
On Monday, February 21, 2011 09:38:24 pm Keith Edmunds wrote: On Mon, 21 Feb 2011 21:21:14 +, l...@discoverlinux.co.uk said: In vi :1,$s/_[0-9][0-9][0-9][0-9]/found/g In case it isn't clear, Vim is available on Windows as well. I know Vim isn't everyone's cup of tea (for some inexplicable reason), but good to know that there is a powerful editor available for those unfortunate enough to need to edit files on a Windows platform. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue And of course winviis available on windows too. Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] disk problems
On Friday, February 18, 2011 07:52:30 am Keith Edmunds wrote: On Thu, 17 Feb 2011 21:59:22 +, andy.pater...@ntlworld.com said: Then Nokia puts a spoke in the works and effectively indicates that continuing learning QT will be a waste of t!me I think you're extrapolating considerably more than was announced. I very much doubt Qt is going to disappear. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue I hope you are right Keith - I really hope you are right! Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] disk problems
On Friday, February 18, 2011 08:43:43 am Ralph Corderoy wrote: Hi Andrew, After spending days(!) fscking and trying to decode all kinds of stuff I stepped back and saw the light - I MUST have a duff disk. `smartctl -a /dev/sda' can be useful to get the drive's own stats on how things are going. (Does fsck(8) still only check a filesystem's metadata?) smartctl(8) can, I think, be used to get the drive to do some non-destructive tests on all sectors. May be something to try now you've nothing to risk losing from them, although I don't know how well the SMART commands work through non-[PS]ATA interfaces. I therefore went out and replaced BOTH disks (which were Hitachi Desktar 200GB IDE units which on extracting them I find are dated 2005 (so fair enough!). Post IBM's Deathstar then. http://en.wikipedia.org/wiki/IBM_Deathstar ;-) The green credentials of the new disks will mean they will power down after (20? secs) of inactivity and take too long to power up causing linux Raid to fail a disk and detach it. !!! hdparm(8) has options, e.g -S (capital), to control aspects like idle spin-down time; perhaps that can help. I didn't realise any modern drives took too long to spin up though. Cheers, Ralph. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue Hi Ralph, I recall I did try probing the disk with smartctl before I replaced it, but the counts it returned said it was all good (i.e. all fail caounts were zero). Interestingly if I now try to run smartctl on the old disk (connected by my external IDE/USB connector) - appearing as /dev/sde, I get : -- smartctl -a /dev/sde smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net /dev/sde: Unsupported USB bridge [0x04cf:0x8818 (0xb008)] Smartctl: please specify device type with the -d option. Use smartctl -h to get a usage summary -- Which I have to say - is a understandable but a disappointment! You are prob right about spin-up (It could be that the notes I came across on an internet search were not that accurate). I understood that Green drives try to hide the fact that they are spun- down (presumably with huge buffers?) and even (according to what I have read) dont log their spin-downs for things like smartctl to get at - i have seen a few angry comments about that. What kind of spin-up times do you think are normal for a modern hard-drive then? Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] disk problems
On Friday, February 18, 2011 12:39:37 pm Ralph Corderoy wrote: Hi Andrew, What kind of spin-up times do you think are normal for a modern hard-drive then? Second or two? Purely from very limited experience. Have just timed this very old 20GB PATA drive. $ foo() { date +%S.%N; } $ sudo true; foo; sudo fdisk -l /dev/sdb $N; foo 31.142709016 35.482519853 $ e 35.482519853 - 31.142709016 4.339810837 $ So that's quite a bit slower. There are a few SMART stats with spin in their name, including apparent spin up time. http://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes Cheers, Ralph. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue Hi Ralph, this is what made me raise an eyeborw: From the Western Digital website: Western Digital manufactures desktop edition hard drives and RAID Edition hard drives. Each type of hard drive is designed to work specifically in either a desktop computer environment or a demanding enterprise environment. If you install and use a desktop edition hard drive connected to a RAID controller, the drive may not work correctly unless jointly qualified by an enterprise OEM. This is caused by the normal error recovery procedure that a desktop edition hard drive uses. When an error is found on a desktop edition hard drive, the drive will enter into a deep recovery cycle to attempt to repair the error, recover the data from the problematic area, and then reallocate a dedicated area to replace the problematic area. This process can take up to 2 minutes depending on the severity of the issue. Most RAID controllers allow a very short amount of time for a hard drive to recover from an error. If a hard drive takes too long to complete this process, the drive will be dropped from the RAID array. Most RAID controllers allow from 7 to 15 seconds for error recovery before dropping a hard drive from an array. Western Digital does not recommend installing desktop edition hard drives in an enterprise environment (on a RAID controller). Western Digital RAID edition hard drives have a feature called TLER (Time Limited Error Recovery) which stops the hard drive from entering into a deep recovery cycle. The hard drive will only spend 7 seconds to attempt to recover. This means that the hard drive will not be dropped from a RAID array. Though TLER is designed for RAID environments, it is fully compatible and will not be detrimental when used in non-RAID environments. My new drives are labelled Desktop Drives. However as I say, I have had no problems so far maybe my next electricity bill will be tiny ;) Regards Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] disk problems
On Friday, February 18, 2011 12:39:37 pm Ralph Corderoy wrote: Hi Andrew, What kind of spin-up times do you think are normal for a modern hard-drive then? Second or two? Purely from very limited experience. Have just timed this very old 20GB PATA drive. $ foo() { date +%S.%N; } $ sudo true; foo; sudo fdisk -l /dev/sdb $N; foo 31.142709016 35.482519853 $ e 35.482519853 - 31.142709016 4.339810837 $ So that's quite a bit slower. There are a few SMART stats with spin in their name, including apparent spin up time. http://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes Cheers, Ralph. -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue Hi again Ralph, I have found : http://www.csc.liv.ac.uk/~greg/projects/erc/ Which talks about a solution (back in 2009 - a patch to smartctl). I assumed ;) the patch is included in the FC14 smartctl and tried it : # smartctl -d sat -l scterc /dev/sdb smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net SCT Error Recovery Control: Read: Disabled Write: Disabled # smartctl -l scterc,70,70 /dev/sdc smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net SCT Error Recovery Control: Read: 70 (7.0 seconds) Write: 70 (7.0 seconds) - # smartctl -d sat -l scterc /dev/sdb smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net SCT Error Recovery Control: Read: 70 (7.0 seconds) Write: 70 (7.0 seconds) - So, I will now wait see what haappens. Regards Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] disk problems
On Friday, February 18, 2011 02:27:43 pm jr wrote: On 18 February 2011 14:09, Andrew Reid Paterson andy.pater...@ntlworld.com wrote: So, I will now wait see what haappens. those settings (probably) won't survive a reboot, you might want to add a small script to your system start. Funny you should say that! - I just discovered that and added them to my rc.local Thanks Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
[Dorset] disk problems
Hi all, I have a pernennial problem with a raid array (which contains a 400GB filesystem 72% full. Since its raid 1 I am bemused that I keep getting file-system errors every 2 or threee days on reboot (requiring a manual fsck). The kernel log shows (e.g): ___ [ 7551.160178] ata10.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 [ 7551.160182] ata10.00: BMDMA stat 0x4 [ 7551.160186] ata10.00: failed command: WRITE DMA [ 7551.160194] ata10.00: cmd ca/00:18:39:50:a1/00:00:00:00:00/e9 tag 0 dma 12288 out [ 7551.160196] res 51/84:00:50:50:a1/00:00:00:00:00/e9 Emask 0x10 (ATA bus error) [ 7551.160200] ata10.00: status: { DRDY ERR } [ 7551.160203] ata10.00: error: { ICRC ABRT } [ 7551.160236] ata10: soft resetting link [ 7551.323572] ata10.00: configured for UDMA/100 [ 7551.329343] ata10.01: configured for UDMA/66 [ 7551.329595] ata10: EH complete Is anyone able to reasonably decipher this? I recently upgraded the filesystem from ext3 to ext4 (via appropriate incantation of tune2fs). This made not the slightest difference. Strangley, after the fscks has fixed things (mainly dup allocated blocks) I never appear to have lost anything (!). Any (reasonably polite) suggestions gratefully received. In particuylar - how to match the ata no. given with one of my actual disks filesystems mounted as follows: /dev/mapper/vg_waverley-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext=system_u:object_r:tmpfs_t:s0) /dev/sda1 on /boot type ext4 (rw) /dev/mapper/vg_waverley-lv_home on /opt type ext4 (rw) /dev/md1 on /home type ext4 (rw) /dev/md0 on /multimedia type ext3 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) fusectl on /sys/fs/fuse/connections type fusectl (rw) gvfs-fuse-daemon on /home/andyp/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=andyp) /proc/diskstats: ___ ... ... ... 8 0 sda 72495 13319 3310860 320940 21615 267129 2184958 674670 0 250084 995628 8 1 sda1 644 250 9656 919 170 17603 35558 3187 0 1309 4106 8 2 sda2 71683 13065 3299828 319382 18924 249526 2149400 637608 0 215408 957010 11 0 sr0 0 0 0 0 0 0 0 0 0 0 0 8 16 sdb 27076 13275 1084119 146144 10482 18556 231792 92334 0 218764 238432 8 17 sdb1 615 1460 3079 547 0 0 0 0 0 469 546 8 18 sdb2 2083 1991 14586 2839 2 0 16 3 0 2738 2842 8 19 sdb3 22345 9518 909948 134862 10385 18551 231528 91810 0 209747 226630 8 20 sdb4 1985 290 155994 7715 26 5 248 210 0 6991 7922 8 32 sdc 23652 12092 690676 137121 10457 18579 231776 93315 0 210435 230407 8 33 sdc1 691 1384 3079 495 0 0 0 0 0 437 494 8 34 sdc2 412 1523 1959 549 0 0 0 0 0 518 548 8 35 sdc3 20659 8873 550762 129205 10362 18574 231528 92761 0 203760 221944 8 36 sdc4 1842 296 134364 6601 26 5 248 217 0 6235 6813 11 1 sr1 0 0 0 0 0 0 0 0 0 0 0 253 0 dm-0 83866 0 3290154 502689 268450 0 2143624 13403047 0 248238 13905734 253 1 dm-1 394 0 3152 1919 719 0 5752 4035 0 994 5954 9 1 md1 61401 0 1460282 0 25500 0 203448 0 0 0 0 9 0 md0 4348 0 289946 0 19 0 152 0 0 0 0 253 2 dm-2 722 0 5770 1378 5 0 24 78 0 554 1456 ... ... ___ /proc/mdstat: _ Personalities : [raid1] md0 : active raid1 sdc4[1] sdb4[0] 58605056 blocks [2/2] [UU] md1 : active raid1 sdc3[1] sdb3[0] 58605056 blocks [2/2] [UU] unused devices: none ___ md1 is the offending mirror. System is FC14: Fedora release 14 (Laughlin) (But I was getting this with FC11 prior to an upgrade) TIA Andy -- Next meeting: Blandford Forum, Wednesday 2011-03-02 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue