Difference between revisions of "Fdisk"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
https://devops.ionos.com/tutorials/increase-the-size-of-a-linux-root-partition-without-rebooting/
 +
 
Resizing existing disk space on root fs without using gparted.
 
Resizing existing disk space on root fs without using gparted.
 
```
 
```
Line 13: Line 15:
 
Command (m for help): t (8e)
 
Command (m for help): t (8e)
 
Command (m for help): w
 
Command (m for help): w
(if not unmounted before you might need to reboot or lazy unmount umount -l /opt
+
partprobe  # if you don't want to reboot or if not unmounted before you might need to reboot or lazy unmount umount -l /opt
  
 
lsblk
 
lsblk
Line 19: Line 21:
 
sudo pvresize /dev/sda5 (lvm disk you increased in fdisk)
 
sudo pvresize /dev/sda5 (lvm disk you increased in fdisk)
 
sudo lvextend -L100G /dev/vg00/opt  (extend whatever patition size you want
 
sudo lvextend -L100G /dev/vg00/opt  (extend whatever patition size you want
 +
sudo resize2fs /dev/vg00/vg00-opt or xfs_growfs /dev/vg00/vg00-opt
 
```
 
```

Latest revision as of 19:55, 25 June 2020

https://devops.ionos.com/tutorials/increase-the-size-of-a-linux-root-partition-without-rebooting/

Resizing existing disk space on root fs without using gparted.

- First, increase vmdisk space in your vm host gui/cli interface.

- Second, in your OS with root access
sudo fdisk /dev/sda
Command (m for help): p
Command (m for help): d
Command (m for help): d
Command (m for help): n
 - e (extended (if dos)
Command (m for help): n
Command (m for help): t (8e)
Command (m for help): w
partprobe  # if you don't want to reboot or if not unmounted before you might need to reboot or lazy unmount umount -l /opt

lsblk

sudo pvresize /dev/sda5 (lvm disk you increased in fdisk)
sudo lvextend -L100G /dev/vg00/opt  (extend whatever patition size you want
sudo resize2fs /dev/vg00/vg00-opt or xfs_growfs /dev/vg00/vg00-opt