LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 01-27-2016, 08:11 AM   #1
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Performing LVM on an Oracle Partition and getting Can't Open Partition Mounted Filesystem?


I'm trying to grow the disk space on a RHEL VM for a partition where Oracle lives via LVM.

After extending the disk in VMWare, I noticed there wasn't a partition on the disk, however I went ahead and created it.

Code:
 

[root@server ora]# fdisk -l /dev/sdd Disk /dev/sdd: 37.5 GB, 37580963840 bytes 255 heads, 63 sectors/track, 4568 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 4568 36692428+ 8e Linux LVM 
[root@server ora]#
I ran the following:

Code:
echo 1 > /sys/block/sdd/device/rescan

Space now shows up via fdisk.

When I run pvcreate, I now get an error:

Code:
[root@server ora]# pvcreate /dev/sdd1 Can't open /dev/sdd1 exclusively. 
Mounted filesystem? 
[root@server ora]#
Is this because of Oracle running from this partition? If I look for /dev/sdd under pvs or pvdisplay, I don't see anything showing for it:

Code:
[root@server ora]# 
[root@server ~]# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sda2  VolGroup00 lvm2 a--   49.88G    0
  /dev/sdb   VolGroup01 lvm2 a--   14.00G    0
  /dev/sdc   VolGroup02 lvm2 a--  160.00G    0
  /dev/sde   VolGroup04 lvm2 a--  100.00G    0
  /dev/sdf   VolGroup05 lvm2 a--  100.00G    0
  /dev/sdg   VolGroup06 lvm2 a--    5.00G    0


[root@server ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdg
  VG Name               VolGroup06
  PV Size               5.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              1279
  Free PE               0
  Allocated PE          1279
  PV UUID               Z7Bgdj-x08L-2YYD-fPJd-m9i1-N21i-UnGvYQ

  --- Physical volume ---
  PV Name               /dev/sdf
  VG Name               VolGroup05
  PV Size               100.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              25599
  Free PE               0
  Allocated PE          25599
  PV UUID               gIgNqa-iiEQ-329I-sSdx-DfSD-pAyF-jZjm2P

  --- Physical volume ---
  PV Name               /dev/sde
  VG Name               VolGroup04
  PV Size               100.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              25599
  Free PE               0
  Allocated PE          25599
  PV UUID               elJIMF-WW3D-7TGu-yZ1I-VXdb-kAbC-SJzp6e

  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               VolGroup02
  PV Size               160.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              40959
  Free PE               0
  Allocated PE          40959
  PV UUID               Eeobz0-06zA-cF4S-sbdA-HCUn-e0NM-wmwoDe

  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               VolGroup01
  PV Size               14.00 GB / not usable 4.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              3583
  Free PE               0
  Allocated PE          3583
  PV UUID               3ysHky-IVRZ-ysIj-y7Bh-KCy2-idCY-W2vHe7

  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               49.90 GB / not usable 25.37 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              1596
  Free PE               0
  Allocated PE          1596
  PV UUID               UL00FM-WkrW-a9Ll-1zeS-Aget-f39e-jr2Uxe

[root@server ~]#

[root@server ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
/dev/VolGroup00/LogVol02 /tmp                    ext3    defaults,nosuid        1 2
/dev/VolGroup00/LogVol05 /opt                    ext3    defaults        1 2
/dev/VolGroup00/LogVol04 /usr                    ext3    defaults        1 2
/dev/VolGroup00/LogVol06 /home                   ext3    defaults,nosuid        1 2
/dev/VolGroup00/LogVol03 /var                    ext3    defaults,nosuid        1 2
LABEL=/boot             /boot                   ext3    defaults,nosuid        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/VolGroup01/LogVol00 swap                    swap    defaults        0 0
/dev/VolGroup02/LogVol00 /data                ext3    defaults,nosuid        1 2
/dev/VolGroup03/LogVol00 /ora                ext3    defaults                1 2
/dev/VolGroup04/LogVol00 /oradata                ext3    defaults,nosuid        1 2
/dev/VolGroup05/LogVol00 /oradata2                ext3    defaults,nosuid        1 2
/dev/VolGroup06/LogVol00 /var/log/audit           ext3    defaults,nosuid        1 2
So my guess is that Oracle is running, needs to be shut down. The partition needs to be unmounted and then pvcreate will work?

I've looked online for a solution and didn't find anything that matches what I'm facing.

thanks

Last edited by JockVSJock; 01-27-2016 at 08:13 AM.
 
Old 01-28-2016, 05:37 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
If you have (or can download) a live Linux that could work?
 
Old 01-28-2016, 06:04 PM   #3
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420

Original Poster
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
I think I got it...

https://www.linuxquestions.org/quest...31#post5488931
 
1 members found this post helpful.
  


Reply

Tags
lvm, oracle, pvcreate, rhel 5



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I add a logical partition to a filesystem with an LVM? uschxc Linux - General 2 08-15-2012 01:40 AM
One of LVM-based partition can not be mounted saia Linux - Newbie 1 07-07-2010 04:25 AM
Wanted safe way to fsck (mounted) LVM partition minrich Linux - General 5 01-10-2010 06:06 PM
Can't access files in lvm partition: unknown filesystem type 'lvm2pv' First Onlooker Linux - Newbie 2 11-26-2009 05:24 AM
Creating an LVM Volume Group with a mounted ext3 partition alexpacio Linux - Software 1 11-09-2008 02:44 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration