LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-24-2003, 05:56 PM   #1
mbhenry
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0
how many disks does my system have and how mcuh space does each have?


What are the commands to find out how many disks my system has and then what command can I use to determine how much space is on each disk?
 
Old 10-24-2003, 05:58 PM   #2
atko
Member
 
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136

Rep: Reputation: 15
Which linux are you running? Red Hat, Mandrake......?
 
Old 10-24-2003, 06:09 PM   #3
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
Type "df" at the shell. It shows all of your disks and how much space they have. If this does not work try "free".
 
Old 10-24-2003, 06:15 PM   #4
mbhenry
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
I am running redhat 8.0

df makes it look as though there are two disks ( /dev/hda and /dev/sda) but I know in AIX the lspv command clearly lists how many disks there are.

free didn't seem to help - it just gave me the amount of free memory
 
Old 10-24-2003, 06:23 PM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
Try kdf from the command line.

-or-

$ su -
(password)
# fdisk -l

These aren't really gonna show the physical disks, just the partitions, I think.

Do you have a screw driver?
 
Old 10-24-2003, 06:30 PM   #6
mbhenry
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
kdf is a nice command. It does actually show that there are two disks if I look at the /dev/hda and /dev/sda. I am wondering how to tell if there is a disk that is available but not being used.

fdisk -l does work. It shows the partitions but it also lists the disks. Thanks
 
Old 10-24-2003, 06:36 PM   #7
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
All the disks you got will be listed under /etc/fstab Anything that isn't in there won't be listed because the kernel can't see it regardless of if it is physically there or not.
To find out what you got in your box look at your BIOS.
 
Old 10-24-2003, 06:42 PM   #8
mbhenry
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Actually looking in /etc/fstab does not show that there are actually two disks. I am remotely logged into the machine and so I don't think I can look at the BIOS.
 
Old 10-24-2003, 06:51 PM   #9
Onemessedupjedi
Member
 
Registered: Sep 2003
Location: Oregon
Distribution: Slackware 9.1
Posts: 194

Rep: Reputation: 30
fstab only shows the partitions you set up to run linux or run under linux...
EDIT: and here I go trying to contradict a guru, well, I guess I might be wrong but my fstab only shows the drives I chose to be in there(it didn't show my ntfs ones till I added them)
use cfdisk...it shows it very cleanly, but only one drive. You can probably use an argument to get it to display other drives though(don't know)
guess and check with hda, hdb, hdc, sda, sdb, sdc if you can choose the drive to view.
If your distro doesn't have cfdisk you need to shank them

Last edited by Onemessedupjedi; 10-24-2003 at 06:53 PM.
 
Old 10-24-2003, 07:15 PM   #10
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yeah -
fdisk -l shows all partitions, usually mountable by a complex 'mount' command
fstab shows all partitions mountable by a simple 'mount' command - it supplies the arguments (and more) that you'd have to supply to the command line if the partition *wasn't* in fstab
mtab shows all partitions currently mounted.

fdisk is an app giving a direct report, fstab is a file that you create (or your install tries to do for you), and mtab is an automatically generated file. 'mount' with no arguments displays mtab.

cfdisk's nice enough but fdisk is not so bad - and for a simple report, fdisk -l is better than monkeying with menus.

That being said, I have no idea how networking works - I run standalone, so I don't know if there are other issues with remote filesystems.
 
Old 10-24-2003, 07:40 PM   #11
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Remotely - nice!
Have a look at the kernel messages in /var/log and see what that says at the last boot.
Look for something like this:
Oct 24 20:08:23 localhost kernel: hda: SAMSUNG SV4002H, ATA DISK drive
Oct 24 20:08:23 localhost kernel: hdb: Maxtor 2F040L0, ATA DISK drive
Oct 24 20:08:23 localhost kernel: hdc: HL-DT-ST GCE-8320B, ATAPI CD/DVD-ROM drive

About the fstab sure - thats what I was blabbering about - anything that isn't in there won't be seen by the kernel and because of that any commands will not tell you anything about it besides something like 'unable to open device'.
You could try cd /dev and ls but I got :
a) no idea if that shows devices that are detected by the kernel or according to fstab in that respect and
b) it will only help you anything if you use devfs on that machine
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Manage disks on an existing system with LVM doris Linux - Hardware 1 03-02-2005 03:37 PM
Installation Disks not recognized as official disks when booting with floppy coal-fire-ice Mandriva 13 12-09-2004 05:29 PM
How do Install to system with 3 disks, 2 of which are RAID array ? Raptor Ramjet Slackware 1 09-28-2003 10:07 AM
linux boot disks on win2000 system?? headturner Linux - General 10 01-14-2003 11:40 PM
Need to query how many disks the system recognizes rdaves@earthlink.net Linux - General 1 06-26-2001 05:55 PM


All times are GMT -5. The time now is 05:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration