-   Red Hat (
-   -   Finding the device that carry your root partition. (

howtechstuffworks 06-18-2012 04:45 PM

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.

kakaka 06-18-2012 04:57 PM

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 /

howtechstuffworks 06-18-2012 05:00 PM

^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....

michaelk 06-18-2012 05:38 PM

Have you tried searching for information on LVM? Here is a good link.

impert 06-18-2012 05:48 PM


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.

kakaka 06-19-2012 01:38 AM

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

All times are GMT -5. The time now is 08:39 PM.