How To Extend Size Of The Storage File

In our previous post “using a file as a storage device” adrian asked a question to us : is it possible to extend the size on the ‘filename’ file? We searched on it and figured out the answer. Let’s roll 🙂

Lets say you create a file name /newfile of size 200MB and format it, after a while you want to extend the file size. To do that do the following

This method is good. But I think it would be safer to goto :
1.Run level 1
2. Unmount the partition
3. Increase the file size by ‘fsadm’
4. Run file system check
5. Then mount the partition.
By this I think the data would be safe.