Re: Hard drive issue

2015-09-04 Thread Patrick Dupre
I guess that it is:
/dev/sdd1 : start= 4096, size= 26613760, Id= 7
/dev/sdd2 : start= 26619705, size= 12289725, Id= 7
/dev/sdd3 : start= 38909430, size= 10233405, Id= 7
/dev/sdd4 : start= 49142835, size=927625230, Id= 5
/dev/sdd5 : start= 49142898, size= 49158837, Id=82
/dev/sdd6 : start= 98301798, size= 14345982, Id=83, bootable
/dev/sdd7 : start=112647843, size= 77818797, Id=83
/dev/sdd8 : start=190466703, size= 61448562, Id=83
/dev/sdd9 : start=251915328, size= 57351987, Id=83
/dev/sdd10: start=309270528, size=152190976, Id=83



not /dev/sde1
etc.
===
 Patrick DUPRÉ | | email: pdu...@gmx.com
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale   | |
 Tel.  (33)-(0)3 28 23 76 12   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann | | 59140 Dunkerque, France
===


> Sent: Friday, September 04, 2015 at 11:24 PM
> From: "Robert Nichols" <rnicholsnos...@comcast.net>
> To: users@lists.fedoraproject.org
> Subject: Re: Hard drive issue
>
> On 09/04/2015 03:40 PM, Patrick Dupre wrote:
> > Hello,
> >
> > I tried to modified a partition table by using fdisk, but it
> > failed. Now I am in trouble. I setup the disk inside an external usb 
> > enclosure
> > and try to access it.
> >
> > After I turn the enclosure on, I only have a short time to interact with
> > the disk (maybe 15 s).
> > During this time I can make a fdisk and I get:
> > Omitting partitions after #60. They will be deleted if you save this 
> > partition table.
> >
> > Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4
> >
> > Device Boot Start   End   Sectors   Size Id Type
> > /dev/sdd14096  26617855  26613760  12.7G  7 HPFS/NTFS/exFAT
> > /dev/sdd226619705  38909429  12289725   5.9G  7 HPFS/NTFS/exFAT
> > /dev/sdd338909430  49142834  10233405   4.9G  7 HPFS/NTFS/exFAT
> > /dev/sdd449142835 976768064 927625230 442.3G  5 Extended
> > /dev/sdd549142898  98301734  49158837  23.5G 82 Linux swap / Solaris
> > /dev/sdd698304000  99327999   1024000   500M 83 Linux
> > /dev/sdd799330048 190466639  91136592  43.5G 83 Linux
> > /dev/sdd8   190466703 251915264  61448562  29.3G 83 Linux
> > /dev/sdd9   251915328 309267314  57351987  27.4G 83 Linux
> > /dev/sdd10  309270528 461461503 152190976  72.6G 83 Linux
> > /dev/sdd11   98304000  99327999   1024000   500M 83 Linux
> > /dev/sdd12   99330048 190466639  91136592  43.5G 83 Linux
> > /dev/sdd13  190466703 251915264  61448562  29.3G 83 Linux
> [SNIPPED]
> > Partition table entries are not in disk order.
> >
> > Here is the previous partition table:
> >
> > Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4
> >
> > Device Boot Start   EndBlocks  Id System
> > /dev/sdb14096  26617855  13306880   7 HPFS/NTFS/exFAT
> > /dev/sdb226619705  38909429   6144862+  7 HPFS/NTFS/exFAT
> > /dev/sdb338909430  49142834   5116702+  7 HPFS/NTFS/exFAT
> > /dev/sdb449142835 976768064 463812615   5 Extended
> > /dev/sdb549142898  98301734  24579418+ 82 Linux swap / Solaris
> > /dev/sdb6  * 98301798 112647779   7172991  83 Linux
> > /dev/sdb7   112647843 190466639  38909398+ 83 Linux
> > /dev/sdb8   190466703 251915264  30724281  83 Linux
> > /dev/sdb9   251915328 309267314  28675993+ 83 Linux
> > /dev/sdb10  309270528 461461503  76095488  83 Linux
> >
> >
> >
> > How, can I fix this partition table (actually only 2 partitions : 6 and 7)
> > are wrong.
> 
> To force the partition table back into that previous state, first
> put the following text into a file goodparts.txt :
> 
> ###
> unit: sectors
> 
> /dev/sde1 : start= 4096, size= 26613760, Id= 7
> /dev/sde2 : start= 26619705, size= 12289725, Id= 7
> /dev/sde3 : start= 38909430, size= 10233405, Id= 7
> /dev/sde4 : start= 49142835, size=927625230, Id

Re: Hard drive issue

2015-09-04 Thread Robert Nichols

On 09/04/2015 03:40 PM, Patrick Dupre wrote:

Hello,

I tried to modified a partition table by using fdisk, but it
failed. Now I am in trouble. I setup the disk inside an external usb enclosure
and try to access it.

After I turn the enclosure on, I only have a short time to interact with
the disk (maybe 15 s).
During this time I can make a fdisk and I get:
Omitting partitions after #60. They will be deleted if you save this partition 
table.

Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4

Device Boot Start   End   Sectors   Size Id Type
/dev/sdd14096  26617855  26613760  12.7G  7 HPFS/NTFS/exFAT
/dev/sdd226619705  38909429  12289725   5.9G  7 HPFS/NTFS/exFAT
/dev/sdd338909430  49142834  10233405   4.9G  7 HPFS/NTFS/exFAT
/dev/sdd449142835 976768064 927625230 442.3G  5 Extended
/dev/sdd549142898  98301734  49158837  23.5G 82 Linux swap / Solaris
/dev/sdd698304000  99327999   1024000   500M 83 Linux
/dev/sdd799330048 190466639  91136592  43.5G 83 Linux
/dev/sdd8   190466703 251915264  61448562  29.3G 83 Linux
/dev/sdd9   251915328 309267314  57351987  27.4G 83 Linux
/dev/sdd10  309270528 461461503 152190976  72.6G 83 Linux
/dev/sdd11   98304000  99327999   1024000   500M 83 Linux
/dev/sdd12   99330048 190466639  91136592  43.5G 83 Linux
/dev/sdd13  190466703 251915264  61448562  29.3G 83 Linux

[SNIPPED]

Partition table entries are not in disk order.

Here is the previous partition table:

Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4

Device Boot Start   EndBlocks  Id System
/dev/sdb14096  26617855  13306880   7 HPFS/NTFS/exFAT
/dev/sdb226619705  38909429   6144862+  7 HPFS/NTFS/exFAT
/dev/sdb338909430  49142834   5116702+  7 HPFS/NTFS/exFAT
/dev/sdb449142835 976768064 463812615   5 Extended
/dev/sdb549142898  98301734  24579418+ 82 Linux swap / Solaris
/dev/sdb6  * 98301798 112647779   7172991  83 Linux
/dev/sdb7   112647843 190466639  38909398+ 83 Linux
/dev/sdb8   190466703 251915264  30724281  83 Linux
/dev/sdb9   251915328 309267314  28675993+ 83 Linux
/dev/sdb10  309270528 461461503  76095488  83 Linux



How, can I fix this partition table (actually only 2 partitions : 6 and 7)
are wrong.


To force the partition table back into that previous state, first
put the following text into a file goodparts.txt :

###
unit: sectors

/dev/sde1 : start= 4096, size= 26613760, Id= 7
/dev/sde2 : start= 26619705, size= 12289725, Id= 7
/dev/sde3 : start= 38909430, size= 10233405, Id= 7
/dev/sde4 : start= 49142835, size=927625230, Id= 5
/dev/sde5 : start= 49142898, size= 49158837, Id=82
/dev/sde6 : start= 98301798, size= 14345982, Id=83, bootable
/dev/sde7 : start=112647843, size= 77818797, Id=83
/dev/sde8 : start=190466703, size= 61448562, Id=83
/dev/sde9 : start=251915328, size= 57351987, Id=83
/dev/sde10: start=309270528, size=152190976, Id=83
###

Then, start up the drive, and as soon as it becomes ready run:

   sfdisk --force /dev/sdd https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Hard drive issue

2015-09-04 Thread Robert Nichols

On 09/04/2015 04:32 PM, Patrick Dupre wrote:

I guess that it is:
/dev/sdd1 : start= 4096, size= 26613760, Id= 7
/dev/sdd2 : start= 26619705, size= 12289725, Id= 7
/dev/sdd3 : start= 38909430, size= 10233405, Id= 7
/dev/sdd4 : start= 49142835, size=927625230, Id= 5
/dev/sdd5 : start= 49142898, size= 49158837, Id=82
/dev/sdd6 : start= 98301798, size= 14345982, Id=83, bootable
/dev/sdd7 : start=112647843, size= 77818797, Id=83
/dev/sdd8 : start=190466703, size= 61448562, Id=83
/dev/sdd9 : start=251915328, size= 57351987, Id=83
/dev/sdd10: start=309270528, size=152190976, Id=83



not /dev/sde1
etc.


Doesn't matter at all. All that matters in that field is the
partition number.  sfdisk is often used to copy the partitioning
of one drive onto another, and that field will always show the
source drive.  The drive that get written is the one you specify
on the command line.

In effect you'll be copying the partitioning of what was my
/dev/sde (an external drive of exactly the same size as yours)
onto your /dev/sdd.

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Hard drive issue

2015-09-04 Thread Patrick Dupre
Thank Bob, it works

Then, It can reproduce the issue
under fdisk, I delete 2 partitions (6 and 7) and create 2 new ones
(with different size).
Then I get:
/dev/sdd14096  26617855  26613760  12.7G  7 HPFS/NTFS/exFAT
/dev/sdd226619705  38909429  12289725   5.9G  7 HPFS/NTFS/exFAT
/dev/sdd338909430  49142834  10233405   4.9G  7 HPFS/NTFS/exFAT
/dev/sdd449142835 976768064 927625230 442.3G  5 Extended
/dev/sdd549142898  98301734  49158837  23.5G 82 Linux swap / Solaris
/dev/sdd6   190466703 251915264  61448562  29.3G 83 Linux
/dev/sdd7   251915328 309267314  57351987  27.4G 83 Linux
/dev/sdd8   309270528 461461503 152190976  72.6G 83 Linux
/dev/sdd998304000  99327999   1024000   500M 83 Linux
/dev/sdd10   99330048 190466639  91136592  43.5G 83 Linux

Partition table entries are not in disk order.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next 
reboot or after you run partprobe(8) or kpartx(8).



Then, if I want to fix the partition order with fdisk expert f
it mess up every thing again!

What do I need to run?

Thank.

===
 Patrick DUPRÉ | | email: pdu...@gmx.com
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale   | |
 Tel.  (33)-(0)3 28 23 76 12   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann | | 59140 Dunkerque, France
===


> Sent: Friday, September 04, 2015 at 11:24 PM
> From: "Robert Nichols" <rnicholsnos...@comcast.net>
> To: users@lists.fedoraproject.org
> Subject: Re: Hard drive issue
>
> On 09/04/2015 03:40 PM, Patrick Dupre wrote:
> > Hello,
> >
> > I tried to modified a partition table by using fdisk, but it
> > failed. Now I am in trouble. I setup the disk inside an external usb 
> > enclosure
> > and try to access it.
> >
> > After I turn the enclosure on, I only have a short time to interact with
> > the disk (maybe 15 s).
> > During this time I can make a fdisk and I get:
> > Omitting partitions after #60. They will be deleted if you save this 
> > partition table.
> >
> > Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4
> >
> > Device Boot Start   End   Sectors   Size Id Type
> > /dev/sdd14096  26617855  26613760  12.7G  7 HPFS/NTFS/exFAT
> > /dev/sdd226619705  38909429  12289725   5.9G  7 HPFS/NTFS/exFAT
> > /dev/sdd338909430  49142834  10233405   4.9G  7 HPFS/NTFS/exFAT
> > /dev/sdd449142835 976768064 927625230 442.3G  5 Extended
> > /dev/sdd549142898  98301734  49158837  23.5G 82 Linux swap / Solaris
> > /dev/sdd698304000  99327999   1024000   500M 83 Linux
> > /dev/sdd799330048 190466639  91136592  43.5G 83 Linux
> > /dev/sdd8   190466703 251915264  61448562  29.3G 83 Linux
> > /dev/sdd9   251915328 309267314  57351987  27.4G 83 Linux
> > /dev/sdd10  309270528 461461503 152190976  72.6G 83 Linux
> > /dev/sdd11   98304000  99327999   1024000   500M 83 Linux
> > /dev/sdd12   99330048 190466639  91136592  43.5G 83 Linux
> > /dev/sdd13  190466703 251915264  61448562  29.3G 83 Linux
> [SNIPPED]
> > Partition table entries are not in disk order.
> >
> > Here is the previous partition table:
> >
> > Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x000bf5b4
> >
> > Device Boot Start   EndBlocks  Id System
> > /dev/sdb14096  26617855  13306880   7 HPFS/NTFS/exFAT
> > /dev/sdb226619705  38909429   6144862+  7 HPFS/NTFS/exFAT
> > /dev/sdb338909430  49142834   5116702+  7 HPFS/NTFS/exFAT
> > /dev/sdb449142835 976768064 463812615   5 Extended
> > /dev/sdb549142898  98301734  24579418+ 82 Linux swap / Solaris
> > /dev/sdb6  * 98301798 112647779   7172991  83 Linux
> > /dev/sdb7   112647843 190466639  38909398+ 83 Linux
> &g

Re: Hard drive issue

2015-09-04 Thread Robert Nichols

On 09/04/2015 05:05 PM, Patrick Dupre wrote:

Thank Bob, it works

Then, It can reproduce the issue
under fdisk, I delete 2 partitions (6 and 7) and create 2 new ones
(with different size).
Then I get:
/dev/sdd14096  26617855  26613760  12.7G  7 HPFS/NTFS/exFAT
/dev/sdd226619705  38909429  12289725   5.9G  7 HPFS/NTFS/exFAT
/dev/sdd338909430  49142834  10233405   4.9G  7 HPFS/NTFS/exFAT
/dev/sdd449142835 976768064 927625230 442.3G  5 Extended
/dev/sdd549142898  98301734  49158837  23.5G 82 Linux swap / Solaris
/dev/sdd6   190466703 251915264  61448562  29.3G 83 Linux
/dev/sdd7   251915328 309267314  57351987  27.4G 83 Linux
/dev/sdd8   309270528 461461503 152190976  72.6G 83 Linux
/dev/sdd998304000  99327999   1024000   500M 83 Linux
/dev/sdd10   99330048 190466639  91136592  43.5G 83 Linux

Partition table entries are not in disk order.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next 
reboot or after you run partprobe(8) or kpartx(8).



Then, if I want to fix the partition order with fdisk expert f
it mess up every thing again!

What do I need to run?


Within the extended partition, whenever you delete any of the logical
partitions the numbering for all of the higher-numbered ones shifts
down. If you are using fdisk, you would need to delete partitions
6 through 10, then re-create them, being very careful that partitions
8, 9, and 10 are in exactly the same positions as before.

The easiest thing to do is to use sfdisk again, and just change the
entries for partitions 6 and 7:

###
unit: sectors

/dev/sde1 : start= 4096, size= 26613760, Id= 7
/dev/sde2 : start= 26619705, size= 12289725, Id= 7
/dev/sde3 : start= 38909430, size= 10233405, Id= 7
/dev/sde4 : start= 49142835, size=927625230, Id= 5
/dev/sde5 : start= 49142898, size= 49158837, Id=82
/dev/sde6 : start= 98304000, size=  1024000, Id=83, bootable
/dev/sde7 : start= 99330048, size= 91136592, Id=83
/dev/sde8 : start=190466703, size= 61448562, Id=83
/dev/sde9 : start=251915328, size= 57351987, Id=83
/dev/sde10: start=309270528, size=152190976, Id=83
###

Because fdisk was forcing 1MB alignment for the new partitions, it
left a little extra space between partitions 5 and 6, and again
between partitions 6 and 7. If you want to reclaim that space
(your other partitions aren't aligned anyway), you could gain
a little space for partition 7:

###
unit: sectors

/dev/sde1 : start= 4096, size= 26613760, Id= 7
/dev/sde2 : start= 26619705, size= 12289725, Id= 7
/dev/sde3 : start= 38909430, size= 10233405, Id= 7
/dev/sde4 : start= 49142835, size=927625230, Id= 5
/dev/sde5 : start= 49142898, size= 49158837, Id=82
/dev/sde6 : start= 98304000, size=  1024000, Id=83, bootable
/dev/sde7 : start= 99330048, size= 91136592, Id=83
/dev/sde8 : start=190466703, size= 61448562, Id=83
/dev/sde9 : start=251915328, size= 57351987, Id=83
/dev/sde10: start=309270528, size=152190976, Id=83
###

That leaves one 63-sector "track" between the partitions, which
is consistent with the way the other logical partitions are
arranged.  The amount you gain in partition 7 isn't much, though,
just 4187 KB.  Your choice.

Personally, I keep my partitions aligned at multiples of 8 sectors
(4K alignment) just in case I someday transfer the image to a drive
with 4KB physical sectors. Since the rest of your partitions aren't
aligned that way anyway, there's not much point in doing that for
just these two partitions.

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org