Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 16 Aug 2018, 08:52
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Missing space in ext2 partition after file delete[Solved]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Wed 30 May 2012, 04:11    Post subject:  Missing space in ext2 partition after file delete[Solved]
Subject description: Learn to use fsck command !!! :-)
 

I seem to have “lost” some of the free space on my boot partition and I would like to try and found out why. (This installation is on a 32Gb SSD installed inside a Toshiba TE2100 laptop)

This boot partition (sda1) is an ext2 partition of 9.55Gb (according to Gparted) and it contains a full install of GnewSense as well as several Puppy frugal installs. It still works fine.

(The puppies are MijnPup, Slacko53, Puppy 431, Puppy 431JP2012, PupStudio21 and Akita)

The problem occurred when I first tried to create a 512Mb savefile for Puppy431JP2012. I did not have enough space on the partition so I had to decide what to discard. I rebooted into Slacko53 and decided to remove the entire frugal folder of a Lucid 511 install that I had hardly ever used. This folder was over 600Mb, so deleting it should have opened up plenty of space.

However, after booting back into 431JP and trying to create the savefile, I still had inadequate space. I have totalled up the files and folders (including hidden) and can find roughly 8.5Gb.
When I ran the “Treesize” utility in Akita it said I was using 8.35Gb.
When I run Gparted in Slacko it shows:
Total partition 9.55Gb
Used: 8.99 Gb
Unused 574.16Mb

Partview says I only have about 80Mb free.

I feel as if something went wrong when I deleted the frugal folder containing the files from the Lucid 511 install. But why? And where is that extra space? How do I find and recover it?
.
Lost space Gparted_.jpg
 Description   
 Filesize   41.27 KB
 Viewed   551 Time(s)

Lost space Gparted_.jpg

Lost space Partview.jpg
 Description   
 Filesize   26.6 KB
 Viewed   541 Time(s)

Lost space Partview.jpg


Last edited by greengeek on Wed 30 May 2012, 16:06; edited 1 time in total
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 7832
Location: World_Hub

PostPosted: Wed 30 May 2012, 13:31    Post subject:  

Hi Greengeek- assuming you've fsck'd, perhaps something from here.. or perhaps it has to do with block/inode size?
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Wed 30 May 2012, 13:56    Post subject:  

Semme wrote:
- assuming you've fsck'd...
Thanks Semme. Actually, I have not fsck'd yet. I suspected that might help but I have never used that command, so I wanted to leave the system untouched till I got some advice Smile
Do you have a recommendation for the best way to run fsck, or tips about whether I should do a backup of any system files etc first? Many thanks!
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 4208
Location: Kiel,Germany

PostPosted: Wed 30 May 2012, 14:40    Post subject:  

Puppy has several PUPMODES, one is " 3 " for full installs to internal flash .

Since you run frugals, i am assuming PUPMODE " 12 " frugal to internal HD .

But /etc/rc.d/PUPSTATE might contain " PUPMODE=13" entry like for frugals on external flash .

You never fscked ?

Don't you have a grub line containing "pfix=fsck" ?

I would run
Code:
fsck -f -n -v /dev/sda1

booting Puppy into RAM ( pfix=ram )
first : -n for do a read-only check, -v for verbose info, -f for forcing complete check even if marked "clean" or max mnt count less than " 30 " .

If eveything seems right, i would finally run
Code:
fsck -f -v /dev/sda1

No SSD experience though .
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Wed 30 May 2012, 14:49    Post subject:  

Karl Godt wrote:
You never fscked ?
No, never. I guess that makes me pretty bad. But it also says how reliable Puppy is!

Quote:
Don't you have a grub line containing "pfix=fsck" ?
No. Nothing like that anywhere in my menu.lst (attached, but remove .gz). I guess I must be flying without a parachute. Thanks for the help - I will give the fsck a try.
menu.lst.gz
Description 
gz

 Download 
Filename  menu.lst.gz 
Filesize  5.31 KB 
Downloaded  171 Time(s) 
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 7832
Location: World_Hub

PostPosted: Wed 30 May 2012, 14:52    Post subject:  

Never fsck'd? Yeah- that is a Laughing shocker!

No, no backup advice although you sound like you know what you're doing.. Karls line should suffice..
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 4208
Location: Kiel,Germany

PostPosted: Wed 30 May 2012, 15:26    Post subject:  

Interesting grub, never seen such grub commands like

kopt=
crashdump=
groot=
alternative=
lockalternative=
defoptions=
lockold=
xenhopt=
xenkopt=
altoptions=
howmany=

vmlinuz-2.6.24-24 must be a IDE kernel with /dev/hda i assume,
or does the SSD show up as /dev/sda on gNewSense installation ?

Debian legacy Grub is patched for ext3 but not for ext4 file systems . There is "Trusted grub" out to support mounting ntfs partitions, but that still has to be patched for inode size of 256 .
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Wed 30 May 2012, 16:03    Post subject:  

Just ran fsck as you described and it has recovered approx 500Mb (Thank you!). Interestingly, both gparted and partview show the extra 500Mb of available space now, but the figures for gparted and partview do not agree (still different by about another 500Mb)

(Will boot into gnewsense later...)
gparted after fsck.jpg
 Description   
 Filesize   31.54 KB
 Viewed   487 Time(s)

gparted after fsck.jpg

partview after fsck.jpg
 Description   
 Filesize   15.37 KB
 Viewed   484 Time(s)

partview after fsck.jpg

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Wed 30 May 2012, 16:16    Post subject:  

Semme wrote:
Never fsck'd? Yeah- that is a Laughing shocker!

Yeah, that's twice you've caught me out - once for not having savefile backups, and now this!
I'm making progress though... (slow learner here...)
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 7832
Location: World_Hub

PostPosted: Wed 30 May 2012, 16:32    Post subject:  

Good to hear that's what it was- and the first thing that came to mind. With feedback <wink> we all progress..
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 4208
Location: Kiel,Germany

PostPosted: Wed 30 May 2012, 16:42    Post subject:  

/usr/sbin/partview
is a script that comes either as bash or pearl script .

df and du commands come in mind guessing the free space on drives .

The bash partview used df as i grep ed both terms on it .

The journal of ext3 and ext4 seems to occupy 128 MB plus ext[2-4] store several superblock backups on the partitions :
Code:
dumpe2fs /dev/sda2 |grep -i backup


dumpe2fs 1.41.11 (14-Mar-2010)
Journal backup: inode blocks
Backup superblock at 32768, Group descriptors at 32769-32770
Backup superblock at 98304, Group descriptors at 98305-98306
Backup superblock at 163840, Group descriptors at 163841-163842
Backup superblock at 229376, Group descriptors at 229377-229378
Backup superblock at 294912, Group descriptors at 294913-294914
Backup superblock at 819200, Group descriptors at 819201-819202
Backup superblock at 884736, Group descriptors at 884737-884738
Backup superblock at 1605632, Group descriptors at 1605633-1605634
Backup superblock at 2654208, Group descriptors at 2654209-2654210
Backup superblock at 4096000, Group descriptors at 4096001-4096002

10 superblock backups consuming some physical space on the partition .

These superblock backups can be used if the main superblock got corrupted with " fsck -b 32768 " option .

I first had Puppy 4.3 on a slow 4GB HD (MWDMA speed for swap), that crashed a lot . fsck had been a nearly 2nd or thrird days task for me :

Puppy equivalent to the command # script?
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 7832
Location: World_Hub

PostPosted: Wed 30 May 2012, 17:02    Post subject:  

fsck -b * sounds about right- under "What to do if you have a bad ext3 superblock"

dumpe2fs I didn't know about so- thanks again Karl for another informative Nix tip..
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Thu 31 May 2012, 03:24    Post subject:  

Obviously, it seems that I should be including fsck in my menu.lst, so what switches do you recommend please? Should I include the -n parameter so that it just informs me of the problem, or should I give it the opportunity to just do the corrections without asking?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 4208
Location: Kiel,Germany

PostPosted: Thu 31 May 2012, 05:52    Post subject:  

greengeek, you would need to alter the initrd.gz init script to accept arguments for puppy kernel parameters .

Kernel parameters go like this :

Code:
some_card_=quirk_fixup:0x00,get_me_out:n,shall_respect_acpi:lax,show_i_love_you_on_boot_screen:1:big


whereas on commandline it would look like this :
Code:
modprobe some_card_ quirk_fixup=0x00 get_me_out=n shall_respect_acpi=lax show_i_love_you_on_boot_screen=1:big


Puppy does a forced say automatically yes to all questions when booted with " pfix=fsck " kernel parameter :

title Puppy Slacko 53 frugal in sda1 dir slacko53frugal
rootnoverify (hd0,0)
kernel /slacko53frugal/vmlinuz pmedia=atahd psubdir=slacko53frugal pfix=fsck
initrd /slacko53frugal/initrd.gz
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Thu 31 May 2012, 13:53    Post subject:  

Karl Godt wrote:
Puppy does a forced say automatically yes to all questions when booted with " pfix=fsck " kernel parameter :

title Puppy Slacko 53 frugal in sda1 dir slacko53frugal
rootnoverify (hd0,0)
kernel /slacko53frugal/vmlinuz pmedia=atahd psubdir=slacko53frugal pfix=fsck
initrd /slacko53frugal/initrd.gz
Thank you! I have now copied your suggestion of pfix=fsck into the kernel line for each frugal entry (except gNewSense) and carefully booted each frugal one by one.

Something broke in my 4.3.1 install, and it told me it cannot find my desktop background image. Also, there is a funny icon next to the "Help" entry in the main menu, and when I click on the help icon it tells me that it cannot find the japanese help file.

I think this is a clue. (just maybe...)

I guess that I must have done something wrong when I tried to install 431JP2012 and it looks like the two installs got their savefiles confused. I don't know how this could happen because they are in two separate folders. Anyway, a good lesson for installing too many frugals.

What have I learned?
1) Run fsck regularly
2) Especially run fsck before and after installing new O.S.
3) Do some research about savefiles and filesystems.
4) RUN FSCK REGULARLY ! !
431corruptedHELPmenu.jpg
 Description   Background missing. Help icon corrupted. Looking for "ja" help file.
 Filesize   49.06 KB
 Viewed   449 Time(s)

431corruptedHELPmenu.jpg

menu.lstFSCKmod.gz
Description  It is not a real .gz
Just rename it menu.lst
gz

 Download 
Filename  menu.lstFSCKmod.gz 
Filesize  5.38 KB 
Downloaded  159 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0619s ][ Queries: 13 (0.0089s) ][ GZIP on ]