- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Disk space questions
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
10-02-2003 08:32 PM
10-02-2003 08:32 PM
Disk space questions
In a linux system, how can i know the free space in a disk? (not with df, wich tells me the free space in the mounted FS).
I need to add some swap space but i don´t know what amount of free space i have. I have RH 7.2.
Th
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 08:45 PM
10-02-2003 08:45 PM
Re: Disk space questions
You can use fdisk command to find out this.
and if you are using LVM you can use vgdisplay -v command.
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 09:00 PM
10-02-2003 09:00 PM
Re: Disk space questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 11:02 PM
10-02-2003 11:02 PM
Re: Disk space questions
issue:
hdparm -g /dev/hda
to see the geometry of your IDE primary master hard drive.
each sector is 512 bytes
so so multiply the amount of sectors with 512, ans then divide it by 1000000 to see the approximate amount of MB.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 12:31 AM
10-03-2003 12:31 AM
Re: Disk space questions
so I checked on my laptop
# fdisk -s /dev/hda
17716608
#fdisk -lu /dev/hda
Disk /dev/hda: 18.1 GB, 18141806592 bytes
255 heads, 63 sectors/track, 2205 cylinders, total 35433216 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 63 208844 104391 83 Linux
/dev/hda2 208845 34507619 17149387+ 83 Linux
/dev/hda3 34507620 35423324 457852+ 82 Linux swap
# let a=17716608
# let b=104391+17149387+457852
# let c=$a-$b
# echo $c
4978
Problem is 4978 blocks of 512 bytes is 2489 Kbytes
There are 62 unallocated sectors as /dev/hda1 start at 63
what are those 62 sectors ? ... to mark physical errors on disk ?
2489 Kbytes is not much so nothing to worry about and "all" my laptop is used.
I am missing something ?
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 03:01 AM
10-03-2003 03:01 AM
Re: Disk space questions
I have noticed the same thing but you didn't have to go through all that work to find it, you could have run fdisk on your disk and once inside verify the partition table with 'v' and it will tell you the unallocated sectors. Everytime I have done this on a machine with a fully partitioned disk I end up with the same thing 62 extra sectors left over. So I googled around, and came up with this pdf:
http://www.terabyteunlimited.com/specs/embr2.pdf
I think maybe the left overs are sectors the bios allocated to the MBR on the disk. The pdf says the minimum that the MBR can have is from sector 3-17, so I am thinking that the bios would give up more than that. I am just guessing though, and I am curious to find out the real reason for the left over sectors.
Dave