Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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?
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...
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.