[opensuse] problem partitioning disk
I'm trying to re-partition a disk, and am getting errors that I don't understand. So I have a bunch of questions :( It's a new disk that I already partitioned but I've now changed my mind and want to completely reallocate the space. It's a 500 GB WD5001AALS-0 and appears as /dev/sdf. I was using yast partitioner in 11.2 and set up the new partitions I wanted but when it tried to create them, it gave me a message about system error code -1008 (I forget the exact text I'm afraid). I haven't managed to find any useful information about the error so my first question is whether anybody recognizes it? Now when I start yast partitioner it says: "The partitioning on disk /dev/sdf is not readable by the partitioning tool parted, which is used to change the partition table. You can use the partitions on disk /dev/sdf as they are. You can format them and assign mount points to them, but you cannot add, edit, resize, or remove partitions from that disk with this tool." Does anybody know what this actually means? Is there any documentation for the partitioner, as I haven't managed to find any? The drive passes the SMART health test. The partitioner shows two partitions (it's another annoying GUI that doesn't provide any way to export the text that I can see!): /dev/sdf1 1.01 GB Linux native Ext4 suse-11,2 1 132 /dev/sdf2 9.77 GB Linux native Swap swap * 133 1407 [ Note that sdf1 is not the running system, and I did swapoff /dev/sf2 before starting. ] When I run parted / print on the command line I see something different: Model: ATA WDC WD5001AALS-0 (scsi) Disk /dev/sdf: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1086MB 1086MB primary ext4 type=83 2 1086MB 11.8GB 10.7GB primary type=82 3 11.8GB 22.6GB 10.7GB primary type=83 fdisk and cfdisk both report the same info as parted. y2log has some information apparently from when the partitioner tried to repartition the disk: 2010-06-10 17:17:59 <1> scop4(11801) [libstorage] SystemCmd.cc(execute):90 SystemCmd Executing:"/usr/sbin/parted -s '/dev/sdf' mklabel msdos" 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(addLine):574 Adding Line 1 "Warning: Parted could not inform the kernel about eventual changes to partitions(s) 2 on /dev/sdf. This most likely means that the partition(s) is/are in use and parted could not determine whether the partition(s) have changed. As a result, the old partition(s) will remain in use until after reboot. If you know the partition(s) listed above have not changed, you can ignore this warning. Otherwise, you should reboot now before making further changes." 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(getUntilEOF):540 pid:12937 added lines:1 stderr:false 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(doExecute):296 system() Returns:0 There's a huge amount of information in that file, most of which looks like gobbledygook at first glance. I'll happily post some more if you can tell me what would be useful. Any thoughts on where to find more information or on what to do next would be appreciated! Thanks, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jun 11, 2010 at 7:32 AM, Dave Howorth
I'm trying to re-partition a disk, and am getting errors that I don't understand. So I have a bunch of questions :(
It's a new disk that I already partitioned but I've now changed my mind and want to completely reallocate the space. It's a 500 GB WD5001AALS-0 and appears as /dev/sdf.
I was using yast partitioner in 11.2 and set up the new partitions I wanted but when it tried to create them, it gave me a message about system error code -1008 (I forget the exact text I'm afraid). I haven't managed to find any useful information about the error so my first question is whether anybody recognizes it?
Now when I start yast partitioner it says:
"The partitioning on disk /dev/sdf is not readable by the partitioning tool parted, which is used to change the partition table.
You can use the partitions on disk /dev/sdf as they are. You can format them and assign mount points to them, but you cannot add, edit, resize, or remove partitions from that disk with this tool."
Does anybody know what this actually means?
Is there any documentation for the partitioner, as I haven't managed to find any?
The drive passes the SMART health test. The partitioner shows two partitions (it's another annoying GUI that doesn't provide any way to export the text that I can see!):
/dev/sdf1 1.01 GB Linux native Ext4 suse-11,2 1 132 /dev/sdf2 9.77 GB Linux native Swap swap * 133 1407
[ Note that sdf1 is not the running system, and I did swapoff /dev/sf2 before starting. ]
When I run parted / print on the command line I see something different:
Model: ATA WDC WD5001AALS-0 (scsi) Disk /dev/sdf: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 1 32.3kB 1086MB 1086MB primary ext4 type=83 2 1086MB 11.8GB 10.7GB primary type=82 3 11.8GB 22.6GB 10.7GB primary type=83
fdisk and cfdisk both report the same info as parted.
y2log has some information apparently from when the partitioner tried to repartition the disk:
2010-06-10 17:17:59 <1> scop4(11801) [libstorage] SystemCmd.cc(execute):90 SystemCmd Executing:"/usr/sbin/parted -s '/dev/sdf' mklabel msdos" 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(addLine):574 Adding Line 1 "Warning: Parted could not inform the kernel about eventual changes to partitions(s) 2 on /dev/sdf. This most likely means that the partition(s) is/are in use and parted could not determine whether the partition(s) have changed. As a result, the old partition(s) will remain in use until after reboot. If you know the partition(s) listed above have not changed, you can ignore this warning. Otherwise, you should reboot now before making further changes." 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(getUntilEOF):540 pid:12937 added lines:1 stderr:false 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(doExecute):296 system() Returns:0
There's a huge amount of information in that file, most of which looks like gobbledygook at first glance. I'll happily post some more if you can tell me what would be useful.
Any thoughts on where to find more information or on what to do next would be appreciated!
Thanks, Dave
IIRC, if you change the partition setup outside of yast, it gets confused and won't allow you to "modify" the partition setup. My assumption is that the yast-partitioner keeps config info somewhere and it compares that to the actual partition table. If they disagree you get the message your seeing. So your choice is to continue maintaining your partition setup outside of yast, or let yast blow away the current setup and start from scratch. Assuming your using a traditional partition table, you can also manually blow it away with: dd if=/dev/zero of=/dev/sdf count=1 Then force the kernel to re-read the partition table. I don't recall how, so I just reboot. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Greg Freemyer wrote:
IIRC, if you change the partition setup outside of yast, it gets confused and won't allow you to "modify" the partition setup.
I haven't changed the setup outside of yast. I did set up the original config using gparted under ubuntu (why can't I find gparted in the opensuse repositories?). But yast partitioner didn't complain when I first ran it. Only when it tried to change things.
My assumption is that the yast-partitioner keeps config info somewhere and it compares that to the actual partition table.
If they disagree you get the message your seeing.
So your choice is to continue maintaining your partition setup outside of yast, or let yast blow away the current setup and start from scratch.
Assuming your using a traditional partition table, you can also manually blow it away with:
dd if=/dev/zero of=/dev/sdf count=1
Then force the kernel to re-read the partition table. I don't recall how, so I just reboot.
The machine is doing more important things with most of its resources and that will take a week or so, so a reboot is not an option for now. A quick google turned up partprobe but when I run it :( # partprobe /dev/sdf Error: Error informing the kernel about modifications to partition /dev/sdf3 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sdf3 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. Error: Failed to add partition 3 (Device or resource busy) Warning: The kernel was unable to re-read the partition table on /dev/sdf (Device or resource busy). This means Linux won't know anything about the modifications you made until you reboot. You should reboot your computer before doing anything with /dev/sdf. I don't understand how /dev/sdf3 can be busy. (a) It has never been used. (b) there isn't actually an entry in the file system called /dev/sdf3 (there's just sdf, sdf1 & sdf2) ! Is it sensible to try the dd command and then repeat the partprobe? Another option I have is to remove the disk (it's SATA in a hot swap cage). I could then put it back in the same bay or in a different bay (which I think would make it appear as /dev/sdh since there's already a /dev/sdg). Would that enable the kernel and/or partitioner to untangle their kni*kers? Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010-06-11 15:17, Dave Howorth wrote:
The machine is doing more important things with most of its resources and that will take a week or so, so a reboot is not an option for now.
That's unfortunate.
A quick google turned up partprobe but when I run it :(
# partprobe /dev/sdf Error: Error informing the kernel about modifications to partition /dev/sdf3 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sdf3 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
The error is older, it is reported in the log you posted previously. What is happening is that the kernel "thinks" it knows the partitioning of that disk, and ignores that it changed later. Tools that attempt to repartition it will all fail.
I don't understand how /dev/sdf3 can be busy. (a) It has never been used. (b) there isn't actually an entry in the file system called /dev/sdf3 (there's just sdf, sdf1 & sdf2) !
Doesn't matter. What it matters is that the table and the kernel idea of the table are different. Why it happened is irrelevant now. In that sense, it is busy. Kind of.
Another option I have is to remove the disk (it's SATA in a hot swap cage).
You should have said that before! Yes, unplug it. Wait a minute or two, then plug it back in, same bay. You can watch the kernel log and see how the kernel recognizes its removal, and later the insertion. I has to work. Another method that might work is telling the kernel to rsync data. Let me see... No, I don't remember the command. - -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkwSmgUACgkQU92UU+smfQXHtQCghi+uxJNNQe0XQ7Baae4ujXQC cqgAn11oJNe+PDZ7Rcg5GMr+HvO4oCh9 =IrXI -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
The machine is doing more important things with most of its resources and that will take a week or so, so a reboot is not an option for now. That's unfortunate.
Indeed. As it happened, something caused a break in what it was doing :( But that meant I was able to reboot the machine and it all looks good now :)
What is happening is that the kernel "thinks" it knows the partitioning of that disk, and ignores that it changed later. Tools that attempt to repartition it will all fail.
Hmm, sounds like a bug to me. Either the tool or the kernel ought to be in a position to decide that the kernel needs to rebuild its table, which is presumably a safe (idempotent) operation or at least should be. Oh well.
Another option I have is to remove the disk (it's SATA in a hot swap cage).
You should have said that before! Yes, unplug it. Wait a minute or two, then plug it back in, same bay. You can watch the kernel log and see how the kernel recognizes its removal, and later the insertion.
I has to work.
OK thanks, I'll bear that in mind if there's a next time :) Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 11 Jun 2010 14:17:32 +0100
Dave Howorth
Greg Freemyer wrote:
IIRC, if you change the partition setup outside of yast, it gets confused and won't allow you to "modify" the partition setup.
I haven't changed the setup outside of yast. I did set up the original config using gparted under ubuntu (why can't I find gparted in the opensuse repositories?).
Look for gparted in openSUSE search at: http://software.opensuse.org/search <snip> Tom -- Tom Taylor - retired penguin openSuSE 11.3-M7 x86_64 KDE 4.4.3, FF 3.6.4 claws-mail 3.7.6 linxt-AT-comcast.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thomas Taylor wrote:
Look for gparted in openSUSE search at: http://software.opensuse.org/search
Thanks for that, Tom. It appears to indicate that I need another repository, of which the most likely seems to be openSUSE:11.2:Contrib. I'm not familiar with how the Build Service etc work. I do know that there be dragons in certain parts of it. Can you or anybody else point me to some docs that explain which parts of the various repositories are safe to use in different circumstances (production, testing, development etc)? Thanks, Dave PS The immediate question is whether the copy of gparted in that repository is likely to screw my disks under any circumstances at all? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jun 11, 2010 at 8:28 AM, Greg Freemyer
On Fri, Jun 11, 2010 at 7:32 AM, Dave Howorth
wrote: I'm trying to re-partition a disk, and am getting errors that I don't understand. So I have a bunch of questions :(
It's a new disk that I already partitioned but I've now changed my mind and want to completely reallocate the space. It's a 500 GB WD5001AALS-0 and appears as /dev/sdf.
I was using yast partitioner in 11.2 and set up the new partitions I wanted but when it tried to create them, it gave me a message about system error code -1008 (I forget the exact text I'm afraid). I haven't managed to find any useful information about the error so my first question is whether anybody recognizes it?
Now when I start yast partitioner it says:
"The partitioning on disk /dev/sdf is not readable by the partitioning tool parted, which is used to change the partition table.
You can use the partitions on disk /dev/sdf as they are. You can format them and assign mount points to them, but you cannot add, edit, resize, or remove partitions from that disk with this tool."
Does anybody know what this actually means?
Is there any documentation for the partitioner, as I haven't managed to find any?
The drive passes the SMART health test. The partitioner shows two partitions (it's another annoying GUI that doesn't provide any way to export the text that I can see!):
/dev/sdf1 1.01 GB Linux native Ext4 suse-11,2 1 132 /dev/sdf2 9.77 GB Linux native Swap swap * 133 1407
[ Note that sdf1 is not the running system, and I did swapoff /dev/sf2 before starting. ]
When I run parted / print on the command line I see something different:
Model: ATA WDC WD5001AALS-0 (scsi) Disk /dev/sdf: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 1 32.3kB 1086MB 1086MB primary ext4 type=83 2 1086MB 11.8GB 10.7GB primary type=82 3 11.8GB 22.6GB 10.7GB primary type=83
fdisk and cfdisk both report the same info as parted.
y2log has some information apparently from when the partitioner tried to repartition the disk:
2010-06-10 17:17:59 <1> scop4(11801) [libstorage] SystemCmd.cc(execute):90 SystemCmd Executing:"/usr/sbin/parted -s '/dev/sdf' mklabel msdos" 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(addLine):574 Adding Line 1 "Warning: Parted could not inform the kernel about eventual changes to partitions(s) 2 on /dev/sdf. This most likely means that the partition(s) is/are in use and parted could not determine whether the partition(s) have changed. As a result, the old partition(s) will remain in use until after reboot. If you know the partition(s) listed above have not changed, you can ignore this warning. Otherwise, you should reboot now before making further changes." 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(getUntilEOF):540 pid:12937 added lines:1 stderr:false 2010-06-10 17:18:00 <1> scop4(11801) [libstorage] SystemCmd.cc(doExecute):296 system() Returns:0
There's a huge amount of information in that file, most of which looks like gobbledygook at first glance. I'll happily post some more if you can tell me what would be useful.
Any thoughts on where to find more information or on what to do next would be appreciated!
Thanks, Dave
IIRC, if you change the partition setup outside of yast, it gets confused and won't allow you to "modify" the partition setup.
My assumption is that the yast-partitioner keeps config info somewhere and it compares that to the actual partition table.
If they disagree you get the message your seeing.
So your choice is to continue maintaining your partition setup outside of yast, or let yast blow away the current setup and start from scratch.
Assuming your using a traditional partition table, you can also manually blow it away with:
dd if=/dev/zero of=/dev/sdf count=1
Then force the kernel to re-read the partition table. I don't recall how, so I just reboot.
Copying and pasting from an old email: == Either of these will do it: hdparm -z /dev/sdx blockdev --rereadpt /dev/sdx provided that there are no partitions mounted on /dev/sdx. If there are, you need to umount them before trying to reread the partition table or you'll get a "BLKRRPART: Device or resource busy" error. Regards, David Bolt == Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer CNN/TruTV Aired Forensic Imaging Demo - http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retriev... The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Greg Freemyer wrote:
Copying and pasting from an old email:
== Either of these will do it:
hdparm -z /dev/sdx blockdev --rereadpt /dev/sdx
provided that there are no partitions mounted on /dev/sdx. If there are, you need to umount them before trying to reread the partition table or you'll get a "BLKRRPART: Device or resource busy" error.
Thanks for that. As I replied to Carlos, I was able to reboot after all but I'll bear these commands in mind for next time. I still don't understand why the partitioner doesn't execute the reread partition table ioctl when it discovers the problem :( Why do humans have to intervene? Sigh. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010-06-14 11:46, Dave Howorth wrote:
I still don't understand why the partitioner doesn't execute the reread partition table ioctl when it discovers the problem :( Why do humans have to intervene? Sigh.
So that admins have a job to be paid for ;-) I suppose it might not always work. Who knows. The partitioner is supposed to tell the kernel to reread the partitioning table at the end of its job. Fdisk does so, but sometimes it fails. - -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkwWi24ACgkQU92UU+smfQW2kACfcxCrvBWSPPay17i5hbIAYqcX 5LcAn1W5Y4Wzk//lVYWN019lkFob2qY3 =0fgx -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Carlos E. R.
-
Dave Howorth
-
Greg Freemyer
-
Thomas Taylor