photon 3.x
Add a new disk to the Virtual Machine and then resize the partition.
Please find the procedure to increase the file system below
1.Add a new disk to the virtual machine with the desired size.
2. Run partition command
root@localhost [ ~ ]# parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
3. List all partitions available to fix the GPT and check the last partition number:
(parted) print free
print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 139MB 138MB primary ext3
2 139MB 4442MB 4302MB primary linux-swap(v1)
3 4442MB 12.0GB 7516MB primary ext3 boot
4 12.0GB 19.5GB 7516MB primary ext3
19.5GB 21.5GB 2001MB Free Space
4.Resizing partition to use free space
(parted) resizepart
resizepart
Partition number? 4
4
Warning: Partition /dev/sda4 is being used. Are you sure you want to continue?
Yes/No? Yes
Yes
End? [19.5GB]? 21400
21400
5. List partition to see the size of partition increased.
(parted) print
print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 139MB 138MB primary ext3
2 139MB 4442MB 4302MB primary linux-swap(v1)
3 4442MB 12.0GB 7516MB primary ext3 boot
4 12.0GB 21.4GB 9442MB primary ext3
6. Exit from parted prompt.
(parted) q