Help understanding ntfsresize?
when you use ntfsresize is the number you give for the resizing the overall number it will be resized to our the amount that gets taken off the end of the ntfs filesystem? Also it says the end is fragmented but it is a fresh install of windows xp pro. Shouldn't a fresh install not need fragmenting?
|
Quote:
At any rate, you can use the --info switch to see how much the partition can be safely resized to. For example... ntfsresize --info /dev/hda1 #this will show how much space can be gained. Then, you can resize the partition. The number on the end is going to be the new size of the ntfs partition. For example... ntfsresize --size 8000M /dev/hda1 #in this case, I'm resizing the file system to an available amount of 8000M (8GB). If you aren't comfy doing that, you could boot up with the knoppix cd and use the GUI tool called qtparted to resize the partition. |
thanks for the quick reply. I have a 60 gb harddrive with windows on it and i want to leave about 25 for linux so just to make sure i understand you i would do:
ntfsresize -s 35000M (or 35840) /dev/hda1? I didn't know that qt would automatically adjust the filesystem cuz i know with ntfsresize it doesn't resize the partition just the file system. So i'd still need something to adjust the partitions. edit: Yeah i figured the fragmentation was due to windows shottiness. |
Quote:
|
root@ttyp0[knoppix]# ntfsresize -i /dev/hda1
ntfsresize v200309071734captive1 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 60022448128 bytes (60023 MB) Current device size: 60022448640 bytes (60023 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 1834 MB (3.1%) Calculating smallest shrunken size supported ... You could resize at 30013247488 bytes or 30014 MB (freeing 30009 MB). |
Quote:
ntfsresize -s 35000M /dev/hda1 Qtparted handles the entire operation ( partition and file system ) but if you are willing to use the command line, here are my notes. Code:
When decreasing the size of a partition, do the file system first. This is true for Windows or Linux partitions. |
thanks for all your help.
edit: now i get this output when doing a a test. root@ttyp0[knoppix]# ntfsresize -n -s 35840M /dev/hda1 ntfsresize v200309071734captive1 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 60022448128 bytes (60023 MB) Current device size: 60022448640 bytes (60023 MB) New volume size : 35840000000 bytes (35840 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 1834 MB (3.1%) Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Updating $BadClust file ... ERROR: Device has bad sectors, not supported does that mean i can not do it with ntfsresize at all or is there something i can do to be able to still use it? |
Quote:
I'm not sure if xp is the same as w2k in this respect but here's info using w2k.... Right click on Start / open explorer Right click on Local Disk ( C : ) / select properties Select the Tools tab... Error-checking / Check Now... [X] Automatically fix file system errors / Start Reboot into windows to actually start that operation. When the chkdisk is complete, then boot into the live cd. |
ok im stuck.
root@ttyp0[knoppix]# ntfsresize -n -s 35840M /dev/hda1 ntfsresize v200309071734captive1 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 60022448128 bytes (60023 MB) Current device size: 60022448640 bytes (60023 MB) New volume size : 35840000000 bytes (35840 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 1835 MB (3.1%) Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Updating $BadClust file ... ERROR: Device has bad sectors, not supported i did chkdsk /f /r a second time. I went to western digital and got a utility to check my disk and it says i have 2 or more unrepairable errors. Is there no hope in resizing this ntfs filesystem? Here is what i wanted to do. I wanted to shrink down the ntfs, resize the partition, move the partition forward a bit so i could make a /boot partition to install grub into to chain load with NTLDR to boot a distro in the space i made by resizing. (+ the swap) Would i just have to get rid of xp repartition the drive to meet those requirements? edit: or could i use the f option of ntfsresize to force the changes? Or would that not be a good idea? edit2: even qtparted gives the same error. edit3: zero filling the drive wouldn't get rid of the bad sectors would it? It would just erase everything in the good ones? |
Quote:
Quote:
Quote:
|
i was using the version that came with knoppix 3.6 So i will check to see if newer versions are available in the lastest version of knoppix. But also i got the same error with QTParted so there is a chance that it is not just ntfsresize. This computer is getting up there in age so i have a feeling it is the drive that is going.
|
Knoppix 3.7 has the version you need.
|
thanks i'll try that out.
|
Ntfsresize also detected the unrepairable disk errors, just like the Westerd Digital utility, so it refused to progress to protect your data. Otherwise you would have a great chance to lose everything.
However I think it's too cautious. Ntfsresize being open source, here is a modified version that will let you resize partitions on dying disk: http://www.bodden.de/misc/ntfsrecovery/ NOTE: BACKUP! You really can lose the data because your disk is not reliable. Of course the unrepairable disk errors won't be fixed either, only hacked around by ignoring them. If you run chkdsk /r then they will reappear again. Unfortunately they will stay there forever and you should expect more as time goes. Good luck! |
All times are GMT -5. The time now is 03:49 AM. |