Archive for ‘SuSE’ Category
Browse:
SuSE »
Subcategories:

Copying large number of files between two Unix/Linux/OSX Servers

datePosted on 14:38, August 15th, 2012 by Many Ayromlou

Here are some quick tip(s) for copying a ton of files between unixy machines really fast. You’re probably thinking “why not use rsync?”…..well rsync can be miserably slow if your source or destination cpu is underpowered. You can always do a rsync after these commands to make 100% certain that everything checks out, but try using one of these methods for the initial copy:

  • One way of doing it is
    tar -c /path/to/dir | ssh user@remote_server 'tar -xpvf - -C /absolute/path/to/remotedir'

    You’ll be prompted for the remote servers password or you can use the private key of the remote server using the -i switch in the ssh command. This has the side benefit of preserving permissions. An alternate version of this command can also be used to locally move folder structures across mount points while preserving permissions: 

    tar -cf - -C srcdir . | tar -xpf - -C destdir

    or

    cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -)
  • Another way of doing it with netcat (nc) is
    srv1$ tar -cfv - * | nc -w1 remote.server.net 4321

    followed by

    srv2$ nc -l -p 4321 |tar -xpfv - 

    Note that you type the first command on the source machine and the second command on the destination machine.

  • Yet another way of doing it with socat utility is
    host1$ tar -cvf - * | socat stdin tcp4:host2:portnum

    followed by

    host2$ socat tcp4-listen:portnum stdout | tar -xvpf - 

    Note that you type the first command on the source machine and the second command on the destination machine.

Once your favourite process (above) is done you can do a quick rsync to tie up any loose ends.

rsync -avW -e ssh /path/to/dir/ remote_server:/path/to/remotedir

Rsync will now fly through the filesystem as 99.9% of the time, 99.9% of the files on the destination are good. And as always make sure you understand the commands before you use them…..and keep backups just in case :-).

Suse 10.1 to 10.3 upgrade Episode 3

datePosted on 15:31, May 7th, 2008 by Many Ayromlou

Well in Episode 3 of our saga Many goes bald (again) and (almost) drop kicks the server out the window. After going through the pain of installing 10.1 and updating everything I proceeded to upgrade to OpenSuSE 10.3. The upgrade went okay as far as the boot DVD was concerned (no errors during boot), but the dreaded SCSI errors from Episode 1 came back when I finished the upgrade and rebooted the machine. After about 10 minutes of repeating the F-word to the machine I decided to check on the net again, this time not at google.com, but at their linux centric search page google.com/linux. Well I have to admit, google is really god :-). Someone there had suggested an upgrade to the Adaptec PERC 3Di raid scsi card that comes standard with the PowerEdge 2650 and guess what, that solved everything. I’m not gonna bore you with the details of my 90 minute hunt for 3.5″ floppies around work to put the disk images on. Let’s just say I’ll be glad when someone invents the “Network Upgradeable Firmware”…..aka ‘NUF :-)

So it looks like there are two ways of getting the latest linux kernels to barf when it sees this type of configuration (Dell 2650, PERC 3Di scsi raid card). Installing a “XENified” kernel and/or not having the most up to date firmware. The symptom is excessive error outputs from aacraid driver.
aacraid: Host adapter abort request (0,1,1,0)
aacraid: Host adapter abort request (0,1,1,0)
aacraid: Host adapter reset request. SCSI hang ?
aacraid: Host adapter abort request (0,1,1,0)
scsi 0:1:1:0: scsi: Device offlined - not ready after error recovery

The cure is to find yourself 3 floppies and upgrade and don’t install XEN. The known working config is BIOS version A21 and PERC 3Di firmware 2.8-1[7692]. Hopefully this is not going to be the last of it. THE END….FIN. :-)

Suse 10.1 to 10.3 upgrade Episode 2

datePosted on 20:40, May 2nd, 2008 by Many Ayromlou

Okay, don’t laugh, but I’m really starting to believe in the “third time is the charm” saying. Episode 2 was going fine until last night when I left work. I had installed 10.1, skipped installing any of the XEN packages, updated 10.1, installed 10.3 and was in the process of letting it run over night (2.6 GB worth of updates…..wasn’t gonna hang around waiting for this to finish). Well somebody upstairs (santa, superman, spidy or one of those guys) did not agree and literally 20 minutes before I got into work this morning the power went out to our entire building, leaving my poor — almost done — 10.3 install in the middle of nowhere. I rebooted and just about cried my eyes out when GRUB could not find the new kernel :-)……Anyways, Episode 3 (known as operation “INSTALL or BUST”) is in process as we speak. I’ve got a fresh/updated 10.1 waiting to be updated when I get back on monday and YES I turned the machine off :-)…..stay tuned!!!

Suse 10.1 to 10.3 upgrade Episode 1

datePosted on 11:41, May 1st, 2008 by Many Ayromlou

So I’ve been preparing a test server for the past couple of days, so that I can test the Suse upgrade path from 10.1 to 10.3. I’ve got a spare Dell 2650 machine with a PERC3/i card and two 37 GB scsi drives in raid-1 configuration.

To get the test going I installed SuSE 10.1 from the install DVD and proceeded to choose pretty much all the options for the packages thinking that if the upgrade worked with (almost) all the installable packages selected, then it would almost certainly work on the real server. That was I believe my first mistake, by choosing (almost) all the options, I had also included XEN virtualization. This forces the 10.1 installer to install the XENified version of the linux kernel off the 10.1 DVD. This was fine and dandy as long as I was using 10.1, after doing all the online updates for 10.1 and installing 10.3 (and updating it), I rebooted and was greeted by the following kernel messages:
Mar 2 19:15:21 xxxxxx kernel: SCSI subsystem initialized
Mar 2 19:15:21 xxxxxx kernel: Adaptec aacraid driver 1.1-5[2437]-mh4
Mar 2 19:15:21 xxxxxx kernel: ACPI: PCI Interrupt 0000:04:08.1[A] -> GSI 30 (level, low) -> IRQ 16
Mar 2 19:15:21 xxxxxx kernel: AAC0: kernel 2.7-1[3170]Mar 2 19:15:21 xxxxxx kernel: AAC0: monitor 2.7-1[3170]Mar 2 19:15:21 xxxxxx kernel: AAC0: bios 2.7-1[3170]Mar 2 19:15:21 xxxxxx kernel: AAC0: serial 5C8881D3
Mar 2 19:15:21 xxxxxx kernel: AAC0: 64bit support enabled.
Mar 2 19:15:21 xxxxxx kernel: AAC0: 64 Bit DAC enabled
Mar 2 19:15:21 xxxxxx kernel: scsi0 : percraid
Mar 2 19:15:21 xxxxxx kernel: Vendor: DELL Model: Lombok Rev: V1.0
Mar 2 19:15:21 xxxxxx kernel: Type: Direct-Access ANSI SCSI revision: 02
Mar 2 19:15:21 xxxxxx kernel: SCSI device sda: 574210048 512-byte hdwr sectors (293996 MB)
Mar 2 19:15:21 xxxxxx kernel: sda: Write Protect is off
Mar 2 19:15:21 xxxxxx kernel: SCSI device sda: drive cache: write back
Mar 2 19:15:21 xxxxxx kernel: SCSI device sda: 574210048 512-byte hdwr sectors (293996 MB)
Mar 2 19:15:21 xxxxxx kernel: sda: Write Protect is off
Mar 2 19:15:21 xxxxxx kernel: SCSI device sda: drive cache: write back
Mar 2 19:15:21 xxxxxx kernel: sda: sda1 sda2
Mar 2 19:15:21 xxxxxx rpc.statd[2231]: Version 1.0.9 Starting
Mar 2 19:15:21 xxxxxx kernel: sd 0:0:0:0: Attached scsi removable disk sda
Mar 2 19:15:21 xxxxxx kernel: AAC:AAC received an unrecognized command [601].
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,0,0)
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,0,0)
Mar 2 19:15:21 xxxxxx rpc.statd[2231]: statd running as root. chown /var/lib/nfs/statd/sm to choose different user
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,0,0)
Mar 2 19:15:21 xxxxxx kernel: scsi 0:1:0:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,1,0)
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,1,0)
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,1,0)
Mar 2 19:15:21 xxxxxx kernel: scsi 0:1:1:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,2,0)
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,2,0)
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:21 xxxxxx kernel: aacraid: Host adapter abort request (0,1,2,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:2:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,3,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,3,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,3,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:3:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,4,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,4,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,4,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:4:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,5,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,5,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,5,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:5:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,6,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,6,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,6,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:6:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,7,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,7,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,7,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:7:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,8,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,8,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,8,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:8:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,9,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,9,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,9,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:9:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,10,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,10,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,10,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:10:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,11,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,11,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,11,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:11:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,12,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,12,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,12,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:12:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,13,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,13,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,13,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:13:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,14,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,14,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,14,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,1,14,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:1:14:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,0,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,0,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,0,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:2:0:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,1,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,1,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,1,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:2:1:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,2,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,2,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,2,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:2:2:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,3,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,3,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,3,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:2:3:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,4,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,4,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,4,0)
Mar 2 19:15:22 xxxxxx kernel: scsi 0:2:4:0: scsi: Device offlined - not ready after error recovery
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,5,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter abort request (0,2,5,0)
Mar 2 19:15:22 xxxxxx kernel: aacraid: Host adapter reset request. SCSI hang ?

ETC,ETC,ETC,.......

So what’s the deal. Looks like the driver is poking the scsi bus for every single ID on both buses. This literally takes 20-30 minutes, but the machine DOES boot up. Of course this is not acceptable, so after poking around I found out that It’s the XENified Kernel that’s causing this.

I’m testing this right now by reinstalling 10.1 from DVD WITHOUT XEN Virtualization. I will then apply the updates and upgrade (and update again) to 10.3 and report back in Episode 2……hopefully everything will work…….famous last word :-).

Getting Samba to work properly with SuSE’s Firewall…

datePosted on 19:57, November 1st, 2007 by Many Ayromlou

Here we are again and I have to sadly say…..yet another OS (which I also love) that does not do what it promises. I know that you can do some major iptables kungfu under linux through command line, but when SuSE/Novell tries to sell you Yast as a graphical admin interface they should atleast check to make sure things are working properly.

Samba works under SuSE 10.x, and even with the firewall turned on the machine can act as a member of a Windows domain/workgroup. The problem though, is not with using Samba and having the firewall turned on. The problem is having Samba do more than just act as a member of the domain. We have a SuSE 10.1 machine that is part of our AD domain (spanning 3 subnets) and we also like it to be our local master and preferred master on the local subnet. It has one NIC active (ie: direct connection, with no NAT) and iptables firewall is active on that NIC. The problem is that the firewall rules that Yast2 creates are too restrictive (ie: if you just go to Yast2 and add Samba services as a allowed service). 
Here is how you can fix this with a bit more effort:
  • Setup the firewall with allowed services you like to punch through (ie: ssh, ftp and alike). Include Samba Server in the list as well under allowed services.
  • Start the Firewall, at this point the basic samba stuff is working (ie: you can browse), but you more than likely can not do anything more in terms of domain participation.
  • From the Yast2 interface go to System> /etc/sysconfig editor screen
  • Goto the section Network> Firewall> SuSEfirewall2
  • ADD the following service names to appropriate sections ONLY if they are missing
  • Under heading FW_SERVICES_EXT_TCP make sure you have the following:

microsoft-ds netbios-dgm netbios-ns netbios-ssn

  • Under heading FW_SERVICES_EXT_UDP make sure you have the following:

netbios-ns

  • Under heading FW_ALLOW_INCOMING_HIGHPORTS_TCP make sure you have the following:

microsoft-ds netbios-ns

  • Under heading FW_ALLOW_INCOMING_HIGHPORTS_UDP make sure you have the following:

microsoft-ds netbios-ns

  • Under heading FW_ALLOW_FW_BROADCAST_EXT make sure you have the following:

netbios-ns netbios-dgm

Now you’ve got the right holes punched through the firewall so click Finish and enjoy. You can now go back to the Samba config and make changes to become a serving member of your domain/workgroup.