Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
37.3GB usb hard drive only 18Gb's of space
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 9:34 pm    Post subject: 37.3GB usb hard drive only 18Gb's of space Reply with quote

I pulled my 40gb hard drive from the laptop I fried, and bought a 2.5" usb 2.0 enclosure for it. Even though the icon on the desktop says "37.3 GB Volume", a df -m results in 18773 mb's of space. Where's the other ~9 gb's of space?
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Apr 06, 2006 9:41 pm    Post subject: Reply with quote

what gives
Code:
# sfdisk -l
as result?
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 9:44 pm    Post subject: Reply with quote

Disk /dev/sda: 38154 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 38153 38154- 39069680 83 Linux
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Apr 06, 2006 10:31 pm    Post subject: Reply with quote

what filesystem? i suppose you already checked with ls -la for hidden files?
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 11:21 pm    Post subject: Reply with quote

Doesn't seem to be any hidden files.

here's some more info:

Code:
localhost disk # df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda3                57222     31449     25774  55% /
udev                       443         1       443   1% /dev
/dev/hda1                   92        20        67  23% /boot
shm                        443         0       443   0% /dev/shm
/dev/sda1                18773     16322      1498  92% /media/disk


Seems that the it's only 18773 mb's, but should be closer to 37000 or so. cfdisk says its a 40000 mb ext3 partition.
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Thu Apr 06, 2006 11:38 pm    Post subject: Reply with quote

Backup anything you need off of it, then re-partition it and reformat it and see what happens.
_________________
Bones McCracker wrote:
On the other hand, regex is popular with the ladies.
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 11:41 pm    Post subject: Reply with quote

i'd like to wait and see if anyone else has anymore ideas before I reformat it, but I will definitely give that a go in a day or two to see if that does the trick. I'd like to know what caused it in the first place either way.
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Thu Apr 06, 2006 11:43 pm    Post subject: Reply with quote

If you boot with it attached, what does dmesg show when it detects the drive?
_________________
Bones McCracker wrote:
On the other hand, regex is popular with the ladies.
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 11:50 pm    Post subject: Reply with quote

Code:
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
usb 1-2: USB disconnect, address 3
usb 1-2: new high speed USB device using ehci_hcd and address 6
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
  Vendor: IC25N040  Model: ATCS04-0          Rev: 0811
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: assuming drive cache: write through
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: assuming drive cache: write through
 sda: sda1
sd 2:0:0:0: Attached scsi disk sda
usb-storage: device scan complete
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Apr 06, 2006 11:52 pm    Post subject: Reply with quote

I tried fscking the drive and get this.

Code:
localhost ~ # fsck -t ext3 /dev/sda
fsck 1.38 (30-Jun-2005)
e2fsck 1.38 (30-Jun-2005)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>


I don't know a lot about fsck on usb drives, am I missing something or could this be corrupted?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Fri Apr 07, 2006 12:54 am    Post subject: Reply with quote

ericxx2005 wrote:
am I missing something or could this be corrupted?

You are missing the partition number.

Try this
Code:
# fsck.ext3 /dev/sda1
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Fri Apr 07, 2006 4:02 am    Post subject: Reply with quote

I was able to fdisk it with a backup superblock, but it moved all my files to look like this:

Code:
#2403823  #2420145  #2420396  #2420647  #2420898  #32744    #49219  #65602  #98301
#2403824  #2420146  #2420397  #2420648  #2420899  #32745    #49220  #65603  #98302
#2403825  #2420147  #2420398  #2420649  #2420900  #32746    #49221  #65604  #98303
#2403826  #2420148  #2420399  #2420650  #2420901  #32747    #49222  #65605  #98304
#2403827  #2420149  #2420400  #2420651  #2420902  #32748    #49223  #65606  #98305
#2403828  #2420150  #2420401  #2420652  #2420903  #32749    #49224  #65607  #98306
#2403829  #2420151  #2420402  #2420653  #2420904  #32750    #49225  #65608  #98307
#2403830  #2420152  #2420403  #2420654  #2420905  #32751    #49226  #65609  #98308
#2403831  #2420153  #2420404  #2420655  #2420906  #32752    #49227  #65610  #98309
#2403832  #2420154  #2420405  #2420656  #2420907  #32753    #49228  #65611  #98310
#2403833  #2420155  #2420406  #2420657  #2420908  #32754    #49229  #65612  #98311
#2403834  #2420156  #2420407  #2420658  #2420909  #32755    #49230  #65613
#2403835  #2420157  #2420408  #2420659  #2420910  #32756    #49231  #65614
#2403836  #2420158  #2420409  #2420660  #2420911  #32757    #49232  #65615
#2403837  #2420159  #2420410  #2420661  #2420912  #32758    #49233  #65616
#2403838  #2420160  #2420411  #2420662  #2420913  #32759    #49234  #65617


These are all now in lost&found. How do I restore them? They were perfectly fine files before I did the fdisk.

EDIT: the fdisk did, however, restore my usb hdd to 37.3 gb's. thanks for all the help so far, I guess I just need to be more careful to unmount usb devices. Just need to sort out this lost&found crap, which is kinda irriplacible. So I guess I learned my lession about 'backing up' also, just didn't realize that fdisk could make files inaccessible.
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Fri Apr 07, 2006 3:53 pm    Post subject: Reply with quote

Nevermind, I guess I just had to move the files out of the folder to recover them. Thanks for everyone's help!
Back to top
View user's profile Send private message
grigole
n00b
n00b


Joined: 14 Dec 2005
Posts: 11
Location: Toronto, ON

PostPosted: Fri Apr 07, 2006 8:03 pm    Post subject: Reply with quote

ericxx2005 wrote:
I was able to fdisk it with a backup superblock, but it moved all my files to look like this:

Code:
#2403823  #2420145  #2420396  #2420647  #2420898  #32744    #49219  #65602  #98301
#2403824  #2420146  #2420397  #2420648  #2420899  #32745    #49220  #65603  #98302
#2403825  #2420147  #2420398  #2420649  #2420900  #32746    #49221  #65604  #98303
#2403826  #2420148  #2420399  #2420650  #2420901  #32747    #49222  #65605  #98304
#2403827  #2420149  #2420400  #2420651  #2420902  #32748    #49223  #65606  #98305
#2403828  #2420150  #2420401  #2420652  #2420903  #32749    #49224  #65607  #98306
#2403829  #2420151  #2420402  #2420653  #2420904  #32750    #49225  #65608  #98307
#2403830  #2420152  #2420403  #2420654  #2420905  #32751    #49226  #65609  #98308
#2403831  #2420153  #2420404  #2420655  #2420906  #32752    #49227  #65610  #98309
#2403832  #2420154  #2420405  #2420656  #2420907  #32753    #49228  #65611  #98310
#2403833  #2420155  #2420406  #2420657  #2420908  #32754    #49229  #65612  #98311
#2403834  #2420156  #2420407  #2420658  #2420909  #32755    #49230  #65613
#2403835  #2420157  #2420408  #2420659  #2420910  #32756    #49231  #65614
#2403836  #2420158  #2420409  #2420660  #2420911  #32757    #49232  #65615
#2403837  #2420159  #2420410  #2420661  #2420912  #32758    #49233  #65616
#2403838  #2420160  #2420411  #2420662  #2420913  #32759    #49234  #65617


These are all now in lost&found. How do I restore them? They were perfectly fine files before I did the fdisk.

EDIT: the fdisk did, however, restore my usb hdd to 37.3 gb's. thanks for all the help so far, I guess I just need to be more careful to unmount usb devices. Just need to sort out this lost&found crap, which is kinda irriplacible. So I guess I learned my lession about 'backing up' also, just didn't realize that fdisk could make files inaccessible.


If you did that fsck with '/dev/sda' instead of '/dev/sda1', then you hosed your data and your filesystem now occupies the entire disk (including block 1 - the loader and partition table area).

Or perhaps the partition was corrupt to start with.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum