LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-23-2016, 05:09 AM   #16
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled

No error HDD
LVM redefine?
vmware virtual disk
 
Old 10-23-2016, 05:31 AM   #17
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
No disk failure
LVM structure is broken
How can I re-introduced?

vmware virtual disk
 
Old 10-23-2016, 06:40 AM   #18
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
testdisk ('bad' name!) isn't testing a physical hdd; it's looking for LVM clues! From #8: read:
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
 
Old 10-23-2016, 07:07 AM   #19
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Code:
Sun Oct 23 10:00:58 2016
Command line: TestDisk

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.2.0-27-generic (#32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016) x86_64
Compiler: GCC 4.8
Compilation date: 2013-10-29T01:29:29
ext2fs lib: 1.42.9, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none
Warning: can't get size for Disk /dev/mapper/control - 0 B - 1 sectors, sector size=512
/dev/sr0 is not an ATA disk
Hard disk list
Disk /dev/sda - 536 GB / 500 GiB - CHS 65270 255 63, sector size=512 - VMware Virtual disk, FW:1.0
Disk /dev/sr0 - 1069 MB / 1020 MiB - 522240 sectors (RO), sector size=2048 - VMware Virtual IDE CDROM Drive, S/N:00000000000000000001, FW:00000001

Partition table type (auto): Intel
Disk /dev/sda - 536 GB / 500 GiB - VMware Virtual disk
Partition table type: Intel

Analyse Disk /dev/sda - 536 GB / 500 GiB - CHS 65270 255 63
Geometry from i386 MBR: head=255 sector=63
check_part_i386 failed for partition type 83

LVM2 magic value at 13054/10/13
Current partition structure:
 1 * Linux                    0  32 33    31  26 59     497664
 2 E extended                31  59 27 13054  10 12  209211394
No ext2, JFS, Reiser, cramfs or XFS marker
 3 P Linux                   31  26 60    31  59 26       2046
 3 P Linux                   31  26 60    31  59 26       2046
 4 P Linux LVM            13054  10 13 65270 213 31  838862848

search_part()
Disk /dev/sda - 536 GB / 500 GiB - CHS 65270 255 63

recover_EXT2: s_block_group_nr=0/30, s_mnt_count=11/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 33    31  26 59     497664
     ext2 blocksize=1024 Sparse superblock, 254 MB / 243 MiB

LVM2 magic value at 31/59/29
part_size 209211392
     Linux LVM               31  59 29 13054  10 12  209211392
     LVM2, 107 GB / 99 GiB

LVM2 magic value at 13054/10/13
part_size 838862848
     Linux LVM            13054  10 13 65270 213 31  838862848
     LVM2, 429 GB / 400 GiB

Results
   * Linux                    0  32 33    31  26 59     497664
     ext2 blocksize=1024 Sparse superblock, 254 MB / 243 MiB
   P Linux LVM               31  59 29 13054  10 12  209211392
     LVM2, 107 GB / 99 GiB
   P Linux LVM            13054  10 13 65270 213 31  838862848
     LVM2, 429 GB / 400 GiB

interface_write()
 1 * Linux                    0  32 33    31  26 59     497664
 2 P Linux LVM               31  59 29 13054  10 12  209211392
 3 P Linux LVM            13054  10 13 65270 213 31  838862848

search_part()
Disk /dev/sda - 536 GB / 500 GiB - CHS 65270 255 63

recover_EXT2: s_block_group_nr=0/30, s_mnt_count=11/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 33    31  26 59     497664
     ext2 blocksize=1024 Sparse superblock, 254 MB / 243 MiB

block_group_nr 1

recover_EXT2: "e2fsck -b 8193 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=1/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 3

recover_EXT2: "e2fsck -b 24577 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=3/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 5

recover_EXT2: "e2fsck -b 40961 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=5/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 7

recover_EXT2: "e2fsck -b 57345 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=7/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 9

recover_EXT2: "e2fsck -b 73729 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=9/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 25

recover_EXT2: "e2fsck -b 204801 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=25/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

block_group_nr 27

recover_EXT2: "e2fsck -b 221185 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=27/30, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2008
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 248832
recover_EXT2: part_size 497664
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB

LVM2 magic value at 31/59/29
part_size 209211392
     Linux LVM               31  59 29 13054  10 12  209211392
     LVM2, 107 GB / 99 GiB

recover_EXT2: s_block_group_nr=0/3933, s_mnt_count=9/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 128907264
recover_EXT2: part_size 1031258112
     Linux                   31  91 61 64224  53 21 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB

recover_EXT2: s_block_group_nr=0/3933, s_mnt_count=9/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 128907264
recover_EXT2: part_size 1031258112
     Linux                 5793 205 45 69986 167  5 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
This partition ends after the disk limits. (start=93077504, size=1031258112, end=1124335615, disk end=1048576000)

recover_EXT2: s_block_group_nr=0/3933, s_mnt_count=9/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 128907264
recover_EXT2: part_size 1031258112
     Linux                 5794 210 49 69987 172  9 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
This partition ends after the disk limits. (start=93093888, size=1031258112, end=1124351999, disk end=1048576000)

recover_EXT2: s_block_group_nr=0/3933, s_mnt_count=9/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 128907264
recover_EXT2: part_size 1031258112
     Linux                 5798 100 63 69991  62 23 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
This partition ends after the disk limits. (start=93151232, size=1031258112, end=1124409343, disk end=1048576000)

recover_EXT2: s_block_group_nr=0/3933, s_mnt_count=9/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 128907264
recover_EXT2: part_size 1031258112
     Linux                 5804   1 22 69996 217 45 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
This partition ends after the disk limits. (start=93241344, size=1031258112, end=1124499455, disk end=1048576000)
     Linux Swap           12007 137 35 13051  92 17   16769008
     SWAP2 version 1, pagesize=4096, 8585 MB / 8187 MiB

LVM2 magic value at 13054/10/13
part_size 838862848
     Linux LVM            13054  10 13 65270 213 31  838862848
     LVM2, 429 GB / 400 GiB
Disk /dev/sda - 536 GB / 500 GiB - CHS 65270 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (536 GB / 500 GiB) seems too small! (< 575 GB / 536 GiB)
The following partitions can't be recovered:
     Linux                 5793 205 45 69986 167  5 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
     Linux                 5794 210 49 69987 172  9 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
     Linux                 5798 100 63 69991  62 23 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
     Linux                 5804   1 22 69996 217 45 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB

Results
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB
     Linux                    0  32 33    31  26 59     497664
     ext2 blocksize=1024 Sparse superblock, 254 MB / 243 MiB
     Linux LVM               31  59 29 13054  10 12  209211392
     LVM2, 107 GB / 99 GiB
     Linux                   31  91 61 64224  53 21 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
     Linux Swap           12007 137 35 13051  92 33   16769024
     SWAP2 version 1, pagesize=4096, 8585 MB / 8188 MiB
     Linux LVM            13054  10 13 65270 213 31  838862848
     LVM2, 429 GB / 400 GiB

interface_write()
 
No partition found or selected for recovery
 
Old 10-23-2016, 09:36 AM   #20
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
Quote:
Originally Posted by prowas View Post
Code:
Results
     Linux                    0  32 31    31  26 57     497664
     ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB
     Linux                    0  32 33    31  26 59     497664
     ext2 blocksize=1024 Sparse superblock, 254 MB / 243 MiB
     Linux LVM               31  59 29 13054  10 12  209211392
     LVM2, 107 GB / 99 GiB
     Linux                   31  91 61 64224  53 21 1031258112
     ext4 blocksize=4096 Large file Sparse superblock Recover, 528 GB / 491 GiB
     Linux Swap           12007 137 35 13051  92 33   16769024
     SWAP2 version 1, pagesize=4096, 8585 MB / 8188 MiB
     Linux LVM            13054  10 13 65270 213 31  838862848
     LVM2, 429 GB / 400 GiB
That is excellent! The result that I colored "Red" is your LVM volume right where it should be in the extended partition, and with the correct size. Those CHS addresses work out to starting LBA 501760 and ending LBA 209713151. You can either select that partition for recovery and let testdisk write out the repaired partition table, or else use fdisk to create a logical partition with those starting and ending sector numbers. That should be all you need to do.

Last edited by rknichols; 10-23-2016 at 09:38 AM. Reason: left out some digits
 
Old 10-23-2016, 09:44 AM   #21
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
That is excellent! The result that I colored "Red" is your LVM volume right where it should be in the extended partition, and with the correct size. Those CHS addresses work out to starting LBA 501760 and ending LBA 209713151. You can either select that partition for recovery and let testdisk write out the repaired partition table, or else use fdisk to create a logical partition with those starting and ending sector numbers. That should be all you need to do.
Which command should I use?
What should I do to solve?

solution: do I recover the disk?
solution: LVM been to identify the disk?

I do not understand English more
I would be glad if you give commands for simple solutions.

thank you
 
Old 10-23-2016, 10:52 AM   #22
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
Since you are unfamiliar with the commands, this is the simplest way. First, copy and paste the text below to a file named parts.out:
Code:
label: dos
device: /dev/sda
unit: sectors

/dev/sda1 : start=        2048, size=      497664, type=83
/dev/sda2 : start=      501758, size=   209211394, type=5
/dev/sda3 : start=      499712, size=        2046, type=83
/dev/sda4 : start=   209713152, size=   838862848, type=8e
/dev/sda5 : start=      501760, size=   209211392, type=8e
Then, run the command
Code:
sfdisk /dev/sda <parts.out
That should repair your partitioning. The LVM volume should now be seen properly.
 
Old 10-23-2016, 10:55 AM   #23
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Code:
root@ubuntu:~# sfdisk /dev/sda <parts.out
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 65270 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     31-     31-    248832   83  Linux
/dev/sda2         31+  13054-  13023- 104605697    5  Extended
/dev/sda3         31+     31-      1-      1023   83  Linux
/dev/sda4      13054+  65270-  52217- 419431424   8e  Linux LVM
                start: (c,h,s) expected (1023,254,63) found (766,10,13)
                end: (c,h,s) expected (1023,254,63) found (758,213,31)

sfdisk: unrecognized input: dos
root@ubuntu:~#
 
Old 10-23-2016, 12:44 PM   #24
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
This is the fundamental problem with Linux. There are over 100 distributions, each with its own versions of tools. I'll have to download Ubuntu 14.04 and see what version of sfdisk it uses and what it will accept. You can try just removing the "label: dos" line from that file and trying again.
 
Old 10-23-2016, 01:00 PM   #25
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Code:
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty
 
Old 10-23-2016, 01:08 PM   #26
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
This file should work for you:
Code:
unit: sectors

/dev/sda1 : start=        2048, size=      497664, Id=83
/dev/sda2 : start=      501758, size=   209211394, Id=5
/dev/sda3 : start=      499712, size=        2046, Id=83
/dev/sda4 : start=   209713152, size=   838862848, Id=8e
/dev/sda5 : start=      501760, size=   209211392, Id=8e
 
Old 10-23-2016, 01:42 PM   #27
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
This file should work for you:
Code:
unit: sectors

/dev/sda1 : start=        2048, size=      497664, Id=83
/dev/sda2 : start=      501758, size=   209211394, Id=5
/dev/sda3 : start=      499712, size=        2046, Id=83
/dev/sda4 : start=   209713152, size=   838862848, Id=8e
/dev/sda5 : start=      501760, size=   209211392, Id=8e

Code:
root@ubuntu:~# sfdisk /dev/sda <parts.out
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 65270 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     31-     31-    248832   83  Linux
/dev/sda2         31+  13054-  13023- 104605697    5  Extended
/dev/sda3         31+     31-      1-      1023   83  Linux
/dev/sda4      13054+  65270-  52217- 419431424   8e  Linux LVM
                start: (c,h,s) expected (1023,254,63) found (766,10,13)
                end: (c,h,s) expected (1023,254,63) found (758,213,31)

sfdisk: long or incomplete input line - quitting
 
Old 10-23-2016, 01:56 PM   #28
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
What is the output from "sfdisk --version" ?
 
Old 10-23-2016, 01:57 PM   #29
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
What is the output from "sfdisk --version" ?



Code:
root@ubuntu:~# sfdisk --version
sfdisk from util-linux 2.20.1
 
Old 10-23-2016, 02:34 PM   #30
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,299

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
It works fine for me with that same version of sfdisk in xubuntu 14.04. The only way I could duplicate your result was by deleting the newline at the very end of the file. Make sure one is there. If that doesn't fix the problem, to prove that the file is not corrupted post the output from "hexdump -C parts.out"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see failed internal disk in HP Blade linux server bkarthick Linux - Newbie 1 03-09-2013 02:37 AM
need help with mounting disk after failed ubuntu 11 upgrade ?? M$ISBS Ubuntu 5 07-13-2011 01:30 PM
recover files from a failed ubuntu disk ulfscha Linux - Newbie 1 02-26-2011 10:16 AM
Failed to sync one or more sources: Failed to write some configuration data to disk ganeshbatwal Linux - Software 2 11-06-2008 10:05 AM
Ubuntu 7.10 Live demo: disk format failed jessica_lilly Ubuntu 1 11-02-2007 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration