Alexandre Takacs
asked on
Stuck with lvextend syntax
Hi
Probably an obvious one but for the life of me I can't seem to find the right syntax for the lvextend command under ubuntu 16.04.6:
As you have guessed I am trying to resize /dev/sda5
What is the "correct" syntax ?
Probably an obvious one but for the life of me I can't seem to find the right syntax for the lvextend command under ubuntu 16.04.6:
someadmin@tableau-sx-01:/dev$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 tableau-sx-01-vg lvm2 a-- 59.28g 10.02g
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE /dev/sda5
Path required for Logical Volume "–rl".
Please provide a volume group name
Run `lvextend --help' for more information.
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE /dev/sda5 tableau-sx-01-vg
Path required for Logical Volume "–rl".
Please provide a volume group name
Run `lvextend --help' for more information.
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE tableau-sx-01-vg /dev/sda5
Path required for Logical Volume "–rl".
Please provide a volume group name
Run `lvextend --help' for more information.
As you have guessed I am trying to resize /dev/sda5
What is the "correct" syntax ?
you need a volume group to extend
you need to use fdisk and resize2fs https://www.cloudberrylab.com/resources/blog/linux-resize-partition/
ASKER
well I have only one partition and it is my boot volume - so the cloudberrylab linked procedure is a no go
ASKER
you need a volume group to extend
Well from my trials linked above:
someadmin@tableau-sx-01:/dev$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 tableau-sx-01-vg lvm2 a-- 59.28g 10.02g
So my assumption is that my volume group to extend is tableau-sx-01-vg ?someadmin@tableau-sx-01:/dev$ sudo lvextend -L +54 /dev/mapper/tableau-sx-01-vg-root /dev/sda5
skip_dev_dir: Couldn't split up device name tableau-sx-01-vg-root.
Path required for Logical Volume "tableau-sx-01-vg-root".
Please provide a volume group name
Run `lvextend --help' for more information.
someadmin@tableau-sx-01:/dev$ sudo lvextend -L +54 tableau-sx-01 /dev/sda5
Path required for Logical Volume "tableau-sx-01".
Please provide a volume group name
Run `lvextend --help' for more information.
If so what you be the command I should use ? Doesn't seem to be able figure it out...
lvextend -L +54 /dev/tableau-sx-01-vg/lvol 1 /dev/sda5
guessing logical volume 1
guessing logical volume 1
ASKER
Thanks - clearly not volume1 though
someadmin@tableau-sx-01:/dev$ sudo lvextend -L +54 /dev/tableau-sx-01-vg/lvol1 /dev/sda5
Logical volume lvol1 not found in volume group tableau-sx-01-vg
someadmin@tableau-sx-01:/dev$ sudo lvscan
ACTIVE '/dev/tableau-sx-01-vg/root' [48.31 GiB] inherit
ACTIVE '/dev/tableau-sx-01-vg/swap_1' [976.00 MiB] inherit
someadmin@tableau-sx-01:/dev$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root tableau-sx-01-vg -wi-ao---- 48.31g
swap_1 tableau-sx-01-vg -wi-ao---- 976.00m
someadmin@tableau-sx-01:~$ sudo parted
[sudo] password for someadmin:
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 64.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 768MB 767MB primary ext2 boot
2 769MB 64.4GB 63.7GB extended
5 769MB 64.4GB 63.7GB logical lvm
(parted)
ASKER
Anyone ? I'm sure it must be rather a trivial quesiton ?!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the suggestion. I do have a backup (as a matter of fact it is a VM).
Should I simply "clone" the volume to a larger one ?
Should I simply "clone" the volume to a larger one ?
ASKER
Well it turns out there is apparently no way to do this. Eventually had to destroy and recreate the volume.