I have a new Fedora-20 installation on a "650 GiB" drive by itself. It is installed in less than 60 GiB's which leaves the rest of the drive unused, not what I wanted. I guess it preserved a /home partition for me? I certainly didn't want it to take up the remainder of the drive. I've been looking at man pages and googling and fixing this may be simple but I am having a lot of trouble understanding what needs to be done. Is there a clear step by step set of instructions for fixing this?
Presently I have, from gparted:
/dev/sdb1, 2, and 3 are the the system I am using now, assigned by the install application:
/dev/sdb1 bios_grub 1.00 MiB
/dev/sdb2 Mounted on /boot ext4 500.00 MiB
/dev/sdb3 lvm2 pv Size: 57.58 GiB used: 57.58 GiB (100%)
The unused part of the drive which should be made part of /dev/sdb3:
Path: /dev/sdb5 File system: ext4 Size: 538.10 GiB Used: 30.93 GiB Unused: 507.17 GiB
The used part is /home from an earlier F-20 installation and can be deleted.
Any help appreciated,
Bob
If I understand you correctly you will need to do something along these lines... You need to know the names of your volume groups and logical volumes.
use pvscan, vgscan & lvscan to display what you have. eg root@MythTV:/etc# pvscan PV /dev/sdc2 VG vg_tv lvm2 [1.82 TiB / 59.31 GiB free] Total: 1 [1.82 TiB] / in use: 1 [1.82 TiB] / in no VG: 0 [0 ] root@MythTV:/etc# vgscan Reading all physical volumes. This may take a while... Found volume group "vg_tv" using metadata type lvm2 root@MythTV:/etc# lvscan ACTIVE '/dev/vg_tv/lv_photo' [292.97 GiB] inherit ACTIVE '/dev/vg_tv/lv_music' [195.31 GiB] inherit ACTIVE '/dev/vg_tv/lv_video' [1.19 TiB] inherit ACTIVE '/dev/vg_tv/lv_backup' [97.66 GiB] inherit
ensure that /dev/sdb5 is partition type LVM
# fdisk /dev/sdb use p command to display partitions use t command to change type to 8e
Add the partition to you volume group
# pvcreate /dev/sdb5
Add the new partition to your volume group
# vgextend vg_name /dev/sdb5
Extend the root logical volume
# lvextend -l +100%FREE /dev/vg_name/lv_root /dev/sdb5
Resize the volume to match
# resize2fs /dev/vg_name/lv_root
On 12/20/2013 04:32 PM, David Beveridge wrote:
If I understand you correctly you will need to do something along these lines... You need to know the names of your volume groups and logical volumes.
use pvscan, vgscan & lvscan to display what you have. eg root@MythTV:/etc# pvscan PV /dev/sdc2 VG vg_tv lvm2 [1.82 TiB / 59.31 GiB free] Total: 1 [1.82 TiB] / in use: 1 [1.82 TiB] / in no VG: 0 [0 ] root@MythTV:/etc# vgscan Reading all physical volumes. This may take a while... Found volume group "vg_tv" using metadata type lvm2 root@MythTV:/etc# lvscan ACTIVE '/dev/vg_tv/lv_photo' [292.97 GiB] inherit ACTIVE '/dev/vg_tv/lv_music' [195.31 GiB] inherit ACTIVE '/dev/vg_tv/lv_video' [1.19 TiB] inherit ACTIVE '/dev/vg_tv/lv_backup' [97.66 GiB] inherit
ensure that /dev/sdb5 is partition type LVM
# fdisk /dev/sdb use p command to display partitions use t command to change type to 8e
Add the partition to you volume group
# pvcreate /dev/sdb5
Add the new partition to your volume group
# vgextend vg_name /dev/sdb5
Extend the root logical volume
# lvextend -l +100%FREE /dev/vg_name/lv_root /dev/sdb5
Resize the volume to match
# resize2fs /dev/vg_name/lv_root
Thanks for the suggestions, I think I may have enough there to fix things, that or destroy the system! :-)
I will give it a go in the morning.
Bob
On 12/20/2013 04:32 PM, David Beveridge wrote:
Add the new partition to your volume group
# vgextend vg_name /dev/sdb5
What should I enter for "vg_name?"
I am trying to add /dev/sdb4 to /dev/sdb3, at least I think that's what I'm trying to do. [/dev/sdb5 is now /dev/sdb4]
# vgextend vg_name /dev/sdb4
It doesn't like vg00 ...
I'm stuck on this point.
Bob
you will need to run pvscan and determine what the name of the vg is you want to add the storage to.
to get /dev/sdb5 -> /dev/sdb4 you reworked the partition table (ie removed the extend partition and made sdb4 a primary?).
if still lost give this info:
fdisk -l /dev/sd[ab] pvscan df
On Sat, Dec 21, 2013 at 9:42 AM, Bob Goodwin - Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
On 12/20/2013 04:32 PM, David Beveridge wrote:
Add the new partition to your volume group
# vgextend vg_name /dev/sdb5
What should I enter for "vg_name?"
I am trying to add /dev/sdb4 to /dev/sdb3, at least I think that's what I'm trying to do. [/dev/sdb5 is now /dev/sdb4]
# vgextend vg_name /dev/sdb4
It doesn't like vg00 ...
I'm stuck on this point.
Bob
-- http://www.qrz.com/db/w2bod Box10 Fedora-20/64bit Linux
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 12/21/2013 11:25 AM, Roger Heflin wrote:
you will need to run pvscan and determine what the name of the vg is you want to add the storage to.
to get /dev/sdb5 -> /dev/sdb4 you reworked the partition table (ie removed the extend partition and made sdb4 a primary?).
if still lost give this info:
fdisk -l /dev/sd[ab] pvscan df
[root@box10 bobg]# fdisk /dev/sda [Fedora-19 system]
Command (m for help): p Disk /dev/sda: 232.9 GiB, 250000000000 bytes, 488281250 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000b3ca5
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 488280063 243627008 8e Linux LVM
[root@box10 bobg]# fdisk /dev/sdb [Fedora-20 system of interest]
Command (m for help): p Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: C5B7CE3F-6788-4A3D-B524-16AB72E99EAD
Device Start End Size Type /dev/sdb1 2048 4095 1M BIOS boot partition /dev/sdb2 4096 1028095 500M Microsoft basic data /dev/sdb3 1028096 121792511 57.6G Linux LVM /dev/sdb4 121792512 1250000000 538G Linux LVM
[root@box10 bobg]# pvscan PV /dev/sda2 VG fedora_box10 lvm2 [232.34 GiB / 0 free] PV /dev/sdb3 VG fedora_box1000 lvm2 [57.58 GiB / 0 free] Total: 2 [289.92 GiB] / in use: 2 [289.92 GiB] / in no VG: 0 [0 ]
[root@box10 bobg]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora_box1000-root 34G 4.5G 27G 15% / devtmpfs 3.7G 0 3.7G 0% /dev tmpfs 3.7G 328K 3.7G 1% /dev/shm tmpfs 3.7G 916K 3.7G 1% /run tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup tmpfs 3.7G 88K 3.7G 1% /tmp /dev/sdb2 477M 101M 347M 23% /boot /dev/mapper/fedora_box1000-home 17G 7.2G 8.1G 47% /home 192.168.1.8:/home 862G 190G 628G 24% /mnt/HOME1 192.168.1.48://SRVR1 635G 54G 549G 9% /mnt/BOX48
One of the failed attempts:
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root /dev/sdb4 Logical volume lv_root not found in volume group fedora_box1000
Perhaps something will be obvious to you?
Thanks,
Bob
On Dec 21, 2013, at 9:25 AM, Roger Heflin rogerheflin@gmail.com wrote:
you will need to run pvscan and determine what the name of the vg is you want to add the storage to.
to get /dev/sdb5 -> /dev/sdb4 you reworked the partition table (ie removed the extend partition and made sdb4 a primary?).
/dev/sdb is a gpt disk. There's no distinction between primary and extended partitions, there are just partitions, up to 128 of them.
Chris Murphy
On Dec 20, 2013, at 11:57 AM, "Bob Goodwin - Zuni, Virginia, USA" bobgoodwin@wildblue.net wrote:
It is installed in less than 60 GiB's which leaves the rest of the drive unused, not what I wanted. I guess it preserved a /home partition for me? I certainly didn't want it to take up the remainder of the drive. I've been looking at man pages and googling and fixing this may be simple but I am having a lot of trouble understanding what needs to be done. Is there a clear step by step set of instructions for fixing this?
No, I doubt you'll get any "install to LVM by default" proponent to actually produce a custom step by step for you, even though they succeeded at getting a reversal to the installer team's decision dropping LVM by default. And it was dropped for the very reason exemplified in this thread: it's overly complicated. The easiest step by step for you is to start over rather than waiting for someone who thinks LVM is easy, intuitive, flexible, and ideal for hapless users being subjected to it by default.
But before you start over, questions:
Based on the /dev/sdb layout it seems you used custom/manual partitioning in the installer, and created all of these mount points manually, is that correct? If so why not use Guided partitioning with either partition scheme set to LVM or Standard Partitioning? It seems you'd have ended up with what you wanted:
~54GB for root ~577GB for home
The rest for boot and swap. That seems reasonable. If you have other requirements please be specific what you want the various sizes to be?
Chris Murphy
On 12/21/2013 02:51 PM, Chris Murphy wrote:
Based on the /dev/sdb layout it seems you used custom/manual partitioning in the installer, and created all of these mount points manually, is that correct? If so why not use Guided partitioning with either partition scheme set to LVM or Standard Partitioning? It seems you'd have ended up with what you wanted:
I may have foolishly checked somewhere that offered to keep /home but other than that the install was plain vanilla from the DVD iso, XFCE rather than Gnome, via a usb flash stick.
When I get around to "fixing" this mess I will eliminate LVM, it's an added layer of complexity that buys me nothing. Ok when it works but ... Fixing means a re-install. I have become quite adept at configuring Fedora/XFCE my way as many times as I have done it. So far, counting beta, Fedora 20 three times. I even had the alpha version for a short time on one box.
On Sun, Dec 22, 2013 at 2:49 AM, Bob Goodwin - Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
One of the failed attempts:
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root /dev/sdb4 Logical volume lv_root not found in volume group fedora_box1000
Perhaps something will be obvious to you?
You also need to to an lvscan to find the names of the logical volumes.
so it should be /dev/volume_group_name/logical_volume_name
On Dec 21, 2013, at 1:05 PM, "Bob Goodwin - Zuni, Virginia, USA" bobgoodwin@wildblue.net wrote:
On 12/21/2013 02:51 PM, Chris Murphy wrote:
Based on the /dev/sdb layout it seems you used custom/manual partitioning in the installer, and created all of these mount points manually, is that correct? If so why not use Guided partitioning with either partition scheme set to LVM or Standard Partitioning? It seems you'd have ended up with what you wanted:
I may have foolishly checked somewhere that offered to keep /home.
I don't see any evidence of an existing home on /dev/sdb. And it's also not mounted in your df report. Can you report the output from the command lvs? Did you want to preserve the existing /home on /dev/sda perhaps?
Manual Partitioning does allow you to find a previous installation's /home, and you can choose to keep it by setting it as a mount point at /home. And then deleting everything else. But that would have gotten you what you wanted. Yet you're reporting you don't have the layout you want. So there definitely was a miscommunication between user and installer.
It's actually quite a valid point, that the Guided path doesn't have a mechanism at all to preserve an existing /home. And yet a separate /home partition (or LV) is the default installation layout for Fedora. Considering all of the mind boggling esoteric things it can do, I think this is much more basic, to help users preserve /home. All it needs to do is merely add it to /etc/fstab, and if encrypted to crypttab also. Not rocket science, yet a big benefit.
I think an admitted weakness of the new installer interface is that it doesn't take existing installations into account as much as assuming new installations.
When I get around to "fixing" this mess I will eliminate LVM, it's an added layer of complexity that buys me nothing. Ok when it works but ... Fixing means a re-install.
Or really esoteric knowledge. At a minimum you need to made sdb4 a PV, and then add the PV to the existing VG, and then either create a new LV or resize an existing /home LV if it exists. And then create or resize an ext4 volume, which itself is a multistep process. And then possibly modify fstab to account for the new LV /home if it doesn't exist, and further figure out how to copy any data from a rootfs /home to the new LV /home.
Chris Murphy
you will need a vgextend first something like "vgextend fedora_box1000 /dev/sdb4" that will add the disk to the vg.
the df shows these 2 are mounted: /dev/mapper/fedora_box1000-roo t 34G 4.5G 27G 15% /
/dev/mapper/fedora_box1000-home 17G 7.2G 8.1G 47% /home
so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will need to be extended, you can also use the names shown in the df commands...all of the different names point to the same underlying device.
On Sat, Dec 21, 2013 at 2:30 PM, David Beveridge bevhost@gmail.com wrote:
On Sun, Dec 22, 2013 at 2:49 AM, Bob Goodwin - Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
One of the failed attempts:
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root /dev/sdb4 Logical volume lv_root not found in volume group fedora_box1000
Perhaps something will be obvious to you?
You also need to to an lvscan to find the names of the logical volumes.
so it should be /dev/volume_group_name/logical_volume_name
users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Dec 21, 2013, at 2:11 PM, Roger Heflin rogerheflin@gmail.com wrote:
you will need a vgextend first something like "vgextend fedora_box1000 /dev/sdb4" that will add the disk to the vg.
pvcreate first, then vgextend to add.
/dev/mapper/fedora_box1000-home 17G 7.2G 8.1G 47% /home
Oops, you're right, there it is.
so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will need to be extended, you can also use the names shown in the df commands…
And then lvresize for one or both of those to get the size he wants them. And then resize2fs to resize the file systems.
But I think he didn't want a new /home on /dev/sdb, I think he wanted the /home he had on /dev/sda but I could be mistaken. I'm not clear on the exact final layout the OP wants.
Chris Murphy
On 12/21/2013 04:26 PM, Chris Murphy wrote:
On Dec 21, 2013, at 2:11 PM, Roger Heflin rogerheflin@gmail.com wrote:
you will need a vgextend first something like "vgextend fedora_box1000 /dev/sdb4" that will add the disk to the vg.
pvcreate first, then vgextend to add.
/dev/mapper/fedora_box1000-home 17G 7.2G 8.1G 47% /home
Oops, you're right, there it is.
I did that earlier today:
[root@box10 bobg]# vgextend fedora_box1000 /dev/sdb4 Physical volume '/dev/sdb4' is already in volume group 'fedora_box1000' Unable to add physical volume '/dev/sdb4' to volume group 'fedora_box1000'
so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will need to be extended, you can also use the names shown in the df commands…
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root /dev/sdb4 Logical volume lv_root not found in volume group fedora_box1000
Not sure what it wants here, it did not accept anything I have tried.
And then lvresize for one or both of those to get the size he wants them. And then resize2fs to resize the file systems.
But I think he didn't want a new /home on /dev/sdb, I think he wanted the /home he had on /dev/sda but I could be mistaken. I'm not clear on the exact final layout the OP wants.
I want to continue using the /home on /dev/sdb. All I want is to include all of the remaining space as part of /home. The other home is on .dev/sda and is part of an Fedora-19 system. Don't want that. It had tried to preserve /home from F-20 beta but I believe I've deleted that, don't want it..
Chris Murphy
it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the lv_ is not in the name of the lv.
On Sat, Dec 21, 2013 at 4:13 PM, Bob Goodwin - Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
On 12/21/2013 04:26 PM, Chris Murphy wrote:
On Dec 21, 2013, at 2:11 PM, Roger Heflin rogerheflin@gmail.com wrote:
you will need a vgextend first something like "vgextend fedora_box1000 /dev/sdb4" that will add the disk to the vg.
pvcreate first, then vgextend to add.
/dev/mapper/fedora_box1000-home 17G 7.2G 8.1G 47% /home
Oops, you're right, there it is.
I did that earlier today:
[root@box10 bobg]# vgextend fedora_box1000 /dev/sdb4 Physical volume '/dev/sdb4' is already in volume group 'fedora_box1000' Unable to add physical volume '/dev/sdb4' to volume group 'fedora_box1000'
so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will need to be extended, you can also use the names shown in the df commands…
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root /dev/sdb4 Logical volume lv_root not found in volume group fedora_box1000
Not sure what it wants here, it did not accept anything I have tried.
And then lvresize for one or both of those to get the size he wants them. And then resize2fs to resize the file systems.
But I think he didn't want a new /home on /dev/sdb, I think he wanted the /home he had on /dev/sda but I could be mistaken. I'm not clear on the exact final layout the OP wants.
I want to continue using the /home on /dev/sdb. All I want is to include all of the remaining space as part of /home. The other home is on .dev/sda and is part of an Fedora-19 system. Don't want that. It had tried to preserve /home from F-20 beta but I believe I've deleted that, don't want it..
Chris Murphy
-- http://www.qrz.com/db/w2bod Box10 Fedora-20/64bit Linux
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 12/21/2013 05:21 PM, Roger Heflin wrote:
it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the lv_ is not in the name of the lv.
Eureka! That's the name I needed.
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/home /dev/sdb4 Extending logical volume home to 554.43 GiB Logical volume home successfully resized
Thank you Roger
On 12/21/2013 05:21 PM, Roger Heflin wrote:
it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the lv_ is not in the name of the lv.
Thanks to everyone in this thread for your invaluable help. It looks like I am finally where I need to be with this LVM, maybe I wont have to re-install after all.
[bobg@box10 ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora_box1000-root 34G 4.5G 27G 15% / devtmpfs 3.7G 0 3.7G 0% /dev tmpfs 3.7G 68K 3.7G 1% /dev/shm tmpfs 3.7G 912K 3.7G 1% /run tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup tmpfs 3.7G 16K 3.7G 1% /tmp /dev/sdb2 477M 101M 347M 23% /boot /dev/mapper/fedora_box1000-home 546G 7.2G 517G 2% /home 192.168.1.8:/home 862G 190G 628G 24% /mnt/HOME1 192.168.1.48://SRVR1 635G 54G 549G 9% /mnt/BOX48
/home now resides on the remainder of the disk which is what I expected the installer to do. What went wrong I don't know, but I felt confident when I did the install that I had it all right?
Bob