[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transfering to new HDD



On Fri, Mar 03, 2000 at 12:48:29AM -0600, Brad wrote:
> On Thu, Mar 02, 2000 at 10:25:13AM -0800, kmself@ix.netcom.com wrote:
> > 
> > So you can't just "mkdir lost+found" and hope everything works.
> > 
> > man (8) mklost+found for more info.
> 
> Why not? Checking the source for mklost+found (yes, i actually RTFS ;),
> all it does is mkdir /lost+found, create a bunch of files to reserve
> some space for directory entries so fsck doesn't have to increase the
> size so soon, and then delete all those files.

Looks like you might have a point:

------------------------------------------------------------------------

[root@angel:/tmp]$ dd if=/dev/zero of=fs.img bs=1024 count=1024
1024+0 records in
1024+0 records out
[root@angel:/tmp]$ sync
[root@angel:/tmp]$ echo "y"|mke2fs fs.img
mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
fs.img is not a block special device.
Proceed anyway? (y,n) Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done
[root@angel:/tmp]$ mount -o loop fs.img fs.mnt
[root@angel:/tmp]$ cd fs.mnt
[root@angel:fs.mnt]$ ls -1i
     11 lost+found
[root@angel:fs.mnt]$ for dir in foo bar baz qux quux; do mkdir $dir; done
[root@angel:fs.mnt]$ rmdir  lost+found/
[root@angel:fs.mnt]$ ls -i1
     13 bar
     14 baz
     12 foo
     16 quux
     15 qux
[root@angel:fs.mnt]$ mkdir quiggly
[root@angel:fs.mnt]$ ls -i1
     13 bar
     14 baz
     12 foo
     11 quiggly
     16 quux
     15 qux
[root@angel:fs.mnt]$ mklost+found 
mklost+found 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
creat: No space left on device
[root@angel:fs.mnt]$ ls -i1
     13 bar
     14 baz
     12 foo
     17 lost+found
     11 quiggly
     16 quux
     15 qux
[root@angel:fs.mnt]$ cd ..
[root@angel:/tmp]$ umount fs.mnt/
[root@angel:/tmp]$ e2fsck fs.img 
e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
fs.img: clean, 128/128 files, 66/1024 blocks
[root@angel:/tmp]$ e2fsck -f fs.img 
e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
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
fs.img: 128/128 files (0.8% non-contiguous), 66/1024 blocks
------------------------------------------------------------------------

...I'd say that pretty much settles it.

-- 
Karsten M. Self (kmself@ix.netcom.com)
    What part of "Gestalt" don't you understand?

Scope out Scoop:  http://scoop.kuro5hin.org/
Nothin' rusty about Kuro5hin:  http://www.kuro5hin.org/


Reply to: