Not able to mke2fs on new disk partition

KEVIN ZEMBOWER KZEMBOWER at jhuccp.org
Thu Nov 21 15:57:00 CST 2002


Man, things go so well when you've got more experienced people helping you:
centernet:/ # umount /opt/analog/logdata
centernet:/ # swapoff /dev/sdc5
centernet:/ # blockdev --rereadpt /dev/sdc
centernet:/ # mount /dev/sdc1 /opt/analog/logdata
centernet:/ # swapon /dev/sdc5
centernet:/ # mke2fs /dev/sdc3
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
366528 inodes, 732965 blocks
36648 blocks (5.00%) reserved for the super user
First data block=0
23 block groups
32768 blocks per group, 32768 fragments per group
15936 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done
centernet:/ # 

Thank you so much, Brad and Michael. The beer's on me when I'm in your city.

-Kevin

>>> "Sites, Brad" <BSites at mem-ins.com> 11/21/02 04:43PM >>>
Sorry, meant /dev/sdc? on all those!

Brad

-----Original Message-----
From: Sites, Brad 
Sent: Thursday, November 21, 2002 3:43 PM
To: 'KEVIN ZEMBOWER'; Linux-Poweredge at dell.com 
Subject: RE: Not able to mke2fs on new disk partition


Looks like you have a swap partition on that device as well.  You will
probably want to unmount that swap partition, as long as it isn't currently
in use.

# swapon -s

to show what swap partitions you have and what is used on each one.  If
there is nothing used on that swap partition, you can do:

# swapoff /dev/sd?    (? = device number)

Once you have unmounted the swap partition and the other partition you
mention, then try to mke2fs.

Don't forget to remount your swap partition with swapon /dev/sd? when you
are done, or it will be picked back up on next mount -a or reboot, however
you prefer.

HTH,
   .~.    Brad Sites
   /V\    Systems Administrator
  // \\   Missouri Employers Mutual Insurance
 /(   )\  bsites at mem-ins.com    www.mem-ins.com 
  ^^-^^   (573) 499-4230


-----Original Message-----
From: KEVIN ZEMBOWER [mailto:KZEMBOWER at jhuccp.org] 
Sent: Thursday, November 21, 2002 3:29 PM
To: Linux-Poweredge at dell.com 
Cc: michael_e_brown at dell.com 
Subject: Re: Not able to mke2fs on new disk partition


Thank you, Michael, for this suggestion. I didn't know this, and none of the
references I checked mentioned it.

However, I was still not able to mse2fs the partition. This is what I tried:
centernet:/ # mount
/dev/sda3 on / type ext2 (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdb1 on /usr type ext2 (rw)
/dev/sdb2 on /opt type ext2 (rw)
/dev/sda1 on /boot type ext2 (rw)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw)
/dev/sdc1 on /opt/analog/logdata type ext2 (rw)
centernet:/ # umount /opt/analog/logdata
centernet:/ # blockdev --rereadpt /dev/sdc
BLKRRPART: Device or resource busy
centernet:/ # cfdisk -Ps /dev/sdc
Partition Table for /dev/sdc

            First    Last
 # Type     Sector   Sector   Offset  Length   Filesystem Type (ID)   Flags
-- ------- -------- --------- ------ --------- ----------------------
---------
 1 Primary        0  8401994      63  8401995  Linux (83)             None
(00)
 2 Primary  8401995  9815714       0  1413720  Extended (05)          None
(00)
 5 Logical  8401995  9815714      63  1413720  Linux swap (82)        None
(00)
 3 Primary  9815715 15679439       0  5863725  Linux (83)             None
(00)
   Primary 15679440 35551844       0 19872405  Free Space             None
(00)
centernet:/ # mount /dev/sdc1 /opt/analog/logdata
centernet:/ # mke2fs /dev/sdc3
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
mke2fs: No such device or address while trying to determine filesystem size
centernet:/ # 

I also tried using fdisk (actually, I'm using cfdisk) to write the partition
table again, while the disk was unmounted. This also seemed to failed when I
tried to run mke2fs.

Can you see any boneheaded error I'm making?

Thanks, again for your help.

-Kevin

>>> Michael E Brown <michael_e_brown at dell.com> 11/21/02 01:32PM >>>
You cannot repartition a disk if any existing partition is mounted. Or, 
more accurately, fdisk _will_ write the new partition info to the disk, 
but the kernel will not reconfigure to recognize the new partition.

Unmount the existing partitions, then either "blockdev --rereadpt 
/dev/sdc", or go back into fdisk and write the partition table (no 
changes) back to the disk.
--
Michael

On Thu, 21 Nov 2002, KEVIN ZEMBOWER wrote:

> I'm trying to add disk capacity to my PowerEdge 2300 running SuSE 7.1.
I've previously added a third hard disk to the chassis, and have been using
parts of it successfully for a while now. This is not in a RAID array, just
three separate disks.
> 
> I can successfully partition some of the remaining free space on the disk,
but can't run mke2fs on it:
> 
> centernet:/ # cfdisk -Ps /dev/sdc
> Partition Table for /dev/sdc
> 
>             First    Last
>  # Type     Sector   Sector   Offset  Length   Filesystem Type (ID)
Flags
> -- ------- -------- --------- ------ --------- ----------------------
---------
>  1 Primary        0  8401994      63  8401995  Linux (83)             None
(00)
>  2 Primary  8401995  9815714       0  1413720  Extended (05)          None
(00)
>  5 Logical  8401995  9815714      63  1413720  Linux swap (82)        None
(00)
>  3 Primary  9815715 15679439       0  5863725  Linux (83)             None
(00)
>    Primary 15679440 35551844       0 19872405  Free Space             None
(00)
> centernet:/ # mke2fs /dev/sdc3
> mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
> mke2fs: No such device or address while trying to determine filesystem
size
> centernet:/ # mke2fs /dev/sdc3 2931862 
> mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
> mke2fs: No such device or address while trying to determine filesystem
size
> centernet:/ # ls -l /dev/sdc3
> brw-rw----    1 root     disk       8,  35 Jan 19  2001 /dev/sdc3
> 
> Am I overlooking something simple? In SuSE 7.1, there's a MAKEDEV.ide, but
no general MAKEDEV script. Do I need one?
> 
> Thanks for your time and suggestions.
> 
> -Kevin Zembower
> 
> 
> 
> -----
> E. Kevin Zembower
> Unix Administrator
> Johns Hopkins University/Center for Communications Programs
> 111 Market Place, Suite 310
> Baltimore, MD  21202
> 410-659-6139
> 
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at dell.com 
> http://lists.us.dell.com/mailman/listinfo/linux-poweredge 
> Please read the FAQ at http://lists.us.dell.com/faq or search the list
archives at http://lists.us.dell.com/htdig/ 
> 

_______________________________________________
Linux-PowerEdge mailing list
Linux-PowerEdge at dell.com 
http://lists.us.dell.com/mailman/listinfo/linux-poweredge 
Please read the FAQ at http://lists.us.dell.com/faq or search the list
archives at http://lists.us.dell.com/htdig/




More information about the Linux-PowerEdge mailing list