LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-17-2023, 08:31 AM   #16
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,815

Rep: Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238

Quote:
Originally Posted by TechnoJunky View Post
Every time I try to copy the Games directory, it eats ALL the free space on these destination drives. How is that possible? It makes no sense to me.
Two possibilities come to mind: (1) sparse files, and (2) hard links. If you copy in a manner that does not preserve hard links and sparseness, the destination can require a lot more space than does the source. How are you doing the copying?
 
Old 02-17-2023, 10:10 PM   #17
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
From within TestDisk. I do the quick scan, then select the partition, then P to copy files. There's no options for the copy, just select and go.
 
Old 02-18-2023, 08:58 AM   #18
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,815

Rep: Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238
I'm guessing it's a sparseness problem, and I don't see any way to make testdisk preserve sparseness when recovering a file that way. Testing whether those recovered files are potentially sparse (contain long blocks of zeros) is not a simple matter. Restoring the sparseness of a file requires making a copy of it, so you would have to try that on a few files at a time before you have filled all your space.

To make a sparse copy of a file, you can use either cp with the "--sparse=always" option, or rsync with the -S (--sparse) option, e.g.:
Code:
rsync -Sv oldfile newfile
ls -ls oldfile newfile
If the output from "ls" shows that newfile uses significantly fewer disk blocks than does the original file, then you can "mv newfile oldfile" to save the space. If not, just "rm newfile" and proceed to the next.

I know that's a bit painful. A long time ago I did write a C program to test whether a file might be a candidate for being made sparse and make a sparse copy if so, but it's dependent on specific filesystem features and I'm not sure it even works any more.
 
Old 02-19-2023, 07:19 AM   #19
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
Thanks everyone who tried to help. I'm going to mark this thread as solved. I don't think I can go any further with retrieving anything from this disk.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi And The Story Of SSD Card Corruption LXer Syndicated Linux News 0 03-09-2022 06:06 PM
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 09:58 AM
To SSD or not to SSD jlinkels Linux - Hardware 14 10-02-2012 07:36 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration