- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: pvcreate error: can't open /dev/sdb1 exclusive...
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
Forums
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
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
тАО02-27-2007 12:38 PM
тАО02-27-2007 12:38 PM
1. fdisk /dev/sdb
2. created primary partition /dev/sdb1
3. change type to 8e
4. pvcreate /dev/sdb1
then i get this error "can't open /dev/sdb1 exclusively. mounted filesystem?"
/dev/sdb1 /dev/sdb is not mounted as this is a new disk.
has anybody experienced this before? any additional config that i need to do?
also, we are using multipath.. so from system-config-lvm i can /dev/sdb and /dev/sdi belong to /dev/dm-0..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2007 07:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2007 10:53 PM
тАО03-01-2007 10:53 PM
Re: pvcreate error: can't open /dev/sdb1 exclusively. mounted filesystem?
I agree with Andrew,please click this link.
http://www.linuxquestions.org/questions/showthread.php?t=527940
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2015 02:05 AM
тАО11-13-2015 02:05 AM
Re: pvcreate error: can't open /dev/sdb1 exclusively. mounted filesystem?
Look like the disk /dev/sdb1 was earlier mounted. And the file does exists in /proc.
Try the restarting the host, that could be one of the easy solution.
This genrally happens if you dont export your volumn group(s) before recreating the drive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2017 01:42 AM - edited тАО10-04-2017 01:50 AM
тАО10-04-2017 01:42 AM - edited тАО10-04-2017 01:50 AM
Re: pvcreate error: can't open /dev/sdb1 exclusively. mounted filesystem?
You can surely solve this error by a reboot however the below commands can be used to resolve this online.
I havent faced any Issues so far with these commands hence I believe they are safe to run in a production enviornment.
------------------------------------------------------------------------------------------------------------------------------------------
ERROR:
The error that I get on a new disk while creating physical volume:
[root@isaacvm01 ~]# pvcreate /dev/sdd1
Can't open /dev/sdd1 exclusively. Mounted filesystem?
Solution:
List device names first to see if the disk is present:
[root@isaacvm01 ~]# dmsetup ls | grep sdd
sdd1 (253:14) --> yes it is present.
Next remove the disk:
[root@isaacvm01 ~]# dmsetup remove sdd1
Check it again:
[root@isaacvm01 ~]# dmsetup ls | grep sdd
[root@isaacvm01 ~]# -> yes its gone.
Now try the pvcreate command again:
[root@isaacvm01 ~]# pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created
[root@isaacvm01 ~]#
I hope this helps. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2017 07:57 AM
тАО10-04-2017 07:57 AM
Re: pvcreate error: can't open /dev/sdb1 exclusively. mounted filesystem?
When you are using multipathing, it means a single physical disk/LUN can show up as multiple devices: one /dev/sd* device per available path. Using these /dev/sd* devices means you're using that LUN using that one specific path only. This is not what you normally want, so you'll want to use a multipathing solution in this case.
Device-mapper-multipathing won't hide the individual /dev/sd* paths for multipathed devices: you might sometimes need them for e.g. diagnosing failures on a specific path. Instead, it creates a multipathed mapping device /dev/dm-* and a link to it with a persistent name: /dev/mapper/mpath* if you have the multipath.conf "friendly names" option enabled (RedHat default), or /dev/mapper/<WWID of the LUN> if the "friendly names" option is disabled (SuSE default).
Dm-multipath attempts to prevent you from accessing the multipathed LUN using both the multipathed device (/dev/dm-* or /dev/mapper/*) and the individual path device(s) /dev/sd* simultaneously: as soon as something is accessing the multipathed device, dm-multipath sets up an exclusive lock to the corresponding /dev/sd* devices.
Note that the /dev/dm-* device names are created from scratch each time the system starts up, so their numbering may vary between one bootup and the next. So you should always use the /dev/mapper/* names instead: those names are guaranteed to be persistent.
Also note that the /dev/dm-* names are not used only for dm-multipath, but also all the other purposes the device-mapper kernel subsystem is used: LVM, cryptsetup and dmraid all use the /dev/dm-* device names. If you're curious, you can use "dmsetup ls --tree" to see a single list of all the things device-mapper subsystem is currently handling on your system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2019 06:29 AM
тАО06-18-2019 06:29 AM
Re: pvcreate error: can't open /dev/sdb1 exclusively. mounted filesystem?
Thanks, it worked for me. Thanks a lot.