Solved

Linux Question (Beginner)

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now