0

I have a situation to extend root directory from 2TB to 4TB because of low diskspace. I have updated it in vmware setting 2tb to 4tb. In lsblk I can see /dev/sda is 4TB. when I was doing fdisk on /dev/sda "DOS partition table format cannot be used on drivers larger than 2199023255040 bytes. Use GUID partition table format."

root directory is ext4 format and no lvm partition is there.

Is it possible to change partition type to GPT without losing data. How can I solve this issue?

screenshot1 screenshot2

  • 1
    You will need to move the 2 TB to another place, change the partition type and format, and then move the data back. – Ray Aug 10 '22 at 12:51
  • Possible: https://askubuntu.com/questions/84501/how-can-i-change-convert-a-ubuntu-mbr-drive-to-a-gpt-and-make-ubuntu-boot-from but you need to remember that when playing with partition types data loss can happen. It is always recommended to have your data backed up before you perform any of those steps. – Terrance Aug 10 '22 at 13:29
  • Converting to or from GPT - have good backups http://www.rodsbooks.com/gdisk/mbr2gpt.html At minimum you have to reinstall grub & edit fstab. Often have to reinstall and may have to restore from backup. Most users do not have very large / (root). They first start using separate /home and then may have data partitions. https://help.ubuntu.com/community/Partitioning/Home/Moving Data Partitions: https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk – oldfred Aug 10 '22 at 14:21
  • @Ray Can we convert root directory to LVM and extend it? – Chava Koteswara Rao Aug 11 '22 at 12:52
  • I don't know. But, as others after my comment have suggested, whatever you do, you should take a backup first. So, if you try anything without a backup, you're actually risking your current 2 TB of data. You can also have separate partitions, as oldfred suggested -- why not do that instead of creating a 4 TB root partition? – Ray Aug 11 '22 at 13:09

0 Answers0