- Resize vmware hdd size.
- Create new partition using cfdisk: with fdisk error occur "no free sector available"
- Create new partition using cfdisk: with fdisk error occur "no free sector available"
$ sudo cfdisk /dev/sda
new -> logical -> Size( in MB) : 89121.62
Type -> 8E
Write -> yes
Quit
- Reboot server:
$ sudo reboot
- Now let's extend the server's Volume Group to that physical volume.
$sudo vgdisplay
This will give you the info on your current Volume Group. Note down the entry next to "VG Name". That's your Volume Group name.
$ sudo vgextend EnterVolumeGroupNameHere /dev/sda6
and note down the entry next to "LV Name". This is your logical volume's name (e.g. /dev/srv/root), which you'll now extend to the newly added partition/physical volume.
- Extend the logical volume by X GBs:
$ lvextend -L +XG yourLogicalVolumePath
- Finally, let's resize the file system to the new allocated space:
$ resize2fs yourLogicalVolumePath
(this may take some time depending on number of GBs added to the file system.
- Check the new file system sizes:
$ df -hT
new -> logical -> Size( in MB) : 89121.62
Type -> 8E
Write -> yes
Quit
- Reboot server:
$ sudo reboot
- Assuming you created partition /dev/sda6, let's now create the physical volume in that partition:
$ sudo pvcreate /dev/sda6$sudo vgdisplay
This will give you the info on your current Volume Group. Note down the entry next to "VG Name". That's your Volume Group name.
- Since we're (essentially) extending the main logical volume, let's get the name of that:
$ lvdisplayand note down the entry next to "LV Name". This is your logical volume's name (e.g. /dev/srv/root), which you'll now extend to the newly added partition/physical volume.
$ lvextend -L +XG yourLogicalVolumePath
Make sure you replace X above with the actual number of GBs you've added in your VM's settings. So if you increased your VM by 20GBs, the command becomes:
$ lvextend -L +20G yourLogicalVolumePath$ resize2fs yourLogicalVolumePath
(this may take some time depending on number of GBs added to the file system.
$ df -hT
댓글
댓글 쓰기