Results 1 to 21 of 21
  1. #1
    Join Date
    Jan 2011
    Posts
    69

    LVM setup PVCREATE says device not found...

    CentOS 5.6 x86_64. I setup the LVM "partition" during the OS install and here's the answers to a few commands I thought might help diagnose:

    [root@xvm1 ~]# pvcreate /dev/sdb5
    Device /dev/sdb5 not found (or ignored by filtering).
    [root@xvm1 ~]# pvcreate /dev/sda5
    Device /dev/sda5 not found (or ignored by filtering).
    [root@xvm1 ~]# cat /proc/mdstat
    Personalities :
    unused devices: <none>
    [root@xvm1 ~]# pvscan
    No matching physical volumes found
    [root@xvm1 ~]# lvscan
    No volume groups found
    [root@xvm1 ~]# fdisk -l /dev/sda

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 65 522081 83 Linux
    /dev/sda2 66 11538 92156872+ 83 Linux
    /dev/sda3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sda4 12583 121601 875695117+ 5 Extended
    /dev/sda5 12583 121601 875695086 8e Linux LVM

    Any help is greatly appreciated.

    Thank you!

  2. #2
    Join Date
    Sep 2011
    Location
    UK
    Posts
    166
    You are failing at the first step so print available partitions with 'fdisk -l yourdiskdevice' e.g. 'fdisk -l /dev/sda' and create a partition if necessary.
    /proc/mdstat is for software raid so if you want to create the LVM on raid you should first build the raid and get /dev/mdX device that you can create PV on.

  3. #3
    Join Date
    Jan 2011
    Posts
    69
    Thank you for the reply, almanox.

    I have created the partitions (I think) for the software raid:
    [root@xvm1 ~]# fdisk -l

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 65 522081 83 Linux
    /dev/sda2 66 11538 92156872+ 83 Linux
    /dev/sda3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sda4 12583 121601 875695117+ fd Linux raid autodetect

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 65 522081 83 Linux
    /dev/sdb2 66 11538 92156872+ 83 Linux
    /dev/sdb3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sdb4 12583 121601 875695117+ fd Linux raid autodetect

    Then I run the following command with shown output:
    [root@xvm1 ~]# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
    mdadm: Cannot open /dev/sda4: Device or resource busy
    mdadm: Cannot open /dev/sdb4: No such device or address
    mdadm: create aborted

    Any help is greatly appreciated.

    Thank you!

  4. #4
    Join Date
    Sep 2011
    Location
    UK
    Posts
    166
    Did you reboot between fdisk and mdadm?
    Does 'cat /proc/mdstat' shows partial array that is using /dev/sda4?

  5. #5
    Join Date
    Jan 2011
    Posts
    69
    Thanks again, almanox for the reply.

    I don't recall if I rebooted between them however, I am sure I have rebooted at some point before trying the mdadm again.

    output:
    [root@xvm1 ~]# cat /proc/mdstat
    Personalities :
    unused devices: <none>

    Thanks!

  6. #6
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,212
    Quote Originally Posted by upstart View Post
    Thanks again, almanox for the reply.

    I don't recall if I rebooted between them however, I am sure I have rebooted at some point before trying the mdadm again.

    output:
    [root@xvm1 ~]# cat /proc/mdstat
    Personalities :
    unused devices: <none>

    Thanks!
    after fdisk operations you might want to use partprobe to flush the kernel partition list, no reboot is needed in most cases.

  7. #7
    Join Date
    Jan 2011
    Posts
    69
    I think I'll just start with a new install, CentOS 5.6 x86_64.

    Any recommendations on partitioning during install?

    Thanks!

  8. #8
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    931
    After partitioning the drives, run

    Code:
    partprobe /dev/sda
    partprobe /dev/sdb
    Now try creating the raid

    But if you are just going to do a fresh install, do it via the graphical installer and create the raid and LVM with the partitioning tool. I can't recommend how to partition the drives as you know what you need to use it for.
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  9. #9
    Join Date
    Jan 2011
    Posts
    69
    Thanks, mitgib.

    My latest results (no new install done just yet):

    [root@xvm1 yum.repos.d]# partprobe /dev/sdb
    [root@xvm1 yum.repos.d]# partprobe /dev/sda
    [root@xvm1 yum.repos.d]# fdisk -l

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 65 522081 83 Linux
    /dev/sda2 66 11538 92156872+ 83 Linux
    /dev/sda3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sda4 12583 121601 875695117+ 8e Linux LVM

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 65 522081 83 Linux
    /dev/sdb2 66 11538 92156872+ 83 Linux
    /dev/sdb3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sdb4 12583 121601 875695117+ 8e Linux LVM

    [root@xvm1 yum.repos.d]# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
    mdadm: Cannot open /dev/sda4: Device or resource busy
    mdadm: Cannot open /dev/sdb4: Device or resource busy
    mdadm: create aborted

    Still no joy.

    Thanks again!
    Last edited by upstart; 09-29-2011 at 03:38 PM. Reason: text

  10. #10
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    931
    You are trying to use partitions tagged LVM for software raid, so change /dev/sd[a,b]4 to type fd, not 8e, rerun partprobe then give it s shot

    mdadm --create --verbose /dev/md0 --level=1 /dev/sda4 /dev/sdb4
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  11. #11
    Join Date
    Jan 2011
    Posts
    69
    Thanks again for the reply. At least I see a new message now...

    [root@xvm1 /]# fdisk -l

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 65 522081 83 Linux
    /dev/sda2 66 11538 92156872+ 83 Linux
    /dev/sda3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sda4 12583 121601 875695117+ fd Linux raid autodetect

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 65 522081 83 Linux
    /dev/sdb2 66 11538 92156872+ 83 Linux
    /dev/sdb3 11539 12582 8385930 82 Linux swap / Solaris
    /dev/sdb4 12583 121601 875695117+ fd Linux raid autodetect

    [root@xvm1 /]# mdadm --create --verbose /dev/md0 --level=1 /dev/sda4 /dev/sdb4
    mdadm: no raid-devices specified.

  12. #12
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    931
    Whoops, left off part of the command

    mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  13. #13
    Join Date
    Jan 2011
    Posts
    69
    Argh!

    [root@xvm1 ~]# mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
    mdadm: Cannot open /dev/sda4: Device or resource busy
    mdadm: Cannot open /dev/sdb4: Device or resource busy
    mdadm: create aborted

    The whole point of this is to run a slave Xen server in SolusVM. Wondering to self--if I could do a fresh install using the Xenserver-linux-cd and still run this server as a SolusVM slave???

  14. #14
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    931
    How can those partitions be busy? What is mounted?

    I don't think you can use the Xenserver distro with SolusVM, needs to be CentOS
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  15. #15
    Join Date
    Jan 2011
    Posts
    69
    What is mounted?
    Not by me. I did all those commands one after the other in about a minute. No idea how they got "busy". Only thing I can think of is that the guy that put the raid card in was wrong about it being a "fake raid" card??? It some cheap silicon image card.

    Thanks again for all the help.

  16. #16
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    931
    Did you run partprobe again after writing a change to the partition table when changing the partition type?
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  17. #17
    Join Date
    Jan 2011
    Posts
    69
    Yes, immediately after.

    I gotta check out this card:
    *-storage
    description: RAID bus controller
    product: SiI 3132 Serial ATA Raid II Controller
    vendor: Silicon Image, Inc.
    physical id: 0
    bus info: pci@0000:02:00.0
    logical name: scsi0
    logical name: scsi1
    version: 01
    width: 64 bits
    clock: 33MHz
    capabilities: storage pm msi pciexpress bus_master cap_list rom emulated
    configuration: driver=sata_sil24 latency=0

  18. #18
    Join Date
    Jan 2011
    Posts
    69
    Yep, does seem to be fake-raid so not sure why this isn't working.

  19. #19
    Join Date
    Sep 2011
    Location
    UK
    Posts
    166
    make sure there is no active array with the devices
    cat /proc/mdstat
    or see if partitions are active
    mdadm --examine /dev/sdb4

    Try to run and reboot
    mdadm --zero-superblock /dev/sdb4
    mdadm --zero-superblock /dev/sda4

    Maybe dmraid is interfering
    dmsetup ls; dmsetup info; ls /dev/mapper
    apt-get remove dmraid; yum remove dmraid
    and reboot

  20. #20
    Join Date
    Jan 2011
    Posts
    69
    Thanks again for the reply, almanox.

    I had done a yum remove dmraid earlier on in my efforts to find the problem but here's the output of everything else you listed (including remove dmraid for good measure). The two things I see of note with my novice eye are the dmsetup info command showing dmraid and mdadm couldn't open for write...

    [root@xvm1 ~]# cat /proc/mdstat
    Personalities :
    unused devices: <none>
    [root@xvm1 ~]# mdadm --examine /dev/sdb4
    mdadm: No md superblock detected on /dev/sdb4.
    [root@xvm1 ~]# mdadm --examine /dev/sda4
    mdadm: No md superblock detected on /dev/sda4.
    [root@xvm1 ~]# mdadm --zero-superblock /dev/sdb4
    mdadm: Couldn't open /dev/sdb4 for write - not zeroing
    [root@xvm1 ~]# mdadm --zero-superblock /dev/sda4
    mdadm: Couldn't open /dev/sda4 for write - not zeroing
    [root@xvm1 ~]# dmsetup ls
    sil_bhajdidfcdcf (253, 0)
    sil_bhajdidfcdcfp4 (253, 4)
    sil_bhajdidfcdcfp3 (253, 3)
    sil_bhajdidfcdcfp2 (253, 2)
    sil_bhajdidfcdcfp1 (253, 1)
    [root@xvm1 ~]# dmsetup info
    Name: sil_bhajdidfcdcf
    State: ACTIVE
    Read Ahead: 256
    Tables present: LIVE
    Open count: 4
    Event number: 0
    Major, minor: 253, 0
    Number of targets: 1
    UUID: DMRAID-sil_bhajdidfcdcf

    Name: sil_bhajdidfcdcfp4
    State: ACTIVE
    Read Ahead: 256
    Tables present: LIVE
    Open count: 0
    Event number: 0
    Major, minor: 253, 4
    Number of targets: 1
    UUID: part4-DMRAID-sil_bhajdidfcdcf

    Name: sil_bhajdidfcdcfp3
    State: ACTIVE
    Read Ahead: 256
    Tables present: LIVE
    Open count: 1
    Event number: 0
    Major, minor: 253, 3
    Number of targets: 1
    UUID: part3-DMRAID-sil_bhajdidfcdcf

    Name: sil_bhajdidfcdcfp2
    State: ACTIVE
    Read Ahead: 256
    Tables present: LIVE
    Open count: 1
    Event number: 0
    Major, minor: 253, 2
    Number of targets: 1
    UUID: part2-DMRAID-sil_bhajdidfcdcf

    Name: sil_bhajdidfcdcfp1
    State: ACTIVE
    Read Ahead: 256
    Tables present: LIVE
    Open count: 1
    Event number: 0
    Major, minor: 253, 1
    Number of targets: 1
    UUID: part1-DMRAID-sil_bhajdidfcdcf

    [root@xvm1 ~]# ls /dev/mapper
    control sil_bhajdidfcdcf sil_bhajdidfcdcfp1 sil_bhajdidfcdcfp2 sil_bhajdidfcdcfp3 sil_bhajdidfcdcfp4
    [root@xvm1 ~]# yum remove dmraid
    Loaded plugins: fastestmirror
    Setting up Remove Process
    No Match for argument: dmraid
    Loading mirror speeds from cached hostfile
    * base: mirror.us.leaseweb.net
    * extras: mirror.cogentco.com
    * updates: mirror.ash.fastserv.com
    base | 1.1 kB 00:00
    extras | 2.1 kB 00:00
    soluslabs | 951 B 00:00
    updates | 1.9 kB 00:00
    Package(s) dmraid available, but not installed.
    No Packages marked for removal

  21. #21
    Join Date
    Sep 2011
    Location
    UK
    Posts
    166
    Do you have RAID disabled in BIOS? This article may help
    http://www.brandonchecketts.com/arch...id-on-centos-5

Similar Threads

  1. One time RAID and LVM setup
    By xDesign365 in forum Employment / Job Offers
    Replies: 6
    Last Post: 05-02-2010, 01:05 AM
  2. One time RAID and LVM setup
    By xDesign365 in forum Employment / Job Requests
    Replies: 0
    Last Post: 04-29-2010, 11:20 AM
  3. PCI Device not found
    By Snitz in forum Computers and Peripherals
    Replies: 11
    Last Post: 12-20-2008, 07:16 PM
  4. Found a cheap KVM over IP device
    By argintxe in forum Colocation, Data Centers, IP Space and Networks
    Replies: 7
    Last Post: 04-12-2007, 11:12 PM
  5. Modifying LVM parition setup?
    By ralexander in forum Hosting Security and Technology
    Replies: 11
    Last Post: 02-02-2006, 09:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •