Solved

Linux Question (Beginner)

Posted on 2011-02-16
5
425 Views
Last Modified: 2013-11-17
I need to find out what disks I have, actually I need to understand the disk environment better.

I perform the following:

[root@hx5 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       23G   13G  9.4G  57% /
/dev/sda1              99M   13M   81M  14% /boot
tmpfs                  32G     0   32G   0% /dev/shm
//10.14.10.10/CTTShare
                      3.6T  698G  2.7T  21% /mnt/archiver

Open in new window


Obviously I must have a sda and probably a sda2 in addtion to the sda1 listed.

How can I see a list of all drives in Linux

How can I see a list of all devices
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:DangerousJeff
ID: 34910614
fdisk -l

Open in new window

will show you all found drives/partitions (thats a lowercase L), might need to do as root.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34910815
The disk is /dev/sda (SCSI disk "a").

/dev/sda1 is the first partition on /dev/sda

To see details about LVM (Logical Volume Manager) try:

pvdisplay - display attributes of a physical volume
vgdisplay - display volume groups and their attributes
lvdisplay - display attributes of a logical volume

It's indeed similar to AIX' lspv, lsvg, lslv ...

wmp

0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34914539
>> How can I see a list of all devices  <<

Try "lspci", "lsusb", "lsscsi" and "lsdev":

lspci - list all PCI devices
lsusb - list USB devices
lsscsi - list SCSI devices (or hosts) and their attributes
lsdev - display information about installed hardware

As for the LVM stuff - it's really similar to LVM in e.g. AIX.

"fdisk" divides hard  disks into one or more logical disks called partitions. We don't have (need) this in AIX.
"fdisk -l" shows the partition tables for the specified devices or all devices in /etc/partition.

Disks are named following this scheme:
/dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks, /dev/ed[a-d] for ESDI disks, /dev/xd[ab] for XT disks
Partition names consist of device names followed by a number, where
IDE disks can have up to 63 partitions, SCSI disks up to 15

"pvcreate" initializes a disk or partition for use by LVM. Under AIX this happens automatically by adding a disk to a VG.
"pvdisplay" shows the attributes of the created physical volumes (AIX: "lspv").

"vgcreate" creates  a volume group using the PVs from "pvcreate". In AIX we have "mkvg" for this purpose.
"vgdisplay" lists the attributes of these volume groups, like "lsvg" in AIX.
There is also "vgextend" (like "extendvg" in AIX) and several more VG commands.

Finally "lvcreate" is used to define a logical volume in a volume group. As you might have guessed, this is like "mklv" in AIX.
"lvdisplay" shows LV attributes, like "lslv" in AIX does.

"man lvm" has a list of LVM commands at the bottom.

Use the LVs to build filesystems on them by means of e.g. "mkfs". Use the name of the special file corresponding to the particular LV as the device parameter.

"man mkfs" has more info, particularly it has a list of the commands for each available filesystem type, since mkfs is only a wrapper.
See "man fs" for a list of Linux filesystem types.

Have fun!

wmp
0
 
LVL 6

Expert Comment

by:mohansahu
ID: 34923625
Hi,

1.Under Linux, all data are stored as files. Most users are familiar with the two primary types of
files: text and binary. But the /proc/ directory contains another type of file called a virtual file. It
is for this reason that /proc/ is often referred to as a virtual file system.

2.Virtual files such as
/proc/interrupts,
 /proc/meminfo,
 /proc/mounts, and /proc/partitions

 provide an up-to-the-moment of the system's hardware. Others, like
the /proc/filesystems file and the /proc/sys/ directory provide system configuration
information and interfaces.
Cheers,
MS
0
 
LVL 6

Expert Comment

by:mohansahu
ID: 34923648
Hi,

Use dmidecode command also.

MS
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question