[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lokking for portable way to determine the size of harddisks



On Wed, Mar 07, 2001 at 08:38:54PM +0100, Thomas Lange wrote:

> I can grep for hd? orf sd? device if I only need the whole disk. Looks
> very nice, but is the blocksize constant on all platforms ? And with
> kernel 2.4 and devfsd this looks like
> 
> major minor  #blocks  name
> 
>    8     0    8844633 scsi/host0/bus0/target0/lun0/disc
>    8     1    8302392 scsi/host0/bus0/target0/lun0/part1
>    8     2     538650 scsi/host0/bus0/target0/lun0/part2
>    8     3    8841042 scsi/host0/bus0/target0/lun0/part3
> 
> There, it's difficult to get the short device name of the disk
> Is there any other way ? May fdisk be the right choise ?

When using devfs, the name as listed above is the correct, canonical name for
the device and is what should be used to access it.  Why would you want to use
the old-style short device name on a devfs system if you know the correct long
device name?

-- 
 - mdz



Reply to: