LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   trouble mounting a newly created partition (https://www.linuxquestions.org/questions/linux-hardware-18/trouble-mounting-a-newly-created-partition-301716/)

tauceti38 03-14-2005 11:07 PM

trouble mounting a newly created partition
 
I recently decided to try an resize my windows partition (/dev/sda1) from around 60 gigs to 16 gigs, so I'd have more space for linux . After working with it for a while, I managed to resize the windows partition using qtparted, run from knoppix, but I was unable to do anything with the space I freed up. It was listed as hidden, and I was unable to use the create function. So I started looking into fdisk, and managed to create /dev/sda3 so that it occupied the black area of my hard drive. Unfortuntaly, I haven't been able to figure out how to access it.

I added this entry to my fstab file:
Code:

/dev/sda3              /mnt/data              ext3    users,owner,rw,umask=000 1
I have created a /mnt/data folder, so I don't believe that has to do with the problem. I also tried ext2 and auto for the filesystem, but neither worked.

Attempts to mount it from the command line, or from Fedora's disk managment program generate the error:
Code:

mount: wrong fs type, bad option, bad superblock on /dev/sda3, or too many mounted file systems.
I've tried switching the file system to ext2, and also tried auto, but recieved an error saying it couldn't determine the file type.

Here is a list of my drives, found with fdisk -l
Code:

/sbin/fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        2089    16779861    7  HPFS/NTFS
/dev/sda2            7706        9729    16257780    5  Extended
/dev/sda3            2090        7705    45110520  83  Linux
/dev/sda5            7706        8725    8193118+  83  Linux
/dev/sda6            8726        8856    1052226  82  Linux swap
/dev/sda7            8857        9729    7012341    b  W95 FAT32

Partition table entries are not in disk order

I also tried cleaning/formating it with mke2fs, but that had no effect. Here is the output generated by mke2fs
Code:

/sbin/mke2fs /dev/sda3
mke2fs 1.35 (28-Feb-2004)
max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5641440 inodes, 11277630 blocks
563881 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
345 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Writing inode tables: done
inode.i_blocks = 106504, i_size = 4243456
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

I also tried running this command, which was suggested in another thread found here, but it didn't seem to do anything:
Code:

/sbin/mkfs.ext3 -L /mnt/data /dev/sda3
mke2fs 1.35 (28-Feb-2004)
max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label=/mnt/data
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5641440 inodes, 11277630 blocks
563881 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
345 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Writing inode tables: done
inode.i_blocks = 106504, i_size = 4243456
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

I'm using Fedora Core 3, kernel 2.6.10-1.770_FC3. I've search for other possible solutions, but haven't been able to come up with anything else, and would appreciate any help you could offer

gerardt 03-15-2005 12:26 AM

The mkfs.ext3 -L just created a label called /mnt/data. This means you can have the fstab entry as

/mnt/data /mnt/data ext2 <options> 0 0

You formatted it as ext2 so unless you use tune2fs to turn it into ext3 the type must be ext2. try running e2fsck on your partition. Let us know what happens.

doc.nice 03-15-2005 07:55 AM

hmm, after using the mkfs.ext3 command (your code block) you should have a working ext3 (not ext2 as said in the post before) partition on device /dev/sda3.

try mounting it manually as root with
mount -t ext3 /dev/sda3 /mnt/data
and give us the result.
the e2fsck output might also be helpful.

btw:
you can also fix the partition table order manually if you want so, but probably this is not the problem:
(WARNING: no responsibility for data loss in case you make an error)

1) write down the fdisk output (the starting and ending sectors and types)
2) delete sda2-sda7
3) add sda2 with the information of sda3 (as primary partition)
4) add sda3 with the information of sda2 (as extended partition)
5) add sda5-sda7 with their own information (as logical partitions)

now your linux partition will be /dev/sda2 and the extended partition is sda3, but this will not make problems with the logical partions neither in win nor in linux, only the new partition has it's new name and they are called in their physical order on disk.

tauceti38 03-15-2005 10:42 AM

I tried changing my fstab entry as gerardt suggested, but I get the error "mount: /mnt/data is not a block device" when trying to access it. I could mount the partition with the command given by doc.nice after changing the fstab entry back to include /dev/sda3 instead of /mnt/data, but I still recieve the error "mount: wrong fs type, bad option, bad superblock on /dev/sda3, or too many mounted file systems" when I try to mount it using fedora's disk managment device. Also, it does not mount when I boot up the computer, like my other drives. I'd prefer to have that working, or a way to macro the command that worked, but at least I can access it now.

Running e2fsck generated this:
e2fsck 1.35 (28-Feb-2004)
/mnt/data: clean, 13/5641440 files, 198560/11277630 blocks

doc.nice 03-15-2005 10:55 AM

hm, the file system seems to be ok.

did the manual mount command from my post work without an error?
if there was an error, try executing the command in knoppix (using /mnt/test as target,
i think that does exist or create /mnt/data)

if there was no error, you can use the following line in your fstab as it does exactely the same. (the auto option means mounting automatically on system startup):
Code:

/dev/sda3    /mnt/data    ext3    defaults,auto
(whitespace as much as you want, at least one space/tab between each statement)

after adding this, you can mount all auto-lines with "mount -a"
(no problem for already mounted devices)
then, the disk should be accessible.

if there are still errors, just type "mount" and give us the result...

tauceti38 03-15-2005 12:22 PM

That seems to have worked, I didn't even have to run mount -a, it was already accessible after rebooting. Thank you very much for all your help.

doc.nice 03-16-2005 03:40 AM

no problem, just to mention it:
I forgot to add the last two fields for the fstab entry:
0 0 (see man fstab for meaning (one is for automatic checking on bootup, the other is for backup)

you didn't have to use the mount command as it already was mounted by the last try...


All times are GMT -5. The time now is 06:44 AM.