human choroinic gonadotropin


The notes of a madman

Archive for the ‘RHEL’ Category

smbount 2GB limit and cifs “mount error 13”

Posted by grigsby on August 8, 2008

So I needed to copy several GBs of data between a linux compute machine and a windows box. It’s enough data that I don’t want to copy to a file server and then back to the workstation. The linux system is not running Samba, FTP is out, and SCP is slower than molasses in January. First thought share a drive on the WinXP box and mount it on the server.

[root@biglinuxbox data]# mount -t smbfs -o username=user //win_workstation/share /tmpmnt
[root@biglinuxbox data]# cp /local/data/big_data_file.tgz /tmpmnt
[root@biglinuxbox data]#

Cool! Wait. That was awfully fast… Oh. The file on the client side is exactly 2GB. Damn. Quick google and… yup. smbfs has a 2GB limit. Damn.

[root@biglinuxbox ~]# mount -t cifs -o username=my_username //win_workstation/share /tmpmnt
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)
[root@biglinuxbox ~]# mount -t cifs -o username=domain/my_username //win_workstation/share /tmpmnt
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)
[root@biglinuxbox ~]# mount -t cifs -o username=domainmy_username //win_workstation/share /tmpmnt
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)
[root@biglinuxbox ~]# man mount.cifs
[root@biglinuxbox ~]# mount -t cifs -o user=domain/my_username //win_workstation/share /tmpmnt
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)

Okay. Getting mad. After spending a few minutes in the man pages, I find that you can also specify the domain on the options line. Even though the man page says that domain/username should work, it’s not.

[root@biglinuxbox ~]# mount -t cifs -o user=my_username,domain=plm //win_workstation/share /tmpmnt
[root@biglinuxbox ~]# rm damon.tgz
rm: remove regular file `damon.tgz'? y
[root@biglinuxbox ~]# cp /local/data/big_data_file.tgz /tmpmnt


“failed; no link present. Check cable?” in VMWare

Posted by grigsby on June 12, 2008

I had to get a RHEL 3 system up to test one or two things for a customer. I already have VMWare Server 1.0.5 setup to I just created a new VM and installed from my Stored ISO images. Install went as expected and I got the system up in under 10 mins (gotta love Linux. Full server running in under 10 mins, soup to nuts).

Once I was logged in I went to ftp the need software to the system. Can’t find the host. ???
Is DNS working?….

[root@RHEL-V3-ga root]# dig servername

; <<>> DiG 9.2.2 <<>> servername
;; global options: printcmd
;; connection timed out; no servers could be reached
[root@RHEL-V3-ga root]#

Server could not be reached. ???

Ok, so what IP do I have…

[root@RHEL-V3-ga root]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:21:BA:00
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:206 (206.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x1400


[root@RHEL-V3-ga root]# ifup eth0

Determining IP information for eth0... failed; no link present. Check cable?

Okay, so now what. I checked the VMWare config and yes the network card is enabled and the VMNet driver is running and other VMs on the same server are working… WTF?!? Time for Google. Dug around a bit and found a post on VMWare’s forum regarding a similar problem with Redhat 9 and ESX. Here it is.

Getting a DHCP Address in a Red Hat Linux 9.0 Virtual Machine

When a Red Hat Linux 9.0 guest operating system tries to get a DHCP address, the attempt may fail with an error message that states the link is down. On ESX Server, this happens only if you are using the vlance driver for your network connection.

To work around this problem, become root (su -) and use a text editor to edit the following files in the guest operating system. If only one of these files exist, make the change for that file only.



In both cases, [n] is the number of the Ethernet adapter — for example, eth0.

Add the following section to each of these two files:

check_link_down () {

return 1;


Then run the command ifup eth[n] (where [n] is the number of the Ethernet adapter) or restart the guest operating system.

Since the symptoms were close enough and the fix is simple I gave it a shot. Well, I’m here to report the exact same fix works for RHEL3. Hope this saves somebody else the hour or so of hunting about.

Sorting IP addresses

Posted by grigsby on January 17, 2008

I recently had to sort a large list of IP address numerically. My first few passes didn’t work. Finally I pieced the following together. This is using sort from the GNU coreutils, version 5.97, running on a CentOS 5.0 box. Should work on anything running GNU Sort. It might work on other versions of sort, but I had issues with it on HP-UX. This worked in a few seconds for well over 50k addresses. Enjoy.

sort -t'.' -nk 1,1 -k 2,2 -k 3,3 -k 4,4

Force a reinstall of a RPM

Posted by grigsby on December 21, 2007

I recently had to force a reinstall of a bunch of packages (I don’t want to talk about it. If you follow me on twitter, you know some of the details). Here is the procedure I used.

First locate the packages of the missing files using this command:

for file in `rpm -Va | grep missing |awk '{print $2}'`; do rpm -q --whatprovides $file >> /tmp/missingpack ; done

I then used this to sort the file and eliminate any duplicates:

cat /tmp/missingpack | sort -n | uniq > /tmp/missinguniq

At this point I can remove the missing packages using this:

rpm -e --justdb --nodeps packagename

Then simply reinstall as normal using yum. I’m sure I could have automated this a bit more, but the system was hurting (again, don’t want to talk about it).

Hope that helps somebody else.

nfs mount: mount: /sharepoint: Not owner

Posted by grigsby on July 5, 2007

When trying to mount a share from a Linux server (RHEL5) Solaris (10) issues this very useful message:

bash-3.00# mount server:/nfsshare /sharepoint
nfs mount: mount: /sharepoint: Not owner

This appears to be an issue with NFS v4 on Linux and Solaris 10. To fix this edit:


and change




Or of one time mounts simply add the following to the command line

mount -o vers=3 server:/nfsshare /sharepoint