Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 06-18-2012, 03:45 PM   #1
LQ Newbie
Registered: Jan 2011
Posts: 8

Rep: Reputation: 0
Finding the device that carry your root partition.

Hi all,
Is there a command that will give me the (root) device that is mapped against the root partition. I was able to find out base Volume Group with commands like "ls -ltr" && "dmsetup info -m <x> -j <y>"... Not sure how to proceed on this.. Are there some good article, that will help me to understand linux devices.
Old 06-18-2012, 03:57 PM   #2
Registered: Sep 2003
Posts: 382

Rep: Reputation: 87
I'm using volume groups, and for me, either of this work to display the volume mounted on slash ( root ):

mount -v | fgrep 'on / '
df -k /
Old 06-18-2012, 04:00 PM   #3
LQ Newbie
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
^Well, that gives me

/dev/mapper/VolGroup-LogVol00, but what I need is /dev/sda2(in my case)..... the actual device I could use for pvcreate command....
Old 06-18-2012, 04:38 PM   #4
Registered: Aug 2002
Posts: 14,735

Rep: Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476
Have you tried searching for information on LVM? Here is a good link.
Old 06-18-2012, 04:48 PM   #5
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
grep '/ ' /etc/fstab |sed 's/\ .*//'
Works for me.
I forgot: It works for me because I don't use UUIDs. If you do, this will give you the UUID, but you can convert with blkid. A good little exercise.

Last edited by impert; 06-18-2012 at 04:53 PM. Reason: duh, forgot about uuids, duh
Old 06-19-2012, 12:38 AM   #6
Registered: Sep 2003
Posts: 382

Rep: Reputation: 87
hi howtechstuffworks!

It would appear that you asked the wrong question.

The question you actually seem to have wanted answered was:

How do I find the physical device, which contains the logical volume that is mounted on /
Take logical volume group name from the logical device name, then use it in place of volume_group_name in this command:

vgdisplay  -v  volume_group_name
For me that displays information on the volume group as a whole, the individual logical volumes within the group, and lists the physical volumes that contain the logical volume group.

I simply use the manual pages for information.

apropos keyword | less
is nice for finding things. If you don't have the apropos command, you should be able to substitute man -k


devices, lvm2

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
GRUB error finding root filesystem partition smanandhar Linux - Newbie 3 02-16-2009 10:47 AM
shrinking root partition and using free space to create a block device kickdgrass Linux - General 1 02-04-2009 05:04 AM
Kernel VFS cannot open root device, can't find root device dimm0k Linux - Kernel 1 09-21-2008 03:19 PM
ram image not finding root block (3,1) partition fourcs Linux - General 4 05-26-2007 05:58 AM
How to disable DMA in Partition check and Creating root device ComputeWorldwide Linux - Newbie 0 05-09-2006 07:58 PM

All times are GMT -5. The time now is 03:31 PM.

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