Somehow I have an ext4 filesystem in /dev/sdb. I expected it to be /dev/sdb1.
I can mount it manually; I can access the data; I can reference it in /etc/fstab; etc, but I want it in a standard partition.
I don't want to lose the data, and there isn't enough room on the drive to duplicate it into another partition. It's not a lot of data: I can always move it to an external device, fix the fs, then move it back, but now I'm curious :)
Is there a method to either remap or move the data into /dev/sdb1 (which, as of now, doesn't exist)?
fdisk gives the following:
$ sudo fdisk /dev/sdb1 fdisk: cannot open /dev/sdb1: No such file or directory $ sudo fdisk /dev/sdb Device /dev/sdb already contains a ext4 signature. The signature will be removed by a write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x4096cdf8. Command (m for help): p Disk /dev/sdb: 200GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4096cdf8
Yes, this is a very small drive! I'm using Debian Stretch in a VirtualBox vm.
The response to df:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sdb 196G 116G 71G 63% /media/mymountdir
I understand that, as @MarkPlotnick states, I can do this fairly painlessly since I'm in a vm. But I would like to know if there is a cli-based method. Thanks!