LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   [SOLVED] Harddrive was replaced, now I cant mkfs it cause its in use? (https://www.linuxquestions.org/questions/linux-hardware-18/%5Bsolved%5D-harddrive-was-replaced-now-i-cant-mkfs-it-cause-its-in-use-4175512848/)

Foxhound 08-05-2014 04:11 AM

Sorry for the long delay before replying. I had to go to the beach and enjoy the sun for some days (yep, I have no saying in that) :)

Anyway, I have executed both commands you have given me and afterwards rebooted the server.
So, I created the partition again however if I now run my mkfs command I get the following error:
Code:

Invalid argument passed to ext2 library while setting up superblock
That on itself is also weird cause I run this command:
Code:

mkfs -t ext3 /dev/sdb1

This is how my sdb drive looks:

Device Boot Start End Blocks Id System
/dev/sdb1 1 91201 732572001 5 Extended


I did some searching for the error and I find mostly some weird chinese websites which are of no use but I also found this:
http://www.iamlinux.com/2014/06/gett...ing-partition/
I dont understand that though, as I only have one partition as extended only allows one. So how can it not allow more than one if I only have one?


I am really sorry that this just keeps on going and I hope you are still willing to share your knowledge with me about all this. It is truly very much appreciated :)

rknichols 08-05-2014 08:43 AM

Quote:

Originally Posted by Foxhound (Post 5215299)
This is how my sdb drive looks:

Device Boot Start End Blocks Id System
/dev/sdb1 1 91201 732572001 5 Extended

An extended (type 5) partition is just a container for logical partitions. That type exists as a way to have more than the 4 allowed primary partitions. You can't use it directly. Using the partitioning tool of your choice, delete the existing partition 1 on that drive and create a Linux (type 83) partition in its place. You can then run mkfs to format a filesystem there. If you use a tool like gparted, it can create the partition and build the filesystem too.

Foxhound 08-05-2014 12:16 PM

Hmm yes, that sounds pretty logical.

I have deleted the partition again, now I need to wait till tomorrow before I can reboot cause this is a live website server so I can only reboot at quiet times, which are really never there but at around 6 in the morning only 500 or so users are online and they can wait a bit ;)
Once I have done the reboot I will make a "p" partition (I did choose extended before). I really hope that it will work than.

I will let you know how it goes! Thanks for all your help, really amazing and very much appreciated. :)



[edit]
Success! My 2nd harddrive is working again.
Thanks again for all your help!


All times are GMT -5. The time now is 12:57 AM.