1

I'm trying to format and mount a 8TB external as an ext4 and it doesn't seem to work right. The drive is a Seagate 8TB expansion desktop drive. Model number is STEB8000402.

I can create my partition using gdisk:

sdc               8:32   0   7.3T  0 disk
└─sdc1            8:33   0   7.3T  0 part

But when I create the filesystem I get a weird error that says: “/dev/sdc1 is not a block special device.” however it seems to complete:

# mke2fs -t ext4 /dev/sdc1
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdc1 is not a block special device.
Proceed anyway? (y,n) y
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
246512 inodes, 984801 blocks
49240 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1008730112
31 block groups
32768 blocks per group, 32768 fragments per group
7952 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

Afterwards though, when mounting it doesn't seem to work and it mounts /dev/loop0 instead? I'm not even sure what that is and the filesystem is the wrong size.

/dev/loop0               4.0G   16M  3.7G   1% /mnt/test

I was reading apparently this is some new type of drive with sectors not in the normal place? Any help would be appreciated.

Giacomo1968
  • 58,727
acme64
  • 445

2 Answers2

5

My guess is you had created a regular file there somehow (or maybe a symlink to such file). Check it. If it was a block device then in the output of

ls -l /dev/sdc1

the first letter would be b; additionally

file /dev/sdc1

would say block special. If this is not the case, investigate what the object really is. It probably shouldn't be there in the first place. Note mounting a regular file uses a loop device, this fits your case.

If the object is indeed a regular file or a symlink, umount it, then remove (rm) or move (mv) it out of the way. Keep in mind mke2fs operated on the file, so if you already put any important data in the filesystem, it's in the file, not in the partition.

To recreate a proper /dev/sdc1 as a block device, invoke sudo partprobe. This assumes there is no problem with /dev/sdc and its partition table. You should also invoke mke2fs again because the partition wasn't even touched by your previous mke2fs.


A plausible cause of having a regular file there is writing an image file to /dev/sdc1 without making sure the target exists (normally as a block device). Such operation on an nonexistent target creates a regular file.

If the problem reappears (like after reboot, after connecting the external drive again) it means something recreates the file. This may be due to some poorly written script that assumes /dev/sdc1 always exists. Be warned such script can overwrite your actual partition when the drive is connected. Hopefully there is no script at all and the whole problem is because of one-time mishap as described above.

1

Your device might already have been partitioned and have a file system. You may need to first get rid of everything.

Use fdisk on the disk itself, /dev/sdc rather than on the partition /dev/sdc1:

sudo fdisk -cu /dev/sdc

If you have any existing partitions, first delete them using the command d, and finally w to write the partition table and exit.

Reissue fdisk -cu /dev/sdc and use n to create a new partition with maximum size and w again.

Check that everything is correct using fdisk -lu /dev/sdc.

You may finally format the new partition:

sudo mke2fs -t ext4 /dev/sdc1

Or alternatively:

sudo mkfs.ext4 /dev/sdc1
harrymc
  • 498,455