[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Linux Question (Beginner)

Posted on 2011-02-16
5
Medium Priority
?
435 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

656 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