FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-12-2010, 09:56 PM
Dan Yamins
 
Default Problem resizing partition of nfs volume

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?


Thanks!
Dan



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-12-2010, 10:21 PM
John R Pierce
 
Default Problem resizing partition of nfs volume

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.

instead, you should have used parted(8) or similar to expand the
partition, then used resize2fs(8) to expand the file system on this
partition to its new size.

me, I'd strongly suggest doing a full backup of the partition first with
dump(8)


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-12-2010, 10:25 PM
David Véjar
 
Default Problem resizing partition of nfs volume

cuak

David Véjar

Soporte y Redes



Ferretería Santiago

Soluciones de Abastecimiento

Lira 919 Santiago, Chile

Fono: (56 2) 731 3824



www.ferreteriasantiago.cl

-----Mensaje original-----
De: centos-bounces@centos.org [mailto:centos-bounces@centos.org] En nombre
de John R Pierce
Enviado el: jueves, 12 de agosto de 2010 18:22
Para: CentOS mailing list
Asunto: Re: [CentOS] Problem resizing partition of nfs volume

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.

instead, you should have used parted(8) or similar to expand the
partition, then used resize2fs(8) to expand the file system on this
partition to its new size.

me, I'd strongly suggest doing a full backup of the partition first with
dump(8)


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-12-2010, 10:29 PM
Dan Yamins
 
Default Problem resizing partition of nfs volume

On Thu, Aug 12, 2010 at 6:21 PM, John R Pierce <pierce@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@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@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



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-12-2010, 10:32 PM
Dan Yamins
 
Default Problem resizing partition of nfs volume

On Thu, Aug 12, 2010 at 6:25 PM, David Véjar <dvejar@ferreteriasantiago.cl> wrote:

cuak


?
*


-----Mensaje original-----

De: centos-bounces@centos.org [mailto:centos-bounces@centos.org] En nombre

de John R Pierce

Enviado el: jueves, 12 de agosto de 2010 18:22

Para: CentOS mailing list

Asunto: Re: [CentOS] Problem resizing partition of nfs volume



*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.



instead, you should have used parted(8) or similar to expand the

partition, then used resize2fs(8) to expand the file system on this

partition to its new size.



me, I'd strongly suggest doing a full backup of the partition first with

dump(8)





_______________________________________________

CentOS mailing list

CentOS@centos.org

http://lists.centos.org/mailman/listinfo/centos



_______________________________________________

CentOS mailing list

CentOS@centos.org

http://lists.centos.org/mailman/listinfo/centos



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-12-2010, 10:50 PM
Dan Yamins
 
Default Problem resizing partition of nfs volume

instead, you should have used parted(8) or similar to expand the

partition, then used resize2fs(8) to expand the file system on this

partition to its new size.



So I'm trying parted on a new, clean volume created from the snapshot, attached to /dev/sdm* As I explained before, I can't do


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


I CAN do parted on the path:

$ parted /dev/sdm1

GNU Parted 1.8.1
Using /dev/sdm1
Welcome to GNU Parted! Type 'help' to view a list of commands.

But then i get this error:

(parted) resize 1 0 500GB
Error: The location 500GB is outside of the device /dev/sdo1.



Which is course is true ...

(parted) print********************************************* **************
Disk /dev/sdm1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop


Number* Start** End**** Size*** File system* Flags

*1***** 0.00kB* 21.5GB* 21.5GB* ext3****


So I'm not sure where to go from here...
thanks!
Dan


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2010, 12:32 AM
Yves Bellefeuille
 
Default Problem resizing partition of nfs volume

On Thursday 12 August 2010 17:56, Dan Yamins wrote:

> I have an NFS volume that I'm trying to resize a partition on.

I suggest you try Parted Magic: http://partedmagic.com/

It doesn't do anything you can't do from the command line, but it's much
easier to use.

--
Yves Bellefeuille <yan@storm.ca>
"Au Bellefeuille estas malkompetenta juristo au li estas malhonesta;
kaj ech tertium datur: ambau malvirtoj en unu homo." -- Heroldo
Komunikas, n-ro 447.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2010, 02:22 AM
Dan Yamins
 
Default Problem resizing partition of nfs volume

I was just shown the solution to my problem, using the "sfdisk" program instead of the "fdisk" or "parted" programs.*** Apparently "parted" could not work because the drive is not really SCSI, and the "fdisk" program is to "incorrect" and was overwriting a portion of the disk.** however, "sfdisk" turns out to be more correct -- although more cumbersome to use.


Dan

On Thu, Aug 12, 2010 at 8:32 PM, Yves Bellefeuille <yan@storm.ca> wrote:

On Thursday 12 August 2010 17:56, Dan Yamins wrote:



> I have an NFS volume that I'm trying to resize a partition on.



I suggest you try Parted Magic: http://partedmagic.com/



It doesn't do anything you can't do from the command line, but it's much

easier to use.



--

Yves Bellefeuille <yan@storm.ca>

"Au Bellefeuille estas malkompetenta juristo au li estas malhonesta;

kaj ech tertium datur: ambau malvirtoj en unu homo." -- Heroldo

Komunikas, n-ro 447.

_______________________________________________

CentOS mailing list

CentOS@centos.org

http://lists.centos.org/mailman/listinfo/centos



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org