[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shrink partition with fdisk



On Sun, Sep 29, 2002 at 06:46:37PM -0400, Brian Stults wrote:
> 
> I just used resize_reiserfs to shrink a reiserfs partition.  It worked 
> fine, and df is reporting the device size that I expected.  However, 
> fdisk still reports the old size.  How can I shrink the partition in 
> fdisk so it reports the correct size, without harming the contents of 
> the device?  I'm assuming that if I simply delete the partition in 
> fdisk, and then re-create it smaller, my data will be lost.
> 

Did you reboot the machine after altering the partition table? I know
when I have used some of the partitioning software, I had to reboot the
machine. It has something to do with the kernel having to re-read the
partition table.

Anyway, why are you using fdisk? From its man page:

BUGS
       There are several *fdisk programs around.  Each has  its  problems  and
       strengths.   Try  them  in  the	order cfdisk, fdisk, sfdisk.  (Indeed,
       cfdisk is a beautiful program that has strict requirements on the  par-
       tition  tables  it accepts, and produces high quality partition tables.
       Use it if you can.  fdisk is a buggy program that does fuzzy  things  -
       usually	it happens to produce reasonable results. Its single advantage
       is that it has some support for BSD disk labels and other non-DOS  par-
       tition  tables.	Avoid it if you can.  sfdisk is for hackers only - the
       user interface is terrible, but it is more correct than fdisk and  more
       powerful  than  both fdisk and cfdisk.  Moreover, it can be used nonin-
       teractively.)

-Andy



Reply to: