Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mb0 on August 01, 2012, 10:12:03 AM
-
i created the partition /dev/sda2 to be 30GB, (fdisk shows 31254426 blocks), but `df /dev/sda2` shows it's size as 950MB, and i have just been told it's full when copying files to it. What's up with this??
-
df shows the free space on a mounted fs, so try
df /mnt/sda2
If sda2 is mounted this should show its free space,otherwise it will show the free space of the root fs (which is likely in RAM, so not large)
-
Also don't forget to mount partion. Use
df -h ...
to get result in "human readable" units.
-
It is mounted and `df /mountpoint` returns exactly the same
(and FWIW it is already bigger than the RAM in the system)
-
In case you mistakenly exhausted the space of your rootfs, better delete those files as soon as possible to prevent any consequences.
-
Best to run a fsck, after umounting first.
-
fsck /dev/sda2:
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
/dev/sda2 has been mounted 922 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create<y>? yes
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 162/62848 files (42.0% non-contiguous), 249033/251007 blocks
-
That filesystem looks suspicious in several aspects...
mounted 922 times without being checked - is that about consistent with its history?
42.0% non-contiguous - unusually high!
/lost+found not found. - shouldn't occur without serious fs corruption (unless it was rm'ed manually)
Which fs type is that exactly? journalled or not?
-
it's ext4.. 922 times does seem higher than i would have expected (probably expected closer to 90?) and it's never been fsck'd..
-
Can you run another fsck but with the "-v" option and post output again?
-
sudo fsck -v /dev/sda2:
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
/dev/sda2: clean, 162/62848 files, 249033/251007 blocks
intersting huh?
-
Oh, sorry, make that "-vf". ;)
-
fsck (busybox 1.19.3, 2011-10-30 01:47:29 UTC)
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
162 inodes used (0.26%)
68 non-contiguous files (42.0%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 150/2
249033 blocks used (99.21%)
0 bad blocks
1 large file
139 regular files
14 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
--------
153 files
-
"249033 blocks used (99.21%)" appears to agree with output of df.
-
yes, but..
fdisk /dev/sda, 'p'
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 3892 4864 7815622+ 83 Linux
/dev/sda2 1 3891 31254426 83 Linux
Partition table entries are not in disk order
Which is in line with what i expected.
-
It is possible to create a fs much smaller than the underlaying partition - rest of disk partition space will be unusable.
-
2 pages, and the output of df -h has yet to be posted.
-
nor requested. I guess you want that with sda2 mounted? ..and, the whole lot??
e:
Filesystem Size Used Available Use% Mounted on
rootfs 222.8M 93.4M 129.4M 42% /
tmpfs 123.8M 0 123.8M 0% /dev/shm
/dev/sda1 7.3G 284.2M 7.1G 4% /mnt/sda1
/dev/loop0 12.4M 12.4M 0 100% /tmp/tcloop/perl5
... many /dev/loop all normal
/dev/loop120 1.1M 1.1M 0 100% /tmp/tcloop/alsa
/dev/sda2 965.1M 957.3M 7.7M 99% /mnt/sda2
-
Not requested?
You complain about the output of df but don't think to post it?
-
If I were you, I'd copy files from sda2 to sda1 and then just format sda2 from scratch - preferably after first fixing the partition table.
-
> preferably after first fixing the partition table
what /how?
for reference, not a problem to wipe sda2 (unlike sda1)
-
"testdisk" is a good tool to fix partition tables.
-
If sda2 is an ext filesystem, why not run resize2fs?
-
If sda2 is an ext filesystem, why not run resize2fs?
I had been considering suggesting that, but given all the [missing] evidence would consider it more reliable to format from scratch.
-
resize2fs can't change inode count IIRC, which may be a problem.
-
so i went through the testdisk procedure, required a restart so i did and now..
Syslinux 4.01
Error: no configuration file found
no default or UI configuration directive found!
boot:
-
soo.. is there anything i can enter at the boot prompt?
The deafening silence makes me think i'm probably screwed?
-
Hi mb0
The error message makes it sound like just the config file for the bootloader is missing, though I suspect it may
be worse than that. My recommendation is that you boot the machine using a CD or a USB thumb drive. Then
mount sda1 and sda2, and check what is left of the directory structure.
-
Yes, you likely just need to reinstall the bootloader from a live cd.
-
Well, that was weird..
my former /dev/sda2 became /dev/sda1 ..not so crazy..
/dev/sda2 however, was a partition that i had deleted *before* i repartitioned (ie before i ever started this post). And former-/dev/sda1 (you know, the one with all the useful stuff on) was nowhere.
So i started again. FFS...
so, that over with, what can i do before i invest all the time to redo everything, again, to make sure everything is in good shape??
-
Hi nb0
Anytime I need to mess with partitions I use gparted. It handles partiton sizing, formatting and I believe it
also lets you set the label.