Solved

Linux Question (Beginner)

Posted on 2011-02-16
5
419 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 62
Linux : taking backup different mount points under the same directory 8 70
ignore other .htaccess 2 45
bash file 10 37
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

832 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