Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to migrate from solaris to linux.

What are the hurdles I may face in migrating the file systems, and scripts and files? Is there any changes needs to be done on the sh and ksh scripts?

I wish to know what are differences between solaris and linux in an end user perspective?

share|improve this question
    
This is far too broad for us to be able to answer. The good news is that Solaris to Linux so it should be less painful. All you can realistically do is build a new Linux environment and then test your Solaris workflow/procedures in it. –  Iain Feb 16 '12 at 12:01

3 Answers 3

up vote 1 down vote accepted

Some things I've experienced over the years:

The ksh provided by redhat is pretty good nowadays. pdksh is/was less good. ksh has print statement bash does not.

If you have a requirement to print then lp/lpr/cups need a thorough checking over.

The Solaris grep/awk commands can be an issue.

Even if you decide on using ksh, the bash provided with redhat has a nice little known feature flag --rpm-requires that you can use to analyse a script:

$ bash --rpm-requires conman
executable(/etc/rc.d/init.d/functions)
executable(/etc/sysconfig/network)
executable(/etc/sysconfig/conman)
executable(echo_failure)
executable(echo_failure)
executable(daemon)
executable(touch)
executable(echo_failure)
executable(killproc)
executable(rm)
executable(status)
executable(killproc)

So now we know what commands this script needs to execute. If you run it against your catalog of scripts you can quickly work out how many are using awk/sed etc.

Make sure that you check over any ulimit settings that are in solaris Check solaris /etc/system file for semaphores/shared memory settings and check the appropriate settings can be made in linux sysctl.

/var/adm (Solaris) and /var/log (Linux)

Endianness - If you are migrating data/binary files between the systems then you need to make sure that any endian conversion has been taken care of, Sparc is big-endian, Intel little-endian.

share|improve this answer
    
Strictly, the endianness thing is architecture, not OS. If you're migrating to Linux on the same architecture, the endianness doesn't change. Good points all round, however. –  Ladadadada Feb 16 '12 at 15:49
    
Strictly, it's the data file from an application that matters. –  davey Feb 16 '12 at 21:43

We're currently doing the same thing. Issues we've found:

  • No JASS equivalent. Instead I've had to write custom shell scripts called by %post in Kickstart to implement security policy but the security controls in Linux don't seem as good as Solaris. (We're also looking at Puppet to manage configuration.)
  • No real RBAC implementation. People seem to rely on sudo instead, which has its pros and cons. I quite like in Solaris that I can delegate certain permissions to a non-root user, e.g. to control specific SMF services.
  • No SMF. Service dependencies and automatically restarting services built-in to init without requiring extra products like monit.
  • General BSD vs SysV syntax - e.g. ps -ef vs ps aux. (In this case I actually generally find the latter to be more useful, but many scripts we have are hard-coded to use the Solaris style.)
  • bonding doesn't seem as flexible as IP Multi-Pathing (IPMP). ifconfig e1000g0 group test is pretty straightforward!
  • Similarly, the storage multipathing seems a little more straightforward on Solaris but that's not to say that multipathd in Linux is no good; actually it does seem to just work but I'm not a fan of its config format :-)
  • Zones! I use zones a lot. They're so damn useful for firing up a quick test environment. Spinning up an entire VM isn't as quick or lightweight.

For the most part your shell scripts should work fine on Linux. Shells like bash and dash (often symlinked as /bin/sh on Linux systems) usually use an sh emulation when called as /bin/sh.

Other than lacking some of the more "enterprisey" features (e.g. good security controls), Linux migration should be fairly straightforward. If you're migrating databases or other binary data formats, beware of endian differences (SPARC is big-endian, x86 is little-endian).

share|improve this answer
    
Thanks James for the useful info.. –  Balualways Feb 20 '12 at 14:45

Solaris 10 and earlier ( I don't know about 11) also have a different version of cron that can behave differently to the Linux version. The */5 shortcut doesn't work other shortcuts such as @daily may not work. These shouldn't cause a problem going from Solaris to Linux but could cause some the other way.

I vaguely remember something about the day of week field starting on a Monday on Solaris but I couldn't find any mention of it in a quick Google search.

Obviously, any full file paths will need to be checked as Solaris puts many tools in /opt and /usr/ucb that Linux puts in /usr

Usernames and UIDs for daemons may cause issues if you have any of those in your scripts and you may need to change the ownership of some files when you transfer them over. Just because they are owned by www-data on Solaris doesn't mean they still will be after transferring them to Linux, and depending on your distro and release it may need to be httpd or apache.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.