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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
10-23-2016, 05:09 AM
|
#16
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
No error HDD
LVM redefine?
vmware virtual disk
|
|
|
10-23-2016, 05:31 AM
|
#17
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
No disk failure
LVM structure is broken
How can I re-introduced?
vmware virtual disk
|
|
|
10-23-2016, 06:40 AM
|
#18
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
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
|
|
|
10-23-2016, 07:07 AM
|
#19
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
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
|
|
|
10-23-2016, 09:36 AM
|
#20
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
Quote:
Originally Posted by prowas
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
|
|
|
10-23-2016, 09:44 AM
|
#21
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
Quote:
Originally Posted by rknichols
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
|
|
|
10-23-2016, 10:52 AM
|
#22
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
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.
|
|
|
10-23-2016, 10:55 AM
|
#23
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
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:~#
|
|
|
10-23-2016, 12:44 PM
|
#24
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
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.
|
|
|
10-23-2016, 01:00 PM
|
#25
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
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
|
|
|
10-23-2016, 01:08 PM
|
#26
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
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
|
|
|
10-23-2016, 01:42 PM
|
#27
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
Quote:
Originally Posted by rknichols
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
|
|
|
10-23-2016, 01:56 PM
|
#28
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
What is the output from "sfdisk --version" ?
|
|
|
10-23-2016, 01:57 PM
|
#29
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep:
|
Quote:
Originally Posted by rknichols
What is the output from "sfdisk --version" ?
|
Code:
root@ubuntu:~# sfdisk --version
sfdisk from util-linux 2.20.1
|
|
|
10-23-2016, 02:34 PM
|
#30
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,792
|
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"
|
|
|
All times are GMT -5. The time now is 12:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|