Score:0

How do I force a drive to use the backup GPT table?

ng flag

Every question and answer I can find appears to be the opposite of my current problem.

8TB NTFS USB drive (~85% full) connected to single boot Ubuntu 20.04 server, shared with Windows workstations via Samba. Used in an in-person teaching business considered "non essential," so hanging on by fingernails and prayers thanks to being closed to customers for 7 months last year. The bulk of the data is video courseware created during/since lockdowns. Better fail over is in the plans, but paying salaries and rent have been the priority. Owners are 100% behind IT spending (one was a CIS professor), so aren't going cheap out of ignorance. They have approved every piece of HW & SW on my list, approved the priorities and have set targets for each purchase. As a geek, I truly appreciate their support. I've never worked for a company more understanding of the right way to set up their infrastructure. Before the lockdowns, they funded IT beautifully, but the server was deployed due to adapting to being "non essential." The work changed from teaching to 100% curriculum development, which required much better sharing of large amounts of data. Please forgive this diatribe, but I'm hoping to avoid "shoulda, coulda, woulda" responses.

I was copying files over the network (writing to the drive) when the power went out. UPS is on the list but hasn't been possible. All workstations are laptops, so didn't have one to double stack. On reboot, the drive will no longer mount in Linux (on the server or my Ubuntu 20.04 laptop). When I run fdisk, it reports "The primary GPT table is corrupt, but the backup appears OK, so that will be used." Since the drive won't mount, the backup sure doesn't seem to be getting used. I may be wrong, but that's what it seems.

Fdisk displays what appears to be a proper description for /dev/sdb (7.28 TiB, 8001563222016 bytes, 15628053168 sectors ...) It displays what appears to be correct info for /dev/sdb1 (start 2048 end 15628050431 sectors 15628048374 size 7.3T type Microsoft basic data). There are no other partitions.

The drive is NTFS format. It is a USB drive that needs to be easily connected to Windows systems without additional software on those systems (business owner requirement for portability). I can connect it directly to windows 7, 8, 10 machines. It mounts properly, and data can be read and written on any Windows OS. If I check for errors in Windows, none are detected, so no attempt at repair is made. Haven't tried any Windows repair tools beyond disk check since in my experience they usually do more harm than good.

I have a backup of all the data (1700 miles away - most data is written in drips and drabs, so I have a script that backs it up overnight to a remote location simply & invisibly), and all the data is accessible on the drive in question if I attach the drive to Windows. The most difficult part is that thanks to Covid, I don't have a spare 8T drive or the funds to buy one - seriously. Would like to avoid a 36+ hour drive-to-drive copy as well, be that here or at our backup site (owner's child's house). We have gotten so used to it being on our little server, we'd like to get it back ASAP. I put it on a 20.04 server specifically because I respect the no BS and the great tools Ubuntu provides. That little server is my favorite system 'cuz she's not the slightest bit temperamental...until this.

I have access to Windows 7, 8, 10 systems as well as Ubuntu 20.04 server & desktops. I'm willing to use a Windows tool if that'll do it, but I trust Ubuntu more - most Windows "recovery tools" scare the crap out of me

oldfred avatar
cn flag
This is an Ubuntu question & answer site. Windows is not supported here. but repair gpt: http://www.rodsbooks.com/gdisk/repairing.html More repair info use p, v & w to write the partition table. If not correct just use q to quit. : http://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table/386802#386802
ng flag
I'm asking on an Ubuntu website because the issue is with Ubuntu. The drive was connected to an Ubuntu server, and will no longer mount in any Linux OS. I pointed out that the drive can mount in Windows because that is evidence that the drive isn't completely corrupted - just the part of the GPT Ubuntu needs in order for the drive to mount. The hope is that I can repair the GPT so that I can once again have it mount on the Ubuntu server. --If someone knows of a means to fix this on Windows, I'm up to try it, but as I said, I trust Ubuntu to not destroy the data.
ng flag
@oldfred - The askubuntu link you attached is titled "Fixing corrupt backup GPT table." As far as Ubuntu reports to me, it isn't the backup GPT that is corrupted - it is the primary. Are you telling me without telling me that the report from Ubuntu is wrong and it is the backup that is corrupted?
oldfred avatar
cn flag
I believe it is the same commands in gdisk. Gdisk compares backup, primary & protective MBR and then tries to choose correct one. Only if you write w will it then update all 3 partition tables. With Windows you have to be careful not to let the fast start up set a hibernation flag on any NTFS partition that you want to use with Linux (or even another Windows install).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.