Tuesday, March 29, 2011
Setting Up a TCIP Socket
Some good code examples. The python code looked the best, but tested with the 'C' code.
Some Oracle Java examples with dialog windows.
Figuring Out Devices and Storage on the Pogoplug
On a normal Pogoplug V2 4 USB storage devices looks like this:
-bash-3.2# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 32768 15872 16896 48% /
none 128004 12 127992 0% /tmp
/tmp/.cemnt/sda1 1953512000 125684 1953386316 0% /tmp/.cemnt/mnt_sda1
/tmp/.cemnt/sdb1 1953512000 125732 1953386268 0% /tmp/.cemnt/mnt_sdb1
/tmp/.cemnt/sdc1 1953512000 125732 1953386268 0% /tmp/.cemnt/mnt_sdc1
/tmp/.cemnt/sdd1 1953512000 125732 1953386268 0% /tmp/.cemnt/mnt_sdd1
OK, this makes sense.
-bash-3.2# /sbin/fdisk /tmp/.cemnt/sda
The number of cylinders for this disk is set to 243201.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /tmp/.cemnt/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/tmp/.cemnt/sda1 1 243201 1953512001 7 HPFS/NTFS
OK, it see the USB devices. Now I have to get it to mount them. I can do that later.
[root@Plugbox ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 05dc:a761 Lexar Media, Inc.
Bus 001 Device 004: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 005: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 006: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Monday, March 28, 2011
Getting Disk Info
df -h
fdisk -l hdparm -i device (probably /dev/hda)
Using the 'sudo hdparm -i /sda' command I was able to get the following data:
/dev/sda: Model=WDC, FwRev=01.04A01, SerialNo=WD-WXEY07X26552 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 AdvancedPM=yes: unknown setting WriteCache=enabled Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7 * signifies the current active mode
However, this didn't work for the new Fantom Drives. I get the following error instead:
/dev/sdb: HDIO_DRIVE_CMD(identify) failed: Invalid exchange HDIO_GET_IDENTITY failed: Invalid argument
I would guess that this has something to do with it being a USB drive.
Will this be fixed by USB3?
How did linux know if was a Fantom Drive?
USB Info
Using 'lsusb --verbose' I still don't see anything that would enable to ID drive.
Friday, March 18, 2011
Using Yum to Install Gedit
Did the following set of command to get gedit on my CENOS machine.
$ sudo yum check-update$ sudo yum update$ sudo yum install gedit
Setting Up Environment Variables
Need to setup my environment to use the iRODS icommands and control command. Added the following lines to the bottom of the ~/.bashrc file.
# add poath for iRODS icommands
export PATH=$PATH:~/iRODS/clients/icommands/bin
# add pa;th for iRODS mangment commands
export PATH=$PATH:~/iRODS
(note: I replace implicit path '~' with the actual)
Thursday, March 17, 2011
NTP (Network Time Protocol)
An internet protocol used to sync computer clocks to some reference.
Wednesday, March 16, 2011
FUSE: Filesystem in Userspace
Using FUSE it is possible to implement a fully functional filesystem in a userspace program.
Linux kernels 2.4.X and 2.6.X
Has an example using hello world program. A fuse hello world is a couple of hundred lines.
Subscribe to:
Posts (Atom)