Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I got a GPT disk that has a total of 3TB on it with 2 partitions.
Partition 1 = EXT4 (2TB)
Partition 2 = NTFS (1TB)
I deleted the NTFS partition using "parted" and now have 1 TB freespace to extend Partition 1.
However, using resize2fs I get this:
Code:
# resize2fs /dev/sdc1
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 536857600 blocks long. Nothing to do!
You never enlarged the partition where the filesystem resides. Tools like gparted will enlarge the partition and filesystem at the same time. If you want to do it manually, the steps are:
Note where partition 1 currently starts. Use a partitioning tool that reports in "sector" units so that you get an exact number.
Delete both partition 1 and partition 2, then re-create partition 1 starting at the same point noted in Step 1 and continuing to the end of the disk.
If you are doing this while the drive is in use by the OS, you will now need to reboot to get the kernel to use the new partitioning.
Run resize2fs to resize the filesystem to fill its enlarged partition.
Resizing a filesystem always has the potential for disaster. Be sure you have a good backup before starting.
You never enlarged the partition where the filesystem resides. Tools like gparted will enlarge the partition and filesystem at the same time. If you want to do it manually, the steps are:
Note where partition 1 currently starts. Use a partitioning tool that reports in "sector" units so that you get an exact number.
Delete both partition 1 and partition 2, then re-create partition 1 starting at the same point noted in Step 1 and continuing to the end of the disk.
If you are doing this while the drive is in use by the OS, you will now need to reboot to get the kernel to use the new partitioning.
Run resize2fs to resize the filesystem to fill its enlarged partition.
Resizing a filesystem always has the potential for disaster. Be sure you have a good backup before starting.
You never enlarged the partition where the filesystem resides. Tools like gparted will enlarge the partition and filesystem at the same time. If you want to do it manually, the steps are:
Note where partition 1 currently starts. Use a partitioning tool that reports in "sector" units so that you get an exact number.
Delete both partition 1 and partition 2, then re-create partition 1 starting at the same point noted in Step 1 and continuing to the end of the disk.
If you are doing this while the drive is in use by the OS, you will now need to reboot to get the kernel to use the new partitioning.
Run resize2fs to resize the filesystem to fill its enlarged partition.
Resizing a filesystem always has the potential for disaster. Be sure you have a good backup before starting.
It seems that the GPT was corrupted so I basically had to tar a backup on another drive then untared into the new drive.
I am assuming this must have been the safest thing for me to do?
It seems that the GPT was corrupted so I basically had to tar a backup on another drive then untared into the new drive.
I am assuming this must have been the safest thing for me to do?
That is certainly the solution with the simplest steps. While partitioning problems almost always can be resolved without copying masses of data, doing so requires carrying out several steps very precisely, and really you should have the full backup available anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.