////////////////////////////////////////////////////////////////////////////////////// // Data recovered from partition, "attempt to access beyond end of device" // // Bryan Smith, Tuesday October 21 2008 ////////////////////////////////////////////////////////////////////////////////////// I had a big problem: I created a 7.5TB partition and put some valuable data on it. After reboot, I type df -h, and the drive was listed as 7.4TB. But when I opened up the disk in parted, the tool said the partition was on 1.6TB. When I ran ls on the mounted partition, I got: --------------------------------------------------- ls: cannot access sdb1/dir3: Input/output error ls: cannot access sdb1/dir1: Input/output error ls: cannot access sdb1/dir2: Input/output error lost+found dir1 dir2 dir3 --------------------------------------------------- If I looked at the server logs (dmesg | tail), I found the infamous "attempt to access beyond end of device" message: --------------------------------------------------- SELinux: initialized (dev sdb1, type ext3), uses xattr attempt to access beyond end of device sdb1: rw=32, want=4195876888, limit=3228132399 EXT3-fs error (device sdb1): ext3_get_inode_loc: unable to read inode block - inode=262242305, block=524484610 attempt to access beyond end of device sdb1: rw=32, want=4218945560, limit=3228132399 EXT3-fs error (device sdb1): ext3_get_inode_loc: unable to read inode block - inode=263684097, block=527368194 attempt to access beyond end of device sdb1: rw=32, want=12908757016, limit=3228132399 EXT3-fs error (device sdb1): ext3_get_inode_loc: unable to read inode block - inode=806797313, block=1613594626 --------------------------------------------------- For more information, see the LinuxQuestions.org forum about this problem: http://www.linuxquestions.org/questions/linux-server-73/troubleshooting-large-partition-attempt-to-access-beyond-end-of-device-676617/#post3317582 I recovered the data using TestDrive [http://www.cgsecurity.org/wiki/TestDisk], which is a simple command-line utility. Note the data was on the partition; I just could not access it. You can install it in Yum: --------------------------------------------------- > yum install testdrive --------------------------------------------------- (I didn't find it in my repositories for apt-get, though it might be there.) So the lessons I learned: * When creating partitions greater than 2TB or if you need more than 4 partitions, set the disk label to gpt. You can do this in parted. * If you have data on a disk that you cannot access, try TestDisk (open source, free, GPL)