Archive for the ‘Macs’ Category

OS X will create sparse files across NFS, or does it?

Monday, February 14th, 2011
KinMage:src thomas$ sudo mount -o vers=3,intr /mnt
KinMage:src thomas$ ls -la /mnt
total 8
drwxrwxrwx   2 root  wheel  4096 Feb 13 21:50 .
drwxrwxr-t  24 root  admin  1224 Feb 13 21:54 ..

Where is snakey, the Linux VM I am using for testing.

And then:

KinMage:mnt thomas$ python 
KinMage:mnt thomas$ ls -la p*out
-rw-r--r--  1 thomas  staff    1023 Feb 13 21:54 p1023.out
-rw-r--r--  1 thomas  staff    1024 Feb 13 21:54 p1024.out
-rw-r--r--  1 thomas  staff    1025 Feb 13 21:54 p1025.out
-rw-r--r--  1 thomas  staff   10250 Feb 13 21:54 p10250.out
-rw-r--r--  1 thomas  staff  102500 Feb 13 21:54 p102500.out
-rw-r--r--  1 thomas  staff      64 Feb 13 21:54 p64.out
KinMage:mnt thomas$ du -sh p*out
1.0K	p1023.out
1.0K	p1024.out
1.5K	p1025.out
 10K	p10250.out
100K	p102500.out
512B	p64.out

So it creates sparse files across NFS!

Well, yes and no. It will only send a block of data across and then the
server OS decides to create the sparse file or not.

Another thing to note is that the size reported is flexible in the sense
that the underlying file system interface determines how much space
is being reported:

[thomas@snakey fooper]$ du -sh p*out
4.0K	p1023.out
4.0K	p1024.out
4.0K	p102500.out
4.0K	p10250.out
4.0K	p1025.out
4.0K	p64.out

Ideally we would like the sizes to match, but since we are pulling a fast one, we get what we see.

Sparse file creation not an option on OS X

Sunday, February 13th, 2011

We can see that when we try to create a sparse file a file under OS X (10.6) that the OS writes out the intervening pages.

KinMage:src thomas$ uname -a
Darwin KinMage 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
KinMage:src thomas$ python 
KinMage:src thomas$ ls -la p*out
-rw-r--r--  1 thomas  staff    1023 Feb 13 21:44 p1023.out
-rw-r--r--  1 thomas  staff    1024 Feb 13 21:44 p1024.out
-rw-r--r--  1 thomas  staff    1025 Feb 13 21:44 p1025.out
-rw-r--r--  1 thomas  staff   10250 Feb 13 21:44 p10250.out
-rw-r--r--  1 thomas  staff  102500 Feb 13 21:44 p102500.out
-rw-r--r--  1 thomas  staff      64 Feb 13 21:44 p64.out
KinMage:src thomas$ du -sh p*out
4.0K	p1023.out
4.0K	p1024.out
4.0K	p1025.out
 12K	p10250.out
104K	p102500.out
4.0K	p64.out

They should all be a multiple of a block size if there are sparse files. Since
they are not, we can conclude no sparse files were created.

Hmm, I wonder what happens over NFS?

Fusion serial ports

Wednesday, February 9th, 2011

Using virtual serial ports between two machines?

Waiting on a Triwing #0

Friday, February 4th, 2011

I ordered a 9.5 mm SATA Optical Bay SATA Hard Drive Enclosure from I should have paid more attention – I had the Torq screwdriver I needed on the older MacBook Pros, but I didn’t have the #0 Triwing I needed with the newer models.

I spent last Saturday afternoon trying to find one in town. I could get down to a #2, but no luck on the #0. So I ordered one from It wasn’t their fault and they had a speedy turn around. It shipped just quick enough to get caught in the snow storm.

My son said he saw a USPS truck in the nearby apartment complex, but they seem afraid of our cul-de-sac.

Wireshark ChmodBPF errors on Snow Leopard

Wednesday, January 26th, 2011

Wireshark ChmodBPF errors on Snow Leopard

Some VMware Fusion networking resources

Sunday, January 23rd, 2011

How to modify Fusion network settings whitepaper which leads to this PDF: VMware Fusion Network Settings – Part 1.pdf

Advanced Networking Configuration – Tokamak Networking Scripts for VMware Fusion

No clue if there is a Fusion 3.x version of Tokamak. There is!

Creating two (or more) Host-Only networks totally isolated

How to edit DHCP server for Fusion

Friday, January 14th, 2011

Crap, I am mixing versions of Fusion down below and it is partly because I do not have a clean install of Fusion on my laptop! I do on the iMac and that is what is telling me I have different systems!

Re: Scripts to manage Fusion network settings is a good place to see the differences.

See Controlling DHCP for VMWare Fusion VMs!

Note: I had to edit

/Library/Application Support/VMware Fusion/networking

and also reboot the MacBook to get this to work.

VMware Fusion Virtual Network Configuration, 27 August 2010 has a different approach.

To actually change the domain-name, you will want to edit vmnet-dhcpd.conf:

KinMage:VMware Fusion thomas$ grep domain-name vmnet-dhcpd.conf
# We set domain-name-servers to make some DHCP clients happy
    option domain-name-servers %hostaddr%;
    option domain-name "";
KinMage:VMware Fusion thomas$ sudo ./vmnet-cli -c
KinMage:VMware Fusion thomas$ sudo ./vmnet-cli --start

Thinking control versus command

Tuesday, October 26th, 2010

I’m trying real hard to make that final switch to OS X and the biggest problem I am having is thinking “Control” instead of “Command” when I want to do a meta-operation. In Windows, I’d do a Ctl-C instead of a Cmd-C. So I’ve been letting myself get away with it.

Now that I’m trying to be legit, I find the thought process is impacting the finger process.

Getting tshark installed on Mac OS X

Thursday, October 21st, 2010

Download  the wireshark .dmg and open it up.

Then copy the command line files to a location in your path:

512  sudo mkdir /usr/local/bin
513  sudo cp /Volumes/Wireshark/Utilities/Command\ Line/* /usr/local/bin

Going KVM

Monday, October 11th, 2010

I’ve been cleaning up the clutter in my office and as much as I like having a keyboard for each computer, it isn’t like I can type on both at the same time. So I dug out my iogear GC634U 4-port USB KVM switch. Now I like the form factor and such, but it only does VGA, despite being shown on the box working with Mac Minis.

So I’ve just hooked up the KM and left the V on the roadside. I do use multiple displays at the same time, so this is a plus.

Anyway, the hotkeys are [scroll-lock][scroll-lock] and the Macs do not have that key. You can reprogram that with [clear][-] and once the [caps-lock] starts blinking, [t]. At that point [control][control] will be your hotkey initiator. And to cycle through the attached machines, [control][control][return]. I.e., I don’t care to remember which ports I have hooked up.

I haven’t made the jump to attaching my Win7 box yet.

Oh yeah, on the two interior cable sets, the ones not always attached, the white capped connector goes to the KVM and the blue capped one (which has the USB and audio cables) goes to your computer.