- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How to LVM PVCREATE in RHEL5 ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 04:47 AM
тАО01-11-2010 04:47 AM
I successfully presented my EVA LUN through SAN to my RHEL5 system. Now I am struggling to configure it for data usage:
[root@localhost ~]#
[root@localhost ~]# pvcreate /dev/sda
Can't open /dev/sda exclusively. Mounted filesystem?
[root@localhost ~]# pvcreate /dev/sda1
Can't open /dev/sda1 exclusively. Mounted filesystem?
[root@localhost ~]# pvcreate -f /dev/sda
Can't open /dev/sda exclusively. Mounted filesystem?
[root@localhost ~]# pvcreate -f /dev/sda1
Can't open /dev/sda1 exclusively. Mounted filesystem?
[root@localhost ~]#
Please Advice.
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 06:16 AM
тАО01-11-2010 06:16 AM
Re: How to LVM PVCREATE in RHEL5 ?
Perhaps you've already installed and activated RedHat's device-mapper-multipath?
In that case, please see:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/DM_Multipath/index.html
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 06:32 AM
тАО01-11-2010 06:32 AM
Re: How to LVM PVCREATE in RHEL5 ?
Yes I have already installed and activated DM-Multipath. Do I have to deactivate it before using LVM ?
I want to use LVM file systems.
Please Advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 02:32 PM
тАО01-11-2010 02:32 PM
SolutionPlease run "multipath -l". The output will allow you to identify which multipath device corresponds to /dev/sda.
If you're using RedHat default settings, the multipath devices will be named like /dev/mapper/mpathN, where N is a number, beginning from 0.
So: "pvcreate /dev/mapper/mpath0", or whatever is the correct device.
If you have disabled the user_friendly_names option, the device name will be /dev/mapper/
You can also define your own custom alias names in /etc/multipath.conf, if you don't like the default names.
You should also edit your /etc/lvm/lvm.conf a little.
There is a "filter" line in the "devices" section which determines which devices LVM looks at when finding LVM PVs. You should replace the default filter with one that includes /dev/mapper/mpath* (or whatever) devices and excludes /dev/sd* devices.
With HP Proliant servers, a common configuration is that the system disk on a SmartArray controller (/dev/cciss/*) and all /dev/sd* devices are SAN LUN paths.
For this situation, a suitable filter might be:
filter = [ "a|^/dev/cciss/.*|", "a|^/dev/mapper/mpath.*|", "r|^/dev/sd.*|" ]
(= Accept for probing all /dev/cciss devices and /dev/mapper/mpath* devices, reject all /dev/sd* devices.)
There is also the preferred_names line. Comment out the default line that says:
preferred_names = [ ]
and uncomment the commented-by-default example, so it looks like this:
# Try to avoid using undescriptive /dev/dm-N names, if present.
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
After editing /etc/lvm/lvm.conf, run vgscan with -vv or even -vvv, and check that it really does what you want (i.e. checks all multipath devices, ignores all SAN single-path /dev/sd* devices and does not forget the system disk).
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 04:35 AM
тАО01-14-2010 04:35 AM
Re: How to LVM PVCREATE in RHEL5 ?
Thank you !