Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
The engineer obviously nuked the partition table, but if that's all s/he did, no data has actually been deleted or overwritten.
For quite some time, partitioning tools have defaulted to starting the first partition at sector 2048, which represents a 1 Mb offset from the start of the drive. Unless this drive was originally partitioned using an ancient tool, the creation of a GUID partition table would not have overwritten any partitions.
If you can reconstruct the original partition layout, the file systems and associated data should reappear.
Edit: I spoke too soon. I see now that the engineer also created a partition with an XFS file system. That would indeed overwrite the existing file system on the previous partition. Time to restore from backups.
No, it does not wait for a reboot to "apply" the changes. parted writes to the drive immediately. If the file system on /dev/sdg was mounted when this operation was performed, the partition table and at least part of the file system structure will have been cached in RAM, which is why the files are still visible. If you reboot, the cached data will be lost and the file system will be completely gone.
It's more than likely that not all the file system structures were held in RAM when parted decided to trample all over them, which means you might get some really unpredictable results if you now try to access this file system. Ideally, you should treat it as corrupt and restore everything from backups.
I guess you could try copying as much as you can from that partition to another drive and then unmount and recreate the partition and file system. However, I would be hesitant to trust anything stored on a file system that's been manhandled by parted in this manner.
The message from fdisk is not an error, just a warning telling you that it doesn't handle GPT at all. fdisk can only do MBR; for GPT use something like parted or gdisk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.