LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-09-2015, 05:55 AM   #1
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Rep: Reputation: 0
fdisk do not recognize the partition table


Hi all

i have a server with Hw-raid5(DELL PERC H710P (scsi))

with 4 disks. i suppouse that when i do the install i create a single partition type LVM2.
in fact all my 7 LV's are fine and i can access the data on it.

But i want to recover some space from the VG and i reduce the size.

But when i open fdisk to see my unpartioned space i see this:

[root@ina01 ES ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


i do a fail, because i press 'w' to see if it fixed, but i think before doing that i have to check the partition table with parted.


Now parted shows me the same info as fdisk --> no partitions:
(parted) select /dev/sdb
Using /dev/sdb
(parted) print

Model: DELL PERC H710P (scsi)
Disk /dev/sdb: 898GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags



what can i do?

regards
 
Old 07-09-2015, 06:03 AM   #2
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
useless info :-)

[root@ina01 ES /etc/yum.repos.d]# lvs
LV VG Attr LSize Origin Snap Move Log Copy Convert
data_ebsmasna VolGroup01 owi-ao 100.00G
data_ebsprona VolGroup01 -wi-ao 100.00G
data_ebstesna VolGroup01 -wi-ao 100.00G
extra VolGroup01 -wi-ao 330.00G
oh_ebsmasna VolGroup01 -wi-ao 50.00G
oh_ebstesna VolGroup01 -wi-ao 50.00G
snap_data_ebsmasna VolGroup01 swi-a- 2.00G data_ebsmasna 0.28

[root@ina01 ES /etc/yum.repos.d]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb VolGroup01 lvm2 a-- 751.00G 19.00G

[root@ina01 ES /etc/yum.repos.d]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup01 1 7 1 wz--n- 751.00G 19.00G
 
Old 07-09-2015, 06:26 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by oso_togari View Post
But i want to recover some space from the VG and i reduce the size.

But when i open fdisk to see my unpartioned space i see this:
Space recovered by reducing the vg will show as unused in the pv, not (ever) in the underlying device.

In your case (second post) the entire device was dedicated to the pv - you cannot partition /dev/sdb.
 
1 members found this post helpful.
Old 07-09-2015, 06:40 AM   #4
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
thank you...i fear about this response...

how can i get into this problem? if you choose LVM in the partition layout in the installer, a partition is created for that, isn't??

is there any dangerous way to fix this?

regards
 
Old 07-09-2015, 07:49 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by oso_togari View Post
how can i get into this problem? if you choose LVM in the partition layout in the installer, a partition is created for that, isn't??
If you don't add partitions first, probably not - a pv using the entire volume is quite valid.
Quote:
is there any dangerous way to fix this?
I think you mean is there a safe way to "fix" this. No.
You would have to backup all your data, and LVM definitions, and delete the pv, then partition the disk then recreate everything, adapting the fstab in need.
Lots of potential to mess things up.

Why can't you simply add lv(s) ?.
 
1 members found this post helpful.
Old 07-09-2015, 11:25 AM   #6
hsiangchen
LQ Newbie
 
Registered: Jul 2015
Location: China
Distribution: Slackware 14.1
Posts: 2

Rep: Reputation: Disabled
you cannot fix this. because you already pressed `w' .
 
Old 07-13-2015, 04:41 AM   #7
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Hi syg00

i understand for your first answer that there's not a common way to face the problem, thats why i question about a dangerous(maybe better expressed, 'experimental' way to fix it(even if it's dangerous))

i cannot add the remainig space as LV, because i want to add it as a expansion of another LV(/) in another VG(vg00).

Really, the problem is that a postgree install(by puppet) asks me a 100gb remainig space and i only have 14gb in /.
maybe i could 'overmount', after the installation, the '/opt/postgreesql/databases/xxxxx' (or whatever directory) with the new LV.
Or, what would be the best solution?

regards
 
Old 07-13-2015, 06:42 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
None of us can help you if you refuse to give us all the data - no vg00 is shown.
 
Old 07-14-2015, 04:05 AM   #9
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
you are right...but im not refuse to give data, im only hide it in order to not not confuse the main question, that is: how to create partitions in a entire pv volume? i prefer to ask that way in order to learn general concepts instead of solving particular problems...

this is the data:

[root@ina01 ES /opt/puppet/packages/public]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 VolGroup00 lvm2 a-- 120.38G 0
/dev/sdb VolGroup01 lvm2 a-- 751.00G 19.00G

[root@ina01 ES /opt/puppet/packages/public]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 5 0 wz--n- 120.38G 0
VolGroup01 1 7 1 wz--n- 751.00G 19.00G

[root@ina01 ES /opt/puppet/packages/public]# lvs
LV VG Attr LSize Origin Snap Move Log Copy% Convert
arch_ebsprona VolGroup00 -wi-ao 29.06G
oh_ebsprona_as VolGroup00 -wi-ao 48.81G
oh_ebsprona_db VolGroup00 -wi-ao 11.72G
oh_ofmprona VolGroup00 -wi-ao 10.00G
/ VolGroup00 -wi-ao 20.78G
data_ebsmasna VolGroup01 owi-ao 100.00G
data_ebsprona VolGroup01 -wi-ao 100.00G
data_ebstesna VolGroup01 -wi-ao 100.00G
extra VolGroup01 -wi-ao 330.00G
oh_ebsmasna VolGroup01 -wi-ao 50.00G
oh_ebstesna VolGroup01 -wi-ao 50.00G
snap_data_ebsmasna VolGroup01 swi-a- 2.00G data_ebsmasna 0.28

and the goal is to use the empty data in sdb to expand de LV (/).

regards
 
Old 07-14-2015, 05:47 AM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I understand that you want to create two partitions on sdb; sdb1 would contain the LVM data, sdb2 would have a size of about 19GB and be outside of LVM. Correct?

But how are you going to tell LVM that this PV is now called sdb1 instead of sdb? Your plan isn't possible.

Well it is possible by dismantling VG 01, partitioning the disk and recreating VG01 with sdb1, but you need some space to backup your VG01 data.

Last edited by berndbausch; 07-14-2015 at 05:50 AM.
 
1 members found this post helpful.
Old 07-14-2015, 06:39 AM   #11
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Yes, is correct, in fact there are already about 80gb more in sdb that are outside of pv...

ok, i figured out that isn't posibble regards the syg00 response. unfortunatly i dont have the space to backup this in a easy way.

thank you.
 
Old 07-14-2015, 09:12 AM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by oso_togari View Post
Really, the problem is that a postgree install(by puppet) asks me a 100gb remainig space and i only have 14gb in /.
maybe i could 'overmount', after the installation, the '/opt/postgreesql/databases/xxxxx' (or whatever directory) with the new LV.
That should work - but before you do the install. Create a new lv in vg01 of the appropriate size, and mount it where-ever. Then do the install.
 
Old 07-22-2015, 06:30 AM   #13
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
thnx all for your responses!
 
  


Reply



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
Using fdisk and cfdisk each shows a different partition table slacker_ Linux - Newbie 2 09-14-2013 05:22 PM
Fdisk error - can't read new partition table Maxxed Slackware - Installation 17 06-22-2010 07:35 PM
fdisk ruined my partition table hefi Linux - Software 2 12-17-2009 06:26 AM
fdisk partition table representation vofka Linux - General 3 06-27-2009 03:20 PM
fdisk will not write partition table winter_wizzerd Slackware 5 01-06-2007 11:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:51 AM.

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