All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Resolving duplicate logical block numbers in SSD image
PostPosted: September 26th, 2019, 12:01 
Offline

Joined: June 1st, 2017, 15:09
Posts: 11
Location: London
I had a thread here a couple of years ago about an SSD I had from around 2009 that had stopped working in normal mode due to a power failure, but was still accessible in 'engineering mode'. https://forum.hddguru.com/viewtopic.php?t=35428

Briefly it was a 256GB indilinx barefoot with sansung NANDs. The OpenSSD project works with this controller and I was able to dump the drive data to an image by hacking this code somewhat. It happened that logical page numbers were written to the last in each group of 128 16kb pages. I built a mapped (translated) image from this and can mount it with linux (its a hfs plus volume).

However of the 16M logical pages in the drive about 600k have more than one physical entry in the physical->logical page number area. In other words 600k LPNs point to more than one physical block. So I don't know which one to choose.

When I mount it I can descend some directories and access some files but not all, and not the areas I want to. So its nearly there but no cigar.

I suspect the LPNs I am reading were actually originally used for garbage collection, and that there are map file blocks on the image, but I can't find them yet. I wondered if anyone had any knowledge about this kind of thing. I have made an interesting bitmap of the drive although how much I can infer from it I don't know. Its here:

http://www.filedropper.com/ppmfile2rearr

I'll try to upload it here but it might be too big.

I made it by taking each 16kb block and averaging the value of them looking at them as 32 bit words, since I was looking for addressing info which is in 32 bit words.

The horizontal white lines I inserted, the vertical ones are the area where the LPN information is stored (because the data after the 1k or so of address info is 0xFF for the rest of the 16k block). The zone near the bottom of mainly black is interesting. I wonder if this is 32 banks (chips) of a log structured file system with the empty section the lower black area (although why not white for 0xffffffff I don't know). There are several elements of this image that I am not sure of their meaning.

Anyway I wonder given what I have found, if anyone might know more about it. IE in this kind of device do you usually find a translation table in a single 'chunk' of data, or spread all over the place, any techniques to find it etc. If I had a sequence number for the LBA containing blocks, I could choose the most recent, but I dont seem to be able to see that at all. I'll write a few more tech details in another post.

TIA, Pete


Top
 Profile  
 
 Post subject: Re: Resolving duplicate logical block numbers in SSD image
PostPosted: September 26th, 2019, 18:00 
Offline

Joined: June 1st, 2017, 15:09
Posts: 11
Location: London
Here is the image I made, its made by reading the image file 16kb at a time into a 4096 word 32 bit array (IE 4 bytes per word), and averaging them for the block. Then converting this 32 bit total into a 8 bit byte and writing it as a pixel shade, with 0 being black and 0xffffffff being white. The pixels are written out starting from the top left corner to the top right, then progressing down the page in that manner.

The dump of the drive includes blocks, containing what I am sure are addresses, which probably do not appear in the drive when its connected to a PC in normal mode. These are the vertical white lines. They are every 128th block (16kb block size). The horizontal while lines I added to allow me to see roughly what address in the drive corresponds to what area in the image.

The drive has 32 NAND chips and there are 32 columns so I imagine each column is probably a chip but I am not sure since I had to address the drive via a method which abstracted that away from me a bit.

Why the different appearance in the 'black' zone near the bottom I wonder? And the partially written erase size blocks in the lower right of the screen are interesting too. The last block for these lines (the one that usually contains address info) is all 0xffffffff - ie unwritten. Partially written before the poweroff perhaps. The machine was idle for some time before the poweroff IIRC.


Attachments:
ppm_file2_rearr.png
ppm_file2_rearr.png [ 10.9 MiB | Viewed 4787 times ]
Top
 Profile  
 
 Post subject: Re: Resolving duplicate logical block numbers in SSD image
PostPosted: September 27th, 2019, 1:19 
Offline

Joined: July 30th, 2012, 3:37
Posts: 310
Location: Fairfield, CT USA
Hmmmmmmmmmmmmm

_________________
Recover My Flash Drive


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group