Sony Cybershot with Fedora 9

While attempting to dump some photos from my newly acquired Sony Cybershot camera onto a Fedora 9 workstation, I had to switch to “Mass Storage” mode on the camera before I was able to mount the volume.

When I inserted the USB cable into my camera and turned it on, the dmesg output was as follows:

usb 1-6: new high speed USB device using ehci_hcd and address 3
usb 1-6: configuration #1 chosen from 2 choices
usb 1-6: New USB device found, idVendor=054c, idProduct=0010
usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-6: Product: Sony DSC
usb 1-6: Manufacturer: Sony

I saw an  Ubuntu forum note about switching to PTP mode, but that did not work for me, only returning the following:

usb 1-6: new high speed USB device using ehci_hcd and address 4
usb 1-6: configuration #1 chosen from 1 choice
usb 1-6: New USB device found, idVendor=054c, idProduct=004e
usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-6: Product: Sony PTP
usb 1-6: Manufacturer: Sony

After I switched to “Mass Storage” mode, I see the following output:

Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 4:0:0:0: Direct-Access     Sony     Sony DSC         6.00 PQ: 0 ANSI: 0 CCS
sd 4:0:0:0: [sdb] 3962880 512-byte hardware sectors (2029 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] 3962880 512-byte hardware sectors (2029 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 4:0:0:0: [sdb] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg2 type 0

I was then able to mount the volume (was already mounted to /media/disk) and copy my pictures from the device.

$ lsusb
Bus 001 Device 006: ID 054c:0010 Sony Corp. DSC-S30/S70/S75/F505V/F505/FD92/W1 Cybershot/Mavica Digital Camera
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a81:0205 Chesen Electronics Corp. PS/2 Keyboard+Mouse Adapter
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

MySQL: MyISAM Table Gotchas!

I’ve recently had to learn a lot about MySQL and how to manage it effectively, especially after it has not been managed very well for a long time. As a Linux Administrator I’ve had the opportunity to use MySQL in many roles over the years but never at an enterprise level. I’m still learning and trying things out, but so far here are some guidelines:

  • MyISAM is a very fast engine, do not delete rows without performing an optimize directly afterward to prevent holes, fragmentation, and subsequent table locking as the holes are filled while fragmenting the tables — create a data maintenance plan and don’t delete data without cause and use batches.
  • Running an optimize on a large MyISAM table might take a day or two.
  • MyISAM will lock the table on inserts if there are holes from data removal when an optimize has not been performed to remove the holes.
  • InnoDB consumes a significant amount of space compared to MyISAM, a general guideline might be 5x as much.

If you find that after deleting data from a table you have performance issues, look at running optimize on your MyISAM tables and check for locks using ‘show processlist’.

I don’t know if converting to InnoDB will help in situations with large data sets where table maintenance is not performed regularly, but time will tell. I am skeptical that the performance on an InnoDB table will be there with large data sets as well.

I find that as an open source advocate, without knowing these things, it’s very difficult to make an argument for open source solutions when there are SQL Server advocates around calling the architecture shots.

vi Tip of the day!

Something that I need to do frequently is to set some text to lowercase in vi which is currently in mixed or upper case. A quick way to do this is:

:1s/\(.*\)/\L\1/

The above command acts on line 1 in the file, takes the entire line, enclosed in parentheses to create a group, then uses \L to specify lowercase on the entire line \1 that was previously matched.

DNS Vulnerability

Tuesday a vulnerability was made public which affects all users of the DNS system. The vulnerability was discovered by Dan Kaminsky, a prominent researcher in the area of DNS, who organized a mass patch release by major vendors to prevent delays between the vulnerability becoming public and the patch being released.

http://doxpara.com/

This is a critical fix that should be applied ASAP to all DNS servers, regardless of vendor.

Firefox 3!

Firefox 3 has been released!

I have been using this version for nearly one full day now and it’s great. I was disappointed when I loaded up all of my tabs and I normally just log out of my X session or Windows session to allow the handy crash recovery to recover all of my lost tabs on subsequent restart when, much to my dismay, it did not recover them. I had to explicitly specify through the options menu to revert to the previous set of tabs and windows on restart.

Download Firefox 3!

Net Neutrality

There are a lot of discussions going on recently with regard to ‘Net Neutrality’. When I think of the subject, I typically think of my evil ISP blocking or restricting my traffic and/or giving preference to web sites that they want me to see. I also think of the government blocking my traffic to certain sites like the great firewall of China.

I read an interesting article written by Richard Bennet where he talks about how the government should stay out of these discussions, letting engineers handle the engineering task of dictating how traffic should be controlled.

Well worth the read.

http://www.circleid.com/posts/86147_net_neutrality_innovation_081/