Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Improved wizard by adding ability to select disks from list. #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

szaydel
Copy link

@szaydel szaydel commented May 18, 2013

Because it is at times difficult to tell which disks are which, as well as error prone to type in potentially really long disk IDs for devices on a SAS controller that presents a long c#t#d# I wanted to add a menu-like selection similar to what is already done for NICs. I found this to be easier, especially when I have several disks that I need to pick from.

A rudimentary menu gives some information about disks and selection is indexed. Top 10 disks are displayed, which could possibly be a problem with some systems.

Number            Device Vendor   Product          Size     Serial
0                 c1t0d0 VMware   Virtual          17.18GB  6000c298246baa3
1                 c1t1d0 VMware   Virtual          8.59GB   6000c2958fba0d0
2                 c1t2d0 VMware   Virtual          8.59GB   6000c29c3fb9c91
3                 c1t3d0 VMware   Virtual          8.59GB   6000c291457915d
4                 c1t4d0 VMware   Virtual          8.59GB   6000c295d0e6b01
5                 c1t5d0 VMware   Virtual          8.59GB   6000c294447015c

@konobi
Copy link

konobi commented May 18, 2013

Seems like you'd be better off using the diskinfo tool rather than attempting to parse yourself. This will also indicate if a drive is removable or an SSD.

@szaydel
Copy link
Author

szaydel commented May 18, 2013

@konobi - Yeah, can do. Though I did not think this was much of an issue. SSD is a good point though.

@konobi
Copy link

konobi commented May 18, 2013

diskinfo also takes -Hp as options to remove the header and to make each field tab separated for parsing.

@szaydel
Copy link
Author

szaydel commented May 19, 2013

Maybe something like this will do, though for my own purposes I like the output that I am producing better because I get a serial number, which again for me is of value, as it may be for others.

diskinfo -Hp | awk '{OFS="\t"; print $2,$3,$4,$5,$6,$7}'

Maybe next step is to enhance diskinfo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants