[CentOS] Problem resizing partition of nfs volume

Dan Yamins dyamins at gmail.com
Thu Aug 12 22:29:53 UTC 2010


On Thu, Aug 12, 2010 at 6:21 PM, John R Pierce <pierce at hogranch.com> wrote:

>  On 08/12/10 2:56 PM, Dan Yamins wrote:
> > Hi:
> >
> > I have an NFS volume that I'm trying to resize a partition on.
> >
> > Something about the fdisk process is corrupting something on the drive
> >
> > Before running fdisk, I can mount the volume find:
> >
> > $ mount /dev/sdo1 /home
> >
> > ... and the volume is mounted fine.
> >
> > And,
> > $ e2fsck -f /dev/sdo1
> > /dev/sdo1: clean, ...
> >
> >
> > But then I run fdisk to rewrite the partition table of this drive, to
> > expand the /dev/sdo1 partition w/o losing data:
> >
> > $ fdisk /dev/sdo
> > # Type 'd' to delete the primary partition
> > # Type 'n' for new partition
> > # Type 'p' for primary
> > # Type '1' for 1st
> > # Type Enter for 1st cylinder
> > # Type Enter for last cylinder (full disk)
> > # Type 'w' to finish
> >
> > Calling ioctl() ...
> > Syncing disks ...
> >
> > But then something has gone wrong.
> >
> > $ e2fsck -f /dev/sdo1
> > e2fsck 1.39 (29-May-2006)
> > Couldn't find ext2 superblock, trying backup blocks...
> > e2fsck: Bad magic number in super-block while trying to open /dev/sdm1
> ...
> >
> >
> > And I can't mount the volume any more:
> > $ mount /dev/sdo1 /home
> > mount: you must specify the filesystem type
> >
> > What am I doing wrong? Am I missing a step of the process?
>
> yeah, you deleted your file system, then created a new empty partition.
>

Luckily I'm doing this via snapshots of an amazon EBS volume ... so this
whole thing was done on throw-away-able backup volume, which can be
recreated from the original volume at any time.   I've just done this, and
I've attached the newly-created volume to /dev/sdo.

Now I'm trying to use parted.

[root at domU-12-31-39-0E-B2-61 ~]# parted /dev/sdo
Error: Error initialising SCSI device /dev/sdo - Invalid argument

I _can_ do it on the volume path itself:

[root at domU-12-31-39-0E-B2-61 ~]# parted /dev/sdo1
Using /dev/sdo1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)

.. but this seems wrong, since I'm trying to edit the partition table not of
the partition /dev/sdo1 but of the drive itself.  ... Or perhaps I should
this?  (If so, could you give more explicit instructions?)

Perhaps because this is a network attached drive, something virtual that
amazon provides.    However, the reason I've written to the centOS list is
because the same procedure has worked fine with ubuntu images ... so it
didnt' seem like an amazon problem

Thanks!
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20100812/c8e204ca/attachment.html>


More information about the CentOS mailing list