Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I got two disks that were previously part of a RAID setup. On my current setup I have no RAID so I just want to format and mount to move some files onto these disks.
What I did is the following:
Selected the disk using fdisk (fdisk /dev/sdc), deleted all partitions (d), created a new primary partition (n, p), changed the partition type to Linux (t, 83) and write the changes to disk (w).
This created partition /dev/sdc1. I can see this correctly when I use "fdisk -l".
However when I try to format the disk using the command "mkfs.ext4 /dev/sdc1" I get the error message "/dev/sdc1 is apparently in use by the system; will not make a filesystem here!".
What I find strange is that if I try to mount (mount /dev/sdc1 /media/backup) I get the error message "mount: unknown filesystem type 'linux_raid_member'".
I suspect that you were on the correct track. Use fdisk (Actually a recent version of gparted may be better) and create a DOS partition table, then define a partition type linux and write out the changes. Now reboot the machine. No, this is not reasonable or logical but I have seen it help before.
THEN, after the reboot, see if you can use mkfs to format the partition.
Couple of key points here:
1. do NOT just manipulate the partitions in the existing table, actually overwrite the partition table with a new one.
2. If the disk is too large, you may have issues with older programs or formats. You did not present information about what your base install consists of or the disk details.
3. on a very few disks I have had to scrub the disk (this can be done with dd, but there are programs that specifically take care of this) to remove all formatting and all partition table (as well as zapping the MBR space).
4. If that all fails, consider if you have a hardware mismatch or failure issue. Why were these retired from the raid array? If they are SMART drives, a diagnostic run may be in order.
In the end I finished using dd, however now when I mount I get the following message:
[root@mylinux ~]# mount /dev/sdc1 /mnt/backup1/
mount: /dev/sdc1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
I just used fdisk to create the partition. What did I miss?
I had forgot to do that. Now it works. Many thanks.
I just have one lat question on this; why do I get "WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion." on one of the disks when I enter the command fdisk -l?
Quote:
Originally Posted by wpeckham
After creating a partition, did you create a file system on the partition?
I had forgot to do that. Now it works. Many thanks.
I just have one lat question on this; why do I get "WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion." on one of the disks when I enter the command fdisk -l?
The traditional DOS style partition in use since IBM-DOS v1 and still in use today is MBR partition tables. GPT partition tables are the new format released by Microsoft and used by WinXP Pro 64-bit and later, and Windows Server 2003 SP1 and later. GPT became the base for and part of the UEFI definition, and is considered a successor partitioning format for Microsoft systems.
There is support for UEFI and GPT under recent versions of Linux, but the tools are not nearly as mature as those for MBR.
Personally, when I repartition a disk for Linux I always use MBR. There is noting wrong with using GPT, and for certain disks (LARGE ones) that you might want to partition in ways not supported by MBR there can be some significant advantage.
In this case you must have a GPT partition and the tool is letting you know that support for it in that tool is considered experimental. I would not worry about that much. If you can easily repartition using MBR I would, but if that is not convenient you can simply ignore that message.
I get this message under /dev/sdc which is the drive which I dd'd and created a new partition using fdisk. Also I did the same proceedure on another disk (/dev/sdd) but that one doesn't show such a message.
Code:
...
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes, 1953525168 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
Disk label type: dos
Disk identifier: 0x7884bfa6
Device Boot Start End Blocks Id System
/dev/sdd1 2048 1953525167 976761560 83 Linux
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xad3f14c7
Device Boot Start End Blocks Id System
/dev/sdc1 2048 1953525167 976761560 83 Linux
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Quote:
Originally Posted by wpeckham
In this case you must have a GPT partition and the tool is letting you know that support for it in that tool is considered experimental. I would not worry about that much. If you can easily repartition using MBR I would, but if that is not convenient you can simply ignore that message.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.