January 22, 2013

Redhat 6: how to know if a logical volume is striped, linear or mirrored

Posted in Linux at 3:50 pm by alessiodini

My company said me that I will work soon with Linux systems , so i will do tasks on Solari/Linux πŸ™‚
I left HP-UX studying for Linux Redhat 6.

For this purpose i’m studying a lot of LVM. Today i played with linear and striped logical volumes. After I had a question: “How i can understand if a volume is linear , striped or mirrored?”

I initially looked for lvdisplay man page , without success. Discussing this with my friend Maurizio Pagani he said me the best command:

[root@centos ~]# lvs -a -o segtype,devices,lv_name,vg_name
Type Devices LV VG
linear /dev/sda2(0) rootvol rootvg
linear /dev/sda2(5825) swapvol rootvg
linear /dev/sdc1(128) alevol testvg
striped /dev/sdc1(0),/dev/sdb2(0) testvol testvg

Cool!

Advertisements

5 Comments »

  1. Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed surfing around your blog posts. After all I will be subscribing to your feed and I hope you write again very soon!

    • alessiodini said,

      thank you !!! πŸ™‚

  2. Vikrant said,

    I know its old post. Just adding here one more command “dmsetup status” to check the segtype of LV.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: