This is a generic storage driver for read and write - this does '''not include FAT32 filesystems - it is a raw device.
The primary use is USB memory keys, memory drives, flash drive, thumb keys or what ever you call them.
USB disk drives may also work but its not the prime target.
First use may be CE diagnostics.
Use firmware EL340-40 or higher
Boot and install support will require new firmware (possible Spring 2009) on POWER6 only
Do:
Very latest POWER6 firmware & AIX 5.3 TL09 or AIX 6.1 TL02 - or later
Use a brand new 4 GB + flash drive = £10/$12/€12
Write .iso image with "r" device and large block size like: dd if=myimage.iso of=/dev/rflashdrive0 bs=1m
Use mkiosfs to do a backup of a few files: mkisofs -iso-level 3 -lLdDJ -o /dev/rflashdrive0 [file-names-space-separated]
Read by mounting: mount -rv cdrfs /dev/flashdrive0 /mnt
Before removing: umount /mnt
Boot AIX, although DVD drive (£160) or virtual DVD good too!
Don’t:
Raw (dd,tar, cpio,restore style) read I/O ... until bug fixed
Don’t trust USB disks
Try to boot Linux
Packages are:
devices.common.IBM.usb provides USB system driver.
devices.usbif.08025002 provides mass storage driver.
To check use: lslpp -L | grep usb
Configuration:
Stick the memory key in the front of the machine
cfmgr -- or -- cfgmgr -l usb0
lsdev will show you new devices flashdriveN (N = 0,1,2 etc)
ls -l /dev/*flash* will show you /dev/flashdriveN and /dev/rflashdriveN
Mine look like:
root:/tmp# ls -l /dev/*flash*
br--r--r-- 1 root system 36, 0 Feb 12 08:34 /dev/flashdrive0
cr--r--r-- 1 root system 36, 0 Feb 12 08:34 /dev/rflashdrive0
Use it
If you mounted the drive as a file system don't forget to unmount it.
When completely done: rmdev -l flashdrive0 -d to remove the flash device
Remove memory key
# lsconf | grep flash
* flashdrive0 U789C.001.DQD3561-D1-T1-L1 USB Flash Drive
# lsdev -Cc flashdrive
flashdrive0 Available 0.2 USB Flash Drive
I am told the 0.2 means device usbhc0 on port 2.
Use:
This behave like any raw device but if it helps think of them as a tape drive which you can write an file.
You are responsibly for the file content.
Like tapes use backup/restore, tar, cpio, dd
They will utterly destroys any formatting of the drive like FAT32, so you can't access it from Windows.
ISO images:
If you write an ISO image to the drive using dd
ISO file system created by mkisofs
Written to flashdrive with dd command: “dd if=myimage.iso of=/dev/flashdrive0”
ISO file system can be mounted: “mount -rv cdrfs /dev/flashdrive0 /mnt”
Notes:
Writing to flash drives is fairly slow but reading is very quick
Development Labs have tested:
Lenovo 2GB Essential Memory Key
Kingston 4GB Data Traveller
SanDisk 4GB Cruzer
Recommended:
Never use a memory key under 4GB - its just a waste of your time
Use USB v2.0 standard memory key (not USB v1.1) = at least twice the speed
Use larger USB memory keys(4GB or more, 32 GB ones are now available) = tend to be newer, faster and work better
Labs found some problems with Kingston 1GB model, but others have reported general success with use of various models (including USB hard drives).
Create a 10 MB file
# dd if=/dev/zero of=10MB bs=10m count=1
Write it to the flash drive
timex dd if=10MB of=/dev/flahsdirve0
20480+0 records in.
20480+0 records out.
real 0.30
user 0.07
sys 0.15
root:/tmp# timex dd if=10MB of=/dev/flashdrive0
20480+0 records in.
20480+0 records out.
real 198.01
user 0.13
sys 0.48
Note:
It take a lot longer = 3 minutes or 53 KB/second
CPU is 100% wait
Flashdrive is 100% busy I/O stats missing
The dd command is 2% busy so we are waiting for the drive to save the data
root:/tmp# timex dd if=/dev/flashdrive0 of=sally
dd: 0511-053 The write failed.
: There is not enough space in the file system.
374107+0 records in.
374104+0 records out.
real 325.20
user 1.83
sys 5.16
root:/tmp# ls -l sally
-rw-r--r-- 1 root system 191541248 Feb 12 09:49 sally
Notes:
Oh dear we have read back 191MB's of data - only wrote 10MB.
This was only limited because it filled up /tmp.
This is a bug and has been reported.
Waiting for fixes to appear.
My Configuration is:
USB Data Traveller 4GB
POWER6 p520
LPAR with the system board USB ports assigned (the ones on the front)
AIX oslevel = 6.1.2.0
AIX oslevel -s = 6100-02-01-0847
Platform Firmware level: EL340_043
Also tried at
AIX oslevel = 6.1.3.0
AIX oslevel -s = 6100-02-02-0849 - (6.1 beta for TL03) 12th Feb 2009.
This failed to even see the USB device but it is a beta AIX
I selected the smallest /iso I could find, which was ~10.5 MB. Here is how it went:
# dd if=SecurityPack.iso of=/dev/flashdrive0
20324+0 records in.
20324+0 records out.
# mkdir /mnt2
# mount -rv cdrfs /dev/flashdrive0 /mnt2
root:/# df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 393216 71072 82% 11932 58% /
/dev/hd2 3407872 212880 94% 29932 53% /usr
/dev/hd9var 327680 181776 45% 4514 18% /var
/dev/hd3 524288 373968 29% 41 1% /tmp
/dev/hd1 65536 64832 2% 5 1% /home
/dev/hd11admin 262144 261416 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 196608 24928 88% 1820 38% /opt
/dev/livedump 524288 523552 1% 4 1% /var/adm/ras/livedump
/dev/flashdrive0 19724 0 100% 4931 100% /mnt2
root:/# ls -l /mnt2
total 12
-rw-rw-r-- 1 4000 4000 42 Oct 07 2007 .Version
drwxrwxr-x 3 4000 4000 2048 Oct 07 2007 installp
drwxrwxr-x 3 4000 4000 2048 Oct 07 2007 usr
root:/#
Notes;
Again 53 KB/s writing to the USB
I installed a package - just to prove it is all there and it worked fine.
Reading from the device 2.4 MB file in 3.3 seconds = 744 KB/s = a lot faster reading.
I am told:
With my EL340_43 firmware I should be able to boot off the USB key
Which is one of the key points = to allow CE to boot Diagnositics quickly on a failed machine, even it there is no DVD drive.
AIX 6.1.3beta 3.7 GB image with 1 MB block size in 2 hours !!
+-topas_nmon--m=Memory-----------Host=silver_lpar3---Refresh=2 secs---05:19.55-+
| CPU-Utilisation-Small-View -----------EntitledCPU= 0.50 UsedCPU= 0.039-----|
|Logical CPUs 0----------25-----------50----------75----------100|
|CPU User% Sys% Wait% Idle%| | | | ||
| 0 0.0 0.0 100.0 0.0|WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW>|
| 1 0.0 0.0 0.0 100.0| > ||
|EntitleCapacity/VirtualCPU +-----------|------------|-----------|------------+|
| EC 0.2 6.7 0.5 0.3|sss----------------------------------------------||
| VP 0.1 3.4 0.2 0.2|s------------------------------------------------||
|EC= 7.7% VP= 3.9% +--No Cap---|------------|-----------100% VP=1 CPU+|
| Disk-KBytes/second-(K=1024,M=1024*1024) -------------------------------------|
|Disk Busy Read Write 0----------25-----------50------------75--------100|
| Name KB/s KB/s | | | | ||
|hdisk0 0% 0 0| ||
|cd0 0% 0 0| ||
|flashdrive0 100% 0 >|
|Totals 0 0+-----------|------------|-------------|----------+|
|------------------------------------------------------------------------------|
| Disk-KBytes/second-(K=1024,M=1024*1024) -------------------------------------|
|Disk Busy Read Write Transfers Size Peak% Peak KB/s qDepth |
| Name KB/s KB/s /sec KB Read+Write or N/A |
|hdisk0 0% 0.0 0.0 0.0 0.0 0% 2.0 -- |
|cd0 0% 0.0 0.0 0.0 0.0 0% 0.0 -- |
|flashdrive0 100% 0.0 0.0 5.0 0.0 100% 0.0 -- |
|Totals(MB/s) Read=0.0 Write=0.0 Size(GB)=16 Free(GB)=13 |
|------------------------------------------------------------------------------|
Notes:
flashdrive0 is doing 5 transfers per second to the USB memory key
1 MB byte writes
This would help to explain the fast speed.