Hi

Albretch Mueller wrote:
>   I am trying to resize an ntfs partition of a laptop which hasn't
> really been abused much
>
>   Process logs have been included below. I haven't been able to find a
> comprehensive step-by-step guide after I run into some problems I have
> read from your archives I should use ntfsinfo and ntfstruncate first
> to troubleshoot those issues and I did find also posts such as:
>
>   http://ubuntuforums.org/showthread.php?t=1244058
>
>   Could you tell me what steps I should go from there?
>
>   Any "best-practive" documentation out there you could suggest to me?

There are bad sectors on your disks. Five of them have been
marked as such, but there can be other ones which have not
yet found bad and not marked. Above all, errors in reading
or writing may result from mechanical wear, and not related
to a specific sector. So there is no general rule about what
you should do.

ntfsresize is a user-space application. If it is buggy, it
may lead to segmentation fault or other user-space faults.
If you got kernel panics, there is something really bad at
a lower level (hardware, disk driver, etc.)

I such situation, first backup everything before trying
anything else.

ntfsinfo may be useful for assessing the situation, I see
no useful use of ntfstruncate.

>
>   Thank you
>   lbrtchx
>
> $ sudo ntfsresize --info /dev/sda2
> ntfsresize v2.0.0 (libntfs 10:0:0)
> Device name        : /dev/sda2
> NTFS volume version: 3.1
> Cluster size       : 4096 bytes
> Current volume size: 248485245440 bytes (248486 MB)
> Current device size: 248485249024 bytes (248486 MB)
> ERROR: This software has detected that the disk has at least 5 bad sectors.
> ****************************************************************************
> * WARNING: The disk has bad sector. This means physical damage on the disk *
> * surface caused by deterioration, manufacturing faults or other reason.   *
> * The reliability of the disk may stay stable or degrade fast. We suggest  *
> * making a full backup urgently by running 'ntfsclone --rescue ...' then   *
> * run 'chkdsk /f /r' on Windows and rebooot it TWICE! Then you can resize  *
> * NTFS safely by additionally using the --bad-sectors option of ntfsresize.*
> ****************************************************************************
>
> $ date; time sudo ntfsresize --no-action --verbose --bad-sectors
> --force --size 224G /dev/sda2; date
> Mon Dec  2 10:04:13 UTC 2013
> ntfsresize v2.0.0 (libntfs 10:0:0)
> Device name        : /dev/sda2
> NTFS volume version: 3.1
> Cluster size       : 4096 bytes
> Current volume size: 248485245440 bytes (248486 MB)
> Current device size: 248485249024 bytes (248486 MB)
> New volume size    : 223999996416 bytes (224000 MB)
> Checking for bad sectors ...
> Bad cluster: 0x61a2e1 - 0x61a2e1    (1)
> Bad cluster: 0x2b77791 - 0x2b77791    (1)
> Bad cluster: 0x2e62c21 - 0x2e62c21    (1)
> Bad cluster: 0x35cd2b9 - 0x35cd2b9    (1)
> Bad cluster: 0x3687afa - 0x3687afa    (1)
> WARNING: This software has detected that the disk has at least 5 bad sectors.
> WARNING: Bad sectors can cause reliability problems and massive data loss!!!
> Checking filesystem consistency ...
> 100.00 percent completed
> Accounting clusters ...
> Space in use       : 43160 MB (17.4%)
> Collecting resizing constraints ...
> Needed relocations : 43652 (179 MB)
> Schedule chkdsk for NTFS consistency check at Windows boot time ...
> Resetting $LogFile ... (this might take a while)
> Relocating needed data ...
> Relocate record      49:0x80:00043650:0x00000000:0x035cd2ba --> 0x0036a598
> Updating $BadClust file ...
> Updating $Bitmap file ...
> Updating Boot record ...
> The read-only test run ended successfully.
>
> real  0m13.615s
> user  0m1.647s
> sys   0m2.113s
> Mon Dec  2 10:04:26 UTC 2013
>
> $ date; time sudo ntfsresize --verbose --bad-sectors --force --size
> 224G /dev/sda2 >  /media/sdb1/RBSCC/ntfsresize02.log  2>&1; date
>
> Mon Dec  2 10:09:02 UTC 2013
>
> real  0m0.479s
> user  0m0.103s
> sys   0m0.073s
> Mon Dec  2 10:09:03 UTC 2013
>
>
> ntfsresize v2.0.0 (libntfs 10:0:0)

This is a very old ntfsresize. Please use a recent version.

> ERROR(95): Opening '/dev/sda2' as NTFS failed: Operation not supported
> The NTFS journal file is unclean. Please shutdown Windows properly before
> using this software! Note, if you have run chkdsk previously then boot
> Windows again which will automatically initialize the journal correctly.

Please do just that, then backup everything. A previous ntfsresize
may have left your device in an invalid state. After that you
can try to resize, and if it fails again the same way, best to
get a new disk.

Regards

Jean-Pierre




------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to