What I'm Doing:
I'm developing a python script that scans for all storage devices and their respective sizes. Python does not have a command that returns the /dev paths of storage devices or the respective sizes. So, I need to pipe a shell command to python.
In root, I've used fdisk to get all storage device paths and their respective sizes and send that to a file that python can open to retrieve the path and size info. Here is what fdisk sends to a file:
Is there a way to grep this info so that the paths and their respectives sizes are returned? Or, for anyone who understands what I'm trying to achieve here, could you offer some other solution besides an attempt to grep?
I need a way to reliably detect a USB storage device from a bash script. I know how to use 'lsusb' to list the USB devices - but then how can I match a device listed in 'lsusb' output to an actual disk device? Is there some way to map one to the other?
Any help appreciated. (3 Replies)
I've been searching your forum for an answer to the following question and whilst I've seen several which may help I'm afraid my inexperience with UNIX systems has got the better of me and I'm incapable of piecing your considerable expertise together.
I have a linux box which... (5 Replies)
Have connected a non-IBM storage device to AIX host via fibre channel. If the storage is rebooted or a raid controller fails over whilst connected to the host, the paths that drop do not come back online when the ports become active again.
I have tried enabling dynamic tracking and delayed_fail... (3 Replies)
I have a sun blade 100 with solaris 10 and am perplexed by the instances of devices that I see when I attach a usb flash stick to one of the ports in the back of the chassis.
Here is what I see for USB storage in /etc/path_to_inst:
"/pci@1f,0/usb@c,3/storage@3" 0 "scsa2usb"... (0 Replies)
I have a usb mess storage device.
My OS is rh as3 update2.
Each time I use the command
mount -t vfat /dev/sda1 /mnt/usb
I got the error "the device is not a valid block device".
I found from google that I should install the module sd_mod
I use the command
insmod sd_mod... (2 Replies)