WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cannot mount large volumes  (Read 1948 times)

Offline andriscom

  • Newbie
  • *
  • Posts: 32
Cannot mount large volumes
« on: January 09, 2011, 02:41:10 AM »
Hi,

 I have the following problem with TinyCore (may be a bug):

 When I mount my 2TB (ext4) drives I get wrong free space indication. (about 90GB less than is should be)
 If the drive does not have ~90GB free space then I cannot even mount it.

Code: [Select]
tc@box:~$ blkid /dev/sda1
/dev/sda1: LABEL="2TB" UUID="bb6d1db2-665d-47ab-bbc8-f35ce62a24b2" TYPE="ext4"

tc@box:~$ fdisk -l /dev/sda1

Disk /dev/sda1: 2000.3 GB, 2000396803584 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda1 doesn't contain a valid partition table

And I got the following error in dmesg when I try to mount the drive which doesn't have ~90GB free space:
Code: [Select]
EXT4-fs (sda1): bad geometry: block count 488378368 exceeds size of device (488378125 blocks)
 The weird thing is that these drives can be used without any problems on other distros (Parted Magic, Ubuntu) so they are not corrupt.
 I have tried with TinyCore 3.2, TinyCore 3.4.1 and with a remastered MicroCore 3.4.1 x64 with filesystems-2.6.33.3-tinycore64.tcz installed.

Anyone?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Cannot mount large volumes
« Reply #1 on: January 09, 2011, 04:24:25 AM »
One of the reasons you get such output is that you did 'fdisk -l /dev/sda1' instead of 'fdisk -l /dev/sda'
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline andriscom

  • Newbie
  • *
  • Posts: 32
Re: Cannot mount large volumes
« Reply #2 on: January 09, 2011, 07:11:30 AM »
Ok, a simple e2fsck solved the unmountable drive problem (of course I've backed up my data before that) so now I don't get the "bad geometry: block count..." error.

But this free space reporting is getting more and more misterious for me:

Code: [Select]
tc@box:~$ sudo df /dev/sdd1
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdd1            1922859824 1832092520         0 100% /mnt/sdd1

Df reports that the used blocks are less than the 1K-blocks but the avaliable is 0... now how is this possible? When I check it with gparted (from TinyCore) it gives me the correct values... something like: 1.75TiB used and 85GiB avaliable from the full 1.82TiB space.

Code: [Select]
tc@box:~$ fdisk -l /dev/sdd

Disk /dev/sdd: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
   /dev/sdd1               1      243202  1953513472  83 Linux

Offline andriscom

  • Newbie
  • *
  • Posts: 32
Re: Cannot mount large volumes
« Reply #3 on: January 09, 2011, 07:44:45 AM »
Ok, finally I could find it out myself:

There are reserved blocks on every ext4 formatted drives (or at least when you format the drive with gparted). This is about 5% of the total disk space (which is 100GB for a 2TB drive) and you can remove these reserved blocks with tune2fs:

Code: [Select]
sudo tune2fs -m 0 /dev/sda1

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Cannot mount large volumes
« Reply #4 on: January 09, 2011, 07:54:16 AM »
That has always been the default since ext2, gparted has no particular role in it. The blocks are reserved for root.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline andriscom

  • Newbie
  • *
  • Posts: 32
Re: Cannot mount large volumes
« Reply #5 on: January 09, 2011, 01:31:53 PM »
Yeah... well... I didn't know that.
It's a shame that the free space is reported as zero even for root.