- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Disk' size
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2004 11:29 PM
05-03-2004 11:29 PM
How could I know the size of one disk.
With a fdisk I have:
Command (m for help): p
Disk /dev/cciss/c0d0: 255 heads, 32 sectors, 8716 cylinders
Units = cylinders of 8160 * 512 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 25 101984 83 Linux
/dev/cciss/c0d0p2 26 539 2097120 83 Linux
/dev/cciss/c0d0p3 540 1053 2097120 82 Linux swap
/dev/cciss/c0d0p4 1054 8716 31265040 f Win95 Ext'd (LBA)
/dev/cciss/c0d0p5 1054 2308 5120384 83 Linux
/dev/cciss/c0d0p6 2309 2822 2097104 83 Linux
/dev/cciss/c0d0p7 2823 8716 24047504 83 Linux
But I don't know the size of one block!,
Thanks!,
Carmen.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2004 11:51 PM
05-03-2004 11:51 PM
Re: Disk' size
root@cloud233:/home/sauer > dumpe2fs /dev/sda1 | grep "Block size"
dumpe2fs 1.17, 26-Oct-1999 for EXT2 FS 0.5b, 95/08/09
Block size: 1024
----
This is the way one person did it :o)
Block sizes will depend upon your disk setup in BIOS.
Vern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 12:36 AM
05-04-2004 12:36 AM
Re: Disk' size
If I have this disk: /dev/cciss/c0d0, what I have to put in the instruccion???
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 12:40 AM
05-04-2004 12:40 AM
Re: Disk' size
My fdisk command (RedHat AS 2.1) shows as first line:
Disk /dev/hda: 40.0 GB, 40007761920 bytes
That's nice.
But your Linux doesn't show that.
Your c0d0p1 has 25 cylinders of 8160*512 bytes = 10444800 bytes.
It equals 101984 blocks ->
1 block = 10444800 / 101984 = 1024 bytes.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 12:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 12:45 AM
05-04-2004 12:45 AM
Re: Disk' size
I don't actually have any scsi attached disks on a linux box right so I can't be sure BUT I would imagine you get something similar if you follow the "/proc/scsi" tree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 12:51 AM
05-04-2004 12:51 AM
Re: Disk' size
I tried that too. But it shows 78140160 for my 40 GB ide disk.
And I have two such files...
???
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 01:01 AM
05-04-2004 01:01 AM
Re: Disk' size
Those are kernel interfaces. If the kernel thinks thats how big your disk is, it doesn't really matter how big it really is, the kernel knows better :)
Which files do you have two of?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 01:23 AM
05-04-2004 01:23 AM
Re: Disk' size
(Red Hat Linux 9)
2 /proc/ide/hda/capacity.
Both give the same size.
For the moment I don't care...
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 02:00 AM
05-04-2004 02:00 AM
Re: Disk' size
try
# cat /proc/driver/cciss/cciss0 cciss0: HP
Smart Array 5312 Controller
Board ID: 0x40830e11
Firmware Version: 2.36
IRQ: 18
Logical drives: 2
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 128
Max # commands on controller since init: 130
Max SG entries since init: 31
Monitor thread period: 0
Monitor thread deadline: 0
Status: operational
Sequential access devices: 0
cciss/c0d0: 17.35GB RAID 1(0+1)
cciss/c0d1: 173.61GB RAID 0
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 07:10 AM
05-04-2004 07:10 AM
Re: Disk' size
/proc/ide/hda/capacity reports the size in 512 byte blocks.
Divide the number you get from fdisk -l by 512 and you arrive at the number from the capacity file.
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 09:18 PM
05-04-2004 09:18 PM
Re: Disk' size
I see you've had a lot of responses, but I notice you have some 8 partitions, so do you mean the size of the disk (which is what everyone's given good responses for) or the partitions? If you're lazy like me and just want a rough total, you can use df -h (human readable) that tells you sizes in G, M or K...
michaelw@abacus4: df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ida/c0d0p4 5.5G 5.0G 530M 91% /
/dev/ida/c0d0p2 1.6G 55M 1.5G 4% /tmp
/dev/ida/c0d1p1 68G 21G 48G 30% /a4/d1
/dev/ida/c0d2p1 68G 25G 44G 37% /a4/d2
/dev/ida/c0d3p1 68G 22G 47G 33% /a4/d3
/dev/ida/c0d4p1 34G 63M 34G 1% /a4/d4
/dev/ida/c0d5p1 68G 20G 49G 30% /a4/d5
/dev/ida/c0d6p1 68G 21G 47G 31% /a4/d6
/dev/ida/c0d7p1 68G 19G 49G 28% /a4/d7
/dev/ida/c0d8p1 34G 83M 34G 1% /a4/d8
shmfs 505M 0 505M 0% /dev/shm
abnis1:/homes 68G 11G 57G 17% /homes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2004 09:55 PM
05-04-2004 09:55 PM
Re: Disk' size
# fdisk -l /dev/cciss/c0d0
would do the trick ?
J-P