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

Re: Please How do I calculate the offset of a file within a ext3 partition

Thank you for warning me, I am already using a specific file as my swap, so I had already done mkswap on it.
I only wanted to be able suspend on it and resume from it using swsusp.
To do that I needed to give to the kernel as arguments the following:
resume=<swap_file_partition> resume_offset=<swap_file_header_offset>

So I had to figure out a way to find out where the header of my swap file was. I haven't tried it yet, I rather want to backup my file first, in case something wrong happen.

William Tambe

Theodore Tso wrote:
On Sun, Jul 22, 2007 at 08:07:31PM -0500, William Tambe wrote:
Thank you for your response, but one more question, does this logical block 0 hold the header of the file, if not where is located the header of a file in a ext3 filesystem.

The reason why I need to know that is because I wish to use swsusp on my swap-file so I really need to know the location of the file's swap header.

The swap header is located at the beginning of the file, so yes, that
would be found in block 0 of the file.

The bugger question is what are you *doing*?  If you're just trying to
enable swsusp, you should need to be using debugfs to find the block
number and then manually editing the swap header.  The swap file
should have been set up correctly before you started using it, or if
you want to initialize a new swap-file, you can use the mkswap
command.  If you're needing to manually edit the swap header, you're
almost certainly doing something wrong....

						- Ted

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