I have a Linux server that contains several disks used for holding photos, movies, videos and any other general junk myself and my partner dump on there. I've had some hassles with several of the drives and I also have one that is mounted in a caddy so it can be removed and hidden away (important data!).
What I found when things failed or needed to be moved was that having the drives mounted through fstab at boot time could lead to the machine just not starting. So I used automount to get round this problem. So far so good, but if one or more drives are removed the device names they use (/dev/sda /dev/sdb etc) change so my automount maps get screwed up.
After much searching I found some articles and bits and pieces that explained how to get around this issue using udev rules. I just had to re-fix this after an update to CentOS stopped these rules matching properly. Here is the file I use now:
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_ST31000524AS_9VPCT2B9", SYMLINK+="array0%n"
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_ST31000524AS_9VPCS7ZT", SYMLINK+="array1%n"
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_SAMSUNG_HD103SJ_S246J90B653757", SYMLINK+="array2%n"
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_SAMSUNG_HD103SJ_S246J90B653776", SYMLINK+="array3%n"
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_WDC_WD20EARS-00MVWB0_WD-WCAZA0998064", SYMLINK+="drives0%n"
KERNEL=="sd*[1-9]", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/%P", RESULT=="1ATA_ST2000DL003-9VT166_6YD0EPBS", SYMLINK+="drives1%n"
The file is save as /etc/udev/rules.d/25-names.rules and looks for specific devices and creates links like /dev/array01 and /dev/drives11 depending on the ID it finds.
The bit I had to change was using %P for the parent device (/dev/sda1 has /dev/sda as a parent) and "sd*[1-9]" for the pattern to match only the partitions rather than the whole drive. Previously I used %k and a pattern that matched both the drive and partitions which did work before but not after the recent update.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, 6 January 2012
Sunday, 20 February 2011
VMPlayer: kernel.sched_compat_yield not set
Since my desktop machine at home has now had a bit of an upgrade I'm now running several VMWare instances (Windows 7 - more on this in another post - and Ubuntu 32bit - avoids pesky problems with Flash and some other tools not being available/stable in 64bit versions).
I've kept getting the above error in a dialog every time I start VMWare Player so I had a read of the upstart documentation (the replacement for SysV init) and also found the script that is meant to be reading the values from /etc/sysctl.d
# procps - set sysctls from /etc/sysctl.conf
#
# This task sets kernel sysctl variables from /etc/sysctl.conf and
# /etc/sysctl.d
description "set sysctls from /etc/sysctl.conf"
start on virtual-filesystems
task
script
cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -e -p -
end script
The issue turned out to be because the file added by VMWare Player doesn't have a .conf suffix so never gets picked up by the above script, fixed this with a link to that file with the appropriate name, 30-vmware-player.conf which should pick things up properly from now on.
I've kept getting the above error in a dialog every time I start VMWare Player so I had a read of the upstart documentation (the replacement for SysV init) and also found the script that is meant to be reading the values from /etc/sysctl.d
# procps - set sysctls from /etc/sysctl.conf
#
# This task sets kernel sysctl variables from /etc/sysctl.conf and
# /etc/sysctl.d
description "set sysctls from /etc/sysctl.conf"
start on virtual-filesystems
task
script
cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -e -p -
end script
The issue turned out to be because the file added by VMWare Player doesn't have a .conf suffix so never gets picked up by the above script, fixed this with a link to that file with the appropriate name, 30-vmware-player.conf which should pick things up properly from now on.
Wednesday, 24 February 2010
Encoding Issues
A technical blog post for a change:
I've been having a really frustrating problem with my development environment recently, something that I've encountered before but never really understood or resolved definitively either: character encoding in source files.
Thanks to this blog post I think I've finally got a handle on what is going on and why. Essentially I had assumed that it was something odd in my environment but I think it's down to the fact that developers using Windows aren't setting the correct, UTF-8, encoding in their files which is therefore causing the problems for me.
The ultimate solution seems to be to fix these files by converting to UTF-8 and re-committing but I also have the issue that Maven appears to be using ASCII encoding by default so I'm not entirely sure if converting to UTF-8 will fix things. Unless of course it is expecting UTF-8 and is converting to ASCII to compile and the error message I'm getting is misleading. Will experiment later.
I've been having a really frustrating problem with my development environment recently, something that I've encountered before but never really understood or resolved definitively either: character encoding in source files.
Thanks to this blog post I think I've finally got a handle on what is going on and why. Essentially I had assumed that it was something odd in my environment but I think it's down to the fact that developers using Windows aren't setting the correct, UTF-8, encoding in their files which is therefore causing the problems for me.
The ultimate solution seems to be to fix these files by converting to UTF-8 and re-committing but I also have the issue that Maven appears to be using ASCII encoding by default so I'm not entirely sure if converting to UTF-8 will fix things. Unless of course it is expecting UTF-8 and is converting to ASCII to compile and the error message I'm getting is misleading. Will experiment later.
Friday, 9 October 2009
RAW processing on Linux
A technical post for a change (and the last entry for today as I've other things to be getting on with) and one that I hope will help others that may be struggling with the very same problem I faced.
I'd been using RawStudio on Ubuntu Linux for processing the RAW images from my Canon 350D camera. The results were fine and I didn't have any real problems, although I seemed to have to adjust the settings on almost every picture to get them to look right. I assumed that this was just down to what the camera captured and that having to tweak everything was just a natural thing to do.
I tried to use the same programme to handle images from Rachel's 500D camera and it got totally and utterly confused. The colours were completely off and while installing the latest daily snapshot did fix some of the issues it wasn't ideal. That said RawStudio is still a fantastic programme and it's very simple and easy to use.
Instead I found an application called RawTherapee which has proven to be much more successful and handles all the images flawlessly and, be default, appears to 'guess' the correct settings for all the images I've tried so far, both from the 350D and 500D cameras. The only criticism I have is that it's not as intuitive to use and is also complex in to deal with all of the available settings. However, all the available features means that it's incredibly powerful and I've already managed to 'rescue' some images because of it. For example there is a rotate feature which had meant some pictures that looked slightly wonky could be straightened very accurately and now look great.
To be completely fair, after a few sessions of use, I'm now getting use to the interface and I intend to use this for all the image processing from now on. I think I need to get my monitor calibrated at some point as well but that will have to wait until I can borrow something to achieve that (the tools are very expensive to buy apparently and the monitor I have - a Dell 2209WA (bought from Scan) - is meant to be fairly close to the right settings by default anyway.
Here's a screenshot of RawTherapee in action (in-expertly I should add, this is me using it here).
I'd been using RawStudio on Ubuntu Linux for processing the RAW images from my Canon 350D camera. The results were fine and I didn't have any real problems, although I seemed to have to adjust the settings on almost every picture to get them to look right. I assumed that this was just down to what the camera captured and that having to tweak everything was just a natural thing to do.
I tried to use the same programme to handle images from Rachel's 500D camera and it got totally and utterly confused. The colours were completely off and while installing the latest daily snapshot did fix some of the issues it wasn't ideal. That said RawStudio is still a fantastic programme and it's very simple and easy to use.
Instead I found an application called RawTherapee which has proven to be much more successful and handles all the images flawlessly and, be default, appears to 'guess' the correct settings for all the images I've tried so far, both from the 350D and 500D cameras. The only criticism I have is that it's not as intuitive to use and is also complex in to deal with all of the available settings. However, all the available features means that it's incredibly powerful and I've already managed to 'rescue' some images because of it. For example there is a rotate feature which had meant some pictures that looked slightly wonky could be straightened very accurately and now look great.
To be completely fair, after a few sessions of use, I'm now getting use to the interface and I intend to use this for all the image processing from now on. I think I need to get my monitor calibrated at some point as well but that will have to wait until I can borrow something to achieve that (the tools are very expensive to buy apparently and the monitor I have - a Dell 2209WA (bought from Scan) - is meant to be fairly close to the right settings by default anyway.
Here's a screenshot of RawTherapee in action (in-expertly I should add, this is me using it here).
Wednesday, 29 July 2009
Annoying GIMP!
Just spent a VERY frustrating 30mins trying desperately to make bezier curves using the path tool in the GIMP (Gnu Image Manipulation Programme), specifically I wanted to be able to turn the straight lines/vertices into more rounded shapes.
Normally you do this with 'handles' that are used to adjust the parameters for the curve, but despite following the instructions in the tutorials I just couldn't get these to appear!
After MUCH frustration and almost giving up I realised that I had the "Polygonal" option ticked (I was going to create a shape with many vertices and then curve these) which, according to the manual disables the handles and only allows straight lines! D'OH!
Normally you do this with 'handles' that are used to adjust the parameters for the curve, but despite following the instructions in the tutorials I just couldn't get these to appear!
After MUCH frustration and almost giving up I realised that I had the "Polygonal" option ticked (I was going to create a shape with many vertices and then curve these) which, according to the manual disables the handles and only allows straight lines! D'OH!
Sunday, 11 January 2009
Linux is better than Windows
Time for a geeky post I think! I remember commenting once that the transgendered aspect of my life was the thing that made me slightly more interesting that the rather geeky behaviour might infer. Now in some ways the trans thing is 'normal' and it's maybe time to let some of the extreme nerdiness out :)
There has been some talk at work over the last few days about setup of a server to host Subversion as a source code repository for the project that we are working on. Using Subversion was my idea and I pestered about it constantly last year for good technical reasons (it's alot quicker/easier to deal with that ClearCase which we'd used before) as well as the fact that I just like stuff like that!
And, when it came down to it the best platform to run Subversion on is Linux - I did try and be fair and install/run on Windows but when this was tested it was found that there were glitches under load which would have made the system to unreliable for what we needed.
Another thing I'm going to be looking at as well is running WebSphere without admin rights (found this article about allowing non-root users to create profiles). Why am I obsessed with admin rights - no-one at work seems to get this as the default setup of new laptops is to allow the user full admin rights which makes installing software easy.
This is just SOOOOOOOOOOoooooooo wrong if, like me you come from a UNIX/Linux background where running as root is a cardinal sin unless it's a single command prompt used for admin tasks that is closed immediately after finishing said tasks!
You see, even on Windows there is absolutely NO reason to have admin rights, there are no well-written programs that actually need such rights to work correctly. Okay, some services/servers need admin rights to run but they can either be started automatically or kicked off from a command prompt.
The problem is that with admin rights you can, quite easily move wreck your entire setup or at the very least move things around so that you've no real idea whether a program is installed properly or not. UNIX/Linux has been designed with this idea built in: important OS/program files can only be moved around by root and no-one but root can do this!
UNIX was designed to be multi-user from the start so the very idea that normal users would be able to muck around with important files would have been a huge issue since any one person could completely wreck everyone elses work! This level of security/protection is obviously essential for multi-user systems but has the side-benefit that if it's just you using the computer you know that nothing you do is going to affect anything important, all the libraries and other system components are going to behaving in a very perdictable and repeatable way.
And I think that is why, in my opinion, Linux is better than Windows; it's designed to be modular and consistent and essentially understandable, at least in part, at quite a deep level. UNIX/Linux doesn't generally suffer, in my experience, from bizarre interactions of libraries since everything is nicely protected and seperated. That's not to say things can't go wrong but when they do it's easier to isolate the problem and even work around it.
Also I prefer Linux because of the understandability (not sure that is a real word); I guess most people don't even bother trying to figure out how Windows works (I do but can't say I've got anywhere), but with Linux/UNIX there are some simple rules/concepts that, if you grasp them, then scale up for everything else within the system, e.g. command line tools for UNIX may seem complicated and harder to grasp than Windows DOS equivalent but the complexity is consistent in a way and once you get the idea of how everything can fit together it's simple.
Anyway, that is enough geekiness for now, I await the ridicule :)
There has been some talk at work over the last few days about setup of a server to host Subversion as a source code repository for the project that we are working on. Using Subversion was my idea and I pestered about it constantly last year for good technical reasons (it's alot quicker/easier to deal with that ClearCase which we'd used before) as well as the fact that I just like stuff like that!
And, when it came down to it the best platform to run Subversion on is Linux - I did try and be fair and install/run on Windows but when this was tested it was found that there were glitches under load which would have made the system to unreliable for what we needed.
Another thing I'm going to be looking at as well is running WebSphere without admin rights (found this article about allowing non-root users to create profiles). Why am I obsessed with admin rights - no-one at work seems to get this as the default setup of new laptops is to allow the user full admin rights which makes installing software easy.
This is just SOOOOOOOOOOoooooooo wrong if, like me you come from a UNIX/Linux background where running as root is a cardinal sin unless it's a single command prompt used for admin tasks that is closed immediately after finishing said tasks!
You see, even on Windows there is absolutely NO reason to have admin rights, there are no well-written programs that actually need such rights to work correctly. Okay, some services/servers need admin rights to run but they can either be started automatically or kicked off from a command prompt.
The problem is that with admin rights you can, quite easily move wreck your entire setup or at the very least move things around so that you've no real idea whether a program is installed properly or not. UNIX/Linux has been designed with this idea built in: important OS/program files can only be moved around by root and no-one but root can do this!
UNIX was designed to be multi-user from the start so the very idea that normal users would be able to muck around with important files would have been a huge issue since any one person could completely wreck everyone elses work! This level of security/protection is obviously essential for multi-user systems but has the side-benefit that if it's just you using the computer you know that nothing you do is going to affect anything important, all the libraries and other system components are going to behaving in a very perdictable and repeatable way.
And I think that is why, in my opinion, Linux is better than Windows; it's designed to be modular and consistent and essentially understandable, at least in part, at quite a deep level. UNIX/Linux doesn't generally suffer, in my experience, from bizarre interactions of libraries since everything is nicely protected and seperated. That's not to say things can't go wrong but when they do it's easier to isolate the problem and even work around it.
Also I prefer Linux because of the understandability (not sure that is a real word); I guess most people don't even bother trying to figure out how Windows works (I do but can't say I've got anywhere), but with Linux/UNIX there are some simple rules/concepts that, if you grasp them, then scale up for everything else within the system, e.g. command line tools for UNIX may seem complicated and harder to grasp than Windows DOS equivalent but the complexity is consistent in a way and once you get the idea of how everything can fit together it's simple.
Anyway, that is enough geekiness for now, I await the ridicule :)
Tuesday, 19 February 2008
Must ... not ... buy ... more gadgets
I've already bought one of those nice little Asus EEE PCs (and a fab little gadget it is too) but now there seems to be an even more affordable laptop soon to be released:
Elonex One Laptop
I've seen comments that this is in fact a re-badged version of Simple PC by Fontastic Telecom Inc but I don't have any inside information to confirm/deny this - they do appear to look awfully similar though!
The processor seems quite low-end, so I tried to have a hunt round for further specs. I managed to find the Aday Inc company website but the closest I could get to was the 5E CPU which is very interesting, being based on a 486 core!
So it's probably fair to assume that the Elonex One laptop could well be based on a high-end 486 CPU core (with all I/O on the same chip) or at best it's going to be a low-end Pentium CPU. Either way it just goes to show (assuming this new laptop actually does perform reasonably well) that you can still do an awful lot with fairly modest hardware!
Another point worth noting (just for a bit of Microsoft baiting) is that you are VERY unlikey to be able to get XP running on this machine, let alone Vista ... of course you may have a shot with something like Pocket PC/Windows Mobile/whatever it's called today - and in fairness the version of Linux on this device is likely to be extremely cut-down compared to a full distro - still, it appears to be running Pidgin which means it can handle GNOME and X-Windows.
Hmmm, I remember running a 486DX2-66 system with only 40Mb RAM and X-Windows, OLVWM, and being able to use Netscape Navigator, XEmacs, and other basic applications without any real issue .
Update: It looks as if this Aware A-Book AW-300 may be the same as the Elonex laptop. Flick through this review and there are some real revelations in terms of the OS and GUI for this device; it appears to be quite a mis-mash of applications and I even spotted some apps with Xt/CDE-style widgets rather than the more familar GTK/Qt that most modern OS's come with.
This is beginning to look like a real budget buy and nowhere near as useful, flexible, upgradable or generally polished as the Asus EEE PC or similar devices that are coming out. Then again, once hacked, a £99 device with screen, CPU, and plenty of I/O capabilities may have it's uses.
Elonex One Laptop
I've seen comments that this is in fact a re-badged version of Simple PC by Fontastic Telecom Inc but I don't have any inside information to confirm/deny this - they do appear to look awfully similar though!
The processor seems quite low-end, so I tried to have a hunt round for further specs. I managed to find the Aday Inc company website but the closest I could get to was the 5E CPU which is very interesting, being based on a 486 core!
So it's probably fair to assume that the Elonex One laptop could well be based on a high-end 486 CPU core (with all I/O on the same chip) or at best it's going to be a low-end Pentium CPU. Either way it just goes to show (assuming this new laptop actually does perform reasonably well) that you can still do an awful lot with fairly modest hardware!
Another point worth noting (just for a bit of Microsoft baiting) is that you are VERY unlikey to be able to get XP running on this machine, let alone Vista ... of course you may have a shot with something like Pocket PC/Windows Mobile/whatever it's called today - and in fairness the version of Linux on this device is likely to be extremely cut-down compared to a full distro - still, it appears to be running Pidgin which means it can handle GNOME and X-Windows.
Hmmm, I remember running a 486DX2-66 system with only 40Mb RAM and X-Windows, OLVWM, and being able to use Netscape Navigator, XEmacs, and other basic applications without any real issue .
Update: It looks as if this Aware A-Book AW-300 may be the same as the Elonex laptop. Flick through this review and there are some real revelations in terms of the OS and GUI for this device; it appears to be quite a mis-mash of applications and I even spotted some apps with Xt/CDE-style widgets rather than the more familar GTK/Qt that most modern OS's come with.
This is beginning to look like a real budget buy and nowhere near as useful, flexible, upgradable or generally polished as the Asus EEE PC or similar devices that are coming out. Then again, once hacked, a £99 device with screen, CPU, and plenty of I/O capabilities may have it's uses.
Friday, 8 February 2008
Is Linus irrelevant for Linux?
A brief break from the shopping and other TGirl pursuits; I was just reading this article:
The article seems confused; on one hand the author is saying that Linux is moving far ahead of Linus's limited vision and on the other he says, pointing to NetApp stats (which is meaningless really) that it is such a niche OS that it doesn't matter.
The star quote that is used as the main thrust of the authors argument is this from Linus
"An OS should never have been something that people (in general) really care about: it should be completely invisible and nobody should give a flying [expletive] about it except the technical people."
The author says that this "makes some sense" and then goes on to say that, in actual fact OS X and Windows have been successful because the customers DO care about the OS and thus Linus is no longer in touch with what the users want and is irrelevant.
The problem here is that the author clearly doesn't understand the subject he is talking about and is drawing conclusions from incorrect assumptions. The OS that he sees is all the flashy graphics and cool animations and features which is what the marketing types want you to see, this sells, this *is* relevant to end users.
In reality the *real* operating system is the stuff in the background that does all the boring work of, essentially, moving bits and bytes around the computer. This is what Linus means by the "operating system", not the marketing version of this term used to sell Vista, OS X and even Linux distros based on flashy features.
So the article is really trying to highlight an issue that isn't there; everyone knows that what users see as an "operating system" *is* important because it has been marketed to be, and yes Linus is not really involved with a great many aspects of what makes up such a product.
However, Linus still does have alot to do with the real OS and his opinion and voice on these aspects DOES matter.
Is Linus Torvalds even speaking for Linux anymore?
The article seems confused; on one hand the author is saying that Linux is moving far ahead of Linus's limited vision and on the other he says, pointing to NetApp stats (which is meaningless really) that it is such a niche OS that it doesn't matter.
The star quote that is used as the main thrust of the authors argument is this from Linus
"An OS should never have been something that people (in general) really care about: it should be completely invisible and nobody should give a flying [expletive] about it except the technical people."
The author says that this "makes some sense" and then goes on to say that, in actual fact OS X and Windows have been successful because the customers DO care about the OS and thus Linus is no longer in touch with what the users want and is irrelevant.
The problem here is that the author clearly doesn't understand the subject he is talking about and is drawing conclusions from incorrect assumptions. The OS that he sees is all the flashy graphics and cool animations and features which is what the marketing types want you to see, this sells, this *is* relevant to end users.
In reality the *real* operating system is the stuff in the background that does all the boring work of, essentially, moving bits and bytes around the computer. This is what Linus means by the "operating system", not the marketing version of this term used to sell Vista, OS X and even Linux distros based on flashy features.
So the article is really trying to highlight an issue that isn't there; everyone knows that what users see as an "operating system" *is* important because it has been marketed to be, and yes Linus is not really involved with a great many aspects of what makes up such a product.
However, Linus still does have alot to do with the real OS and his opinion and voice on these aspects DOES matter.
Subscribe to:
Posts (Atom)