Sven Gehr wrote:
Am Mi 30.03.2005 15:36 schrieb Steve Lord <lord@xxxxxxx>:
Hallo,
You could make a sparse file the same size as the partition, do a mkfs
on the file, then dd the first 512 bytes out to the disk.
Can you tell me how to creat a sparse file? The partition-tool from suse
show me the /dev/md0 with 135,6GB. Is this the size where I need?
cat /proc/mdstat show me:
md0 : active raid5 sdc2[2] sdb2[1] sda2[0]
142287360 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
Help this for define the size of the sparse file?
Can you help me by this steps?
The file size you need is 142287360 * 1024, or 145702256640
try:
dd if=/dev/zero of=/tmp/sparse bs=1024 count=1 seek=142287359
mkfs -t xfs -d file -d size=145702256640 -d name=/tmp/sparse
Now, the only problem with this is that if you used any special
parameters on your original mkfs line, they are missing here. Since
they are stored in the superblock, you are rather stuck if you
cannot remember them.
However, there is other data stored right after the superblock which
is
the head of the free space trees for the first part of the disk. The
root inode is not too far in either. So if you lost more of the
filesystem than the super block, things could be in a sorry state.
I think I have no other change?
do dd if=/dev/md0 of=/tmp/block bs=16k count=1
then do od -xa on this file and send the output to the list, it will
be fairly simple to see if you lost more than the super block.
If there are alternate superblocks, then xfs_repair can usually find
them. What led you down the path of wanting to rebuild your super
block in the first place?
Steve
|