LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2010, 12:48 PM   #1
Entwicklung
Member
 
Registered: Jun 2005
Location: North Carolina
Distribution: Fedora 22, OpenSuSE LEAP
Posts: 53

Rep: Reputation: 15
Re-sizing an NTFS partition


I have tried ntfsresize with the partition mounted and unmounted, and get the same error message: Illegal new volume size. I have also tried many different volume sizes and all get same message.
Attached Thumbnails
Click image for larger version

Name:	ntfsresize.png
Views:	14
Size:	18.5 KB
ID:	3849  
 
Old 06-15-2010, 01:48 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
What size is the drive? Is there anything but empty space after the disk? Can you post the output of fdisk -l?

I've typically used the gui for GParted for this because I'm lazy. It's graphical and does things like make sure the size is at cylinder ends, etc.
 
Old 06-15-2010, 01:49 PM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
You can't resize a partition with ntfsresize. You can resize the file system on a partition, but not the partition itself. enlarge the partition first using any other tool, then use ntfsresize to enlarge the file system to the size of the partition.

Quote:
To resize a filesystem on a partition, you must resize BOTH the
filesystem and the partition by editing the partition table on the
disk. Similarly to other command line filesystem resizers, ntfsresize
doesn’t manipulate the size of the partitions, hence to do that you
must use a disk partitioning tool as well, for example fdisk(8).
http://manpages.ubuntu.com/manpages/...sresize.8.html
 
Old 06-15-2010, 02:09 PM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
It is a lot easier to use a GUI tool such as gparted that does the whole job, rather than try to use the underlying partition and filesystem tools that each do only part of the job.

Also, if you want to shrink a Windows XP partition, it is best to defrag it inside Windows before shrinking it via Linux. If you want to change the size of a Vista or Windows 7 partition, it may be best to do that from inside Windows.
 
Old 06-15-2010, 02:21 PM   #5
Entwicklung
Member
 
Registered: Jun 2005
Location: North Carolina
Distribution: Fedora 22, OpenSuSE LEAP
Posts: 53

Original Poster
Rep: Reputation: 15
Re-sizing and NTFS partition

Attaching results of fdisk -l

This is a disk that had Windows XP on it once. I deleted it. I don't need it, not going to use it. The disk does have some windows programs that I will want to run with wine. I just want to resize the partition because it's simply taking up too much space.
Attached Thumbnails
Click image for larger version

Name:	fdisk.png
Views:	13
Size:	51.2 KB
ID:	3850  
 
Old 06-15-2010, 07:42 PM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
So /dev/sdb1 contains files you'd like to keep, but does not contain Windows itself, correct? And your goal is to reduce the size of this partition in half, correct?

You may need to defragment the partition before you can resize it down with Gparted. Try using one of the defrag tools on UBCD4Win.
 
Old 06-15-2010, 10:02 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
zip the whole enchlada to a file and then delete the partition or at least reformat it. Then move the files back.
 
1 members found this post helpful.
Old 06-15-2010, 10:45 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Try removing the -f (or put it first). May be a parameter parsing error.
I have never had it fail to resize a clean NTFS - and the need to defrag went away (ntfsprogs) years ago.

Last edited by syg00; 06-15-2010 at 10:46 PM.
 
1 members found this post helpful.
Old 06-16-2010, 11:20 AM   #9
Entwicklung
Member
 
Registered: Jun 2005
Location: North Carolina
Distribution: Fedora 22, OpenSuSE LEAP
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
Try removing the -f (or put it first). May be a parameter parsing error.
I have never had it fail to resize a clean NTFS - and the need to defrag went away (ntfsprogs) years ago.
I thought this was going to work but the attached screenshot says otherwise. How serious is the message that I need to run chkdsk /f?
Attached Thumbnails
Click image for larger version

Name:	ntfsresize.png
Views:	11
Size:	56.7 KB
ID:	3862  
 
Old 06-16-2010, 11:26 AM   #10
Entwicklung
Member
 
Registered: Jun 2005
Location: North Carolina
Distribution: Fedora 22, OpenSuSE LEAP
Posts: 53

Original Poster
Rep: Reputation: 15
This is a better screenshot. Shows that I did what previous shot advised, free less space.
Attached Thumbnails
Click image for larger version

Name:	better.png
Views:	7
Size:	35.9 KB
ID:	3863  
 
Old 06-16-2010, 11:50 AM   #11
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Try running ntfsresize -nfs 144G /dev/sdb1 a couple of times. This should run a "test" operation which doesn't make any changes, but I believe it resets the chkdsk flag because it opens it read only.

Short of that, I think chkdsk is included on UBCD4win.

Last edited by pljvaldez; 06-16-2010 at 11:57 AM.
 
1 members found this post helpful.
Old 06-16-2010, 07:41 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Note that I said "I have never had it fail to resize a clean NTFS"
The requirement to run chkdsk is not that unusual - standard Windoze utility. Bit more of a PITA to get it to run these days. NTFS has remained proprietary - there's always the possibility of needing to do this. Good reason not to use it if you are Linux only.
 
1 members found this post helpful.
Old 06-16-2010, 10:42 PM   #13
Entwicklung
Member
 
Registered: Jun 2005
Location: North Carolina
Distribution: Fedora 22, OpenSuSE LEAP
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jefro View Post
zip the whole enchlada to a file and then delete the partition or at least reformat it. Then move the files back.
I think this is what I'm going to do. Nothing else is working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
re-sizing existing partition on RHEL 4 khalil_noura Linux - Newbie 1 10-29-2008 03:28 AM
re-sizing the Windows XP main C partition james2b Linux - Newbie 3 03-27-2008 12:20 AM
Re-sizing a partition.. ranjitcool Linux - Software 4 12-23-2006 07:11 PM
Mandrake 9.1 Installation Problems : Partition Sizing moothecow2k Linux - Newbie 3 08-04-2003 06:57 PM
Partition sizing dummy Linux - Newbie 4 11-04-2002 09:04 PM


All times are GMT -5. The time now is 01:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration