1

Topic: NTFS resizing problem

Using GParted-0.16.1 Live CD to resize a NTFS partition. Disk has only one primary partition and was cloned from a smaller disk by Clonezilla.

When I attempt to resize this partition to add space, I see a yellow warning triangle. After checking the forums, I see that this may be caused by a NTFS volume that was shut down dirty so I had windows/xp check it at next boot. Still the yellow warning triangle. Next I ran "parted /dev/sda unit s print" with this output:

/dev/sda1  boot  63  156280319  78140128+  7  HPFS
Partition 1 does not start on physical sector boundry

Anybody know what is going on here?

Thanks in advance.

Perazim

2

Re: NTFS resizing problem

Is the physical sector size different between the source disk and the destination disk?

You can check using the following command on each of the disks:

sudo parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

See also Partition does not start on physical sector boundary?

3

Re: NTFS resizing problem

The command
sudo fdisk
too gives info on the logical/physical sector size of the hard drives.


You can try to run
chkdsk /r  (or chkdsk /f  or chkdsk /x )
for the partition in question within the dos window (not scheduling to the next reboot) and allow the system to unmount the filesystem.
This is valid of course only with partitions other than the xp system partition. The running system couldn't unmount its own partition.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

4

Re: NTFS resizing problem

Thanks for the replies. I have been away for a few days.

The cloned system has been working for the last week but I cannot grow the ntfs filesystem.

The source disk was 6 years old with 512k sectors and the new disk with 4096k sectors. The new disk has the C: partition starting at sector 63 and not 64 so this is the cause of the warning. I have been trying to figure out howto move the partition up by just one sector but gparted doesn't show the preexisting 63 sectors (it shows the partition beginning at the very front of the disk). Maybe I need to use another utility to adjust this?

Thanks,

Perazim

5

Re: NTFS resizing problem

The system can work even with this bad alignment, although not in optimum conditions.

The actual default for many operating systems is to start the first partition at 1 MiB. This is the default for GParted too. The MiB is used because it is compatible with the 4096 byte/sector drives, SSD drives and newer GPT partition table.
So, you can use GParted to move the partition with 1 MiB space "before". You have to keep the default Align to MiB option.
After moving, you have to fix the boot configuration, using the o.s. install CD/DVD. Please, look at the help/documentation page for details (FAQ, #14.15,16).
Next, you can grow the partition to take the entire disk space or make new partitions in the unallocated space.

I don't know any "automatic" utility that would relocate the partition by just 1 sector (in fact 1 logical sector that is the 1/8 of a physical sector). I'm afraid it would be extremely slow. GParted doesn't provide any option for arbitrary alignment, as this wouldn't have any real practical use. The software would be much more complicated, with more chances for bugs.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

6

Re: NTFS resizing problem

Sorry to keep asking maybe the same questions again but I want to make sure I understand before pushing start.

What I need to do is grow the existing ntfs partition.

I SEEM to be blocked by this by the yellow warning flag for the ntfs partition. Do I understand correctly that this is displayed because the partition does not start at a physical sector boundry of this new drive or is there some other condition that can cause this? 

If caused by a boundry misalignment then I need to correct that to grow the ntfs partition.

If not then I have another problem.

I have an extra drive so I can clone to this second drive and then initialize the partition table and copy back the ntfs partition this time to the correct position.

Thanks,

Perazim

7

Re: NTFS resizing problem

The yellow warning triangle can appear in various conditions. By clicking on it you can read its content and post it here. 

It can be a mounted partition (mounted partitions remain locked for move/resize operations), unhealthy filesystem, hardware issues ... .
The GParted livecd doesn't mount any partition by default.
Misalignment to the physical sectors isn't normally a reason to block the partition, because this is the manner to properly align it.
It is perhaps just a warning to make us more careful during partition manipulations. (I have no misaligned drive nearby just now to check it myself. I aligned the last one about 1 year and half ago but I don't remember details).

gparted doesn't show the preexisting 63 sectors (it shows the partition beginning at the very front of the disk).

Please, run the command
sudo fdisk -lu /dev/sd...
for the hard drive in question (put the letter used by GParted for it in the place of ... ), and post the output here.
It shows the exact partition limits in sector precision.
Furthermore, by selecting properties of a selected partition in the GParted menus, you can read such info too.
The first 63 sectors don't appear because they can't be part of any partition, according to the legacy Master boot sector rules.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

8

Re: NTFS resizing problem

This is solved.

The bad sector list was copied by ntfsclone to the new drive. I had to clear it with ntfstruncate, run chkdsk /f, restart twice and I could then resize the partition with Gparted.

Thanks for the help.

Perazim

9

Re: NTFS resizing problem

Good news.
You can mark the thread solved by editing your first post to add [SOLVED] to the title.

*** It is highly recommended to backup any important files before doing resize/move operations. ***