Important diretories are missing after adding space.
Hello,I added a second parttion to vg, extended lv and fs, mounted ir back. Checked -alm directories were in place. Proceeded with creation a few large files * also worked fine. Switched the machiine off and went to bed. Next day booted to discover that few , but the most important, dies are missing.
Please advise - I'm extremely upset. Since the back is outdated.
Here is a log from history I could retrive and some additional information.
I run Centos 5.4 rpm based. (2.6.18-164.15.1.el5.centos.plus) with lvm2 ( rpm 2.6.18-164.15.1.el5.centos.plus). I followed the [url]http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html[/url] andhere is the list of what i have (now):
[code]
cat /etc/fstab/dev/VG_SYS/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 /dev/VG_SYS/LogVol01 swap swap defaults 0 0 /dev/VG_Storage00/LG_VG_Storage00_00 /u01/app/ ext3 defaults 0 0 #/dev/mapper/VG_Storage01-LV_VG_STORAGE01 /mnt/storage ext3 defaults 0 0 /dev/mapper/VG_Storage-LV_00 /mnt/storage ext3 defaults 0 0
[root@server ~]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VG_SYS -wi-ao 148.07G LogVol01 VG_SYS -wi-ao 896.00M LV_00 VG_Storage -wi-a- 931.33G
LG_VG_Storage00_00 VG_Storage00 -wi-ao 149.05G
LV_Backup VG_backup -wi-ao 232.87G
[root@server ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VG_SYS 1 2 0 wz--n- 148.95G 0 VG_Storage 2 1 0 wz--n- 931.33G 0 VG_Storage00 2 1 0 wz--l- 149.05G 0 VG_backup 3 1 0 wz--n- 232.87G 0 [root@server ~]# pvs PV VG Fmt Attr PSize PFree /dev/hdc1 VG_Storage00 lvm2 a- 74.53G 0 /dev/hdc2 VG_backup lvm2 a- 74.52G 0 /dev/hdd1 VG_Storage00 lvm2 a- 74.53G 0 /dev/hdd2 VG_backup lvm2 a- 74.52G 0 /dev/hdd3 VG_backup lvm2 a- 83.83G 0 /dev/sda2 VG_SYS lvm2 a- 148.95G 0 /dev/sdb1 VG_Storage lvm2 a- 465.67G 0 /dev/sdb5 VG_Storage lvm2 a- 465.67G 0
/dev/sdb6 lvm2 -- 465.93G 465.93G
[/code]
now here is what i did.
i took the sdb5 and added to VG_STORAGE, extended lvs and extended the FS. Mounted and uuuupps. half of the directories are gone.here is the history of commands. All run w/o errors. Well, at least obvious errors that would have caught my eye. [code]
umount /mnt/storage
vgextend /dev/mapper/VG_Storage /dev/sdb5
lvextend -l+100%VG /dev/VG_Storage00/LG_VG_Storage00_00
lvextend -l+100%FREE /dev/mapper/VG_Storage-LV_00
resize2fs /dev/mapper/VG_Storage-LV_00
e2fsck -f /dev/mapper/VG_Storage-LV_00
resize2fs /dev/mapper/VG_Storage-LV_00
df -h /mnt/storage/
Filesystem Size Used Avail Use% Mounted on/dev/mapper/VG_Storage-LV_00
932G 488G 407G 55% /mnt/storage
du -hs /mnt/storage/
487G /mnt/storage/
[/code]
now, i think i mounted and checked the space.
i ran a couples of commands that created a few big files in the one the directories. Everything went just fine. I never checked if all old directories exist.
Today booted - and all directories/files i created after extension of the fs are in place. Some old dirs are there too. But some (~50%) are missing. Obviously, those are the ones i do care about the most.. Please help....
Today i tried to follow the article [url]http://www.symantec.com/connect/articles/data-recovery-linux-and-ext3[/url] with no success:
[code]
root@server ~]# mount/dev/mapper/VG_SYS-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)/dev/mapper/VG_Storage00-LG_VG_Storage00_00 on /u01/app type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)/dev/mapper/VG_backup-LV_Backup on /mnt/backup type ext2 (rw)/dev/mapper/VG_Storage-LV_00 on /mnt/storage type ext3 (rw)
[root@server ~]# debugfs /dev/mapper/VG_Storage-LV_00
debugfs 1.39 (29-May-2006)
debugfs: pwd
[pwd] INODE: 2 PATH: / [root] INODE: 2 PATH: /
debugfs: cd /mnt/storage/mnt/storage: File not found by ext2_lookup
debugfs: q
[/code]
-----Original message-----
From: For Miscelenious <[email protected]>
To: [email protected]
Sent: Sat, Sep 4, 2010 13:29:18 GMT+00:00
Subject: Important diretories are missing after adding space.
Quoted 11 lines
# pvs � PV�������� VG���������� Fmt� Attr PSize�� PFree� � /dev/hdc1� VG_Storage00 lvm2 a-��� 74.53G����� 0 � /dev/hdc2� VG_backup��� lvm2 a-��� 74.52G����� 0 � /dev/hdd1� VG_Storage00 lvm2 a-��� 74.53G����� 0 � /dev/hdd2� VG_backup��� lvm2 a-��� 74.52G����� 0 � /dev/hdd3� VG_backup��� lvm2 a-��� 83.83G����� 0 � /dev/sda2� VG_SYS������ lvm2 a-�� 148.95G����� 0 � /dev/sdb1� VG_Storage�� lvm2 a-�� 465.67G����� 0 � /dev/sdb5� VG_Storage�� lvm2 a-�� 465.67G����� 0 � /dev/sdb6�������������� lvm2 --�� 465.93G 465.93G
There are several things I am suspicious about, but I would like to see the output of "sfdisk -l /dev/sdb". sdb1 wouldn't by any chance, be an extended partition?
Signature · 4 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Quoted 16 lines · Stuart D. Gathman
Quoted 11 lines
# pvs � PV�������� VG���������� Fmt� Attr PSize�� PFree� � /dev/hdc1� VG_Storage00 lvm2 a-��� 74.53G����� 0 � /dev/hdc2� VG_backup��� lvm2 a-��� 74.52G����� 0 � /dev/hdd1� VG_Storage00 lvm2 a-��� 74.53G����� 0 � /dev/hdd2� VG_backup��� lvm2 a-��� 74.52G����� 0 � /dev/hdd3� VG_backup��� lvm2 a-��� 83.83G����� 0 � /dev/sda2� VG_SYS������ lvm2 a-�� 148.95G����� 0 � /dev/sdb1� VG_Storage�� lvm2 a-�� 465.67G����� 0 � /dev/sdb5� VG_Storage�� lvm2 a-�� 465.67G����� 0 � /dev/sdb6�������������� lvm2 --�� 465.93G 465.93GThere are several things I am suspicious about, but I would like to see the output of "sfdisk -l
/dev/sdb". sdb1 wouldn't by any chance, be an extended partition?
Quoted 11 lines
--
Stuart D. Gathman <[email protected]>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Stuart,
thank you for your reply. Here is the output:
[root@server storage]# fdisk -l /dev/sdb
Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sdb1 1 60789 488287611 83 Linux /dev/sdb2 60790 182401 976848390 5 Extended /dev/sdb5 60790 121578 488287611 83 Linux /dev/sdb6 121579 182401 488560716 83 Linux
[root@server storage]# fdisk -l /dev/sda
Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 19457 156183930 8e Linux LVM
[root@server storage]# fdisk -l /dev/hdc
Disk /dev/hdc: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hdc1 * 1 9729 78148161 83 Linux /dev/hdc2 9730 19457 78140160 83 Linux
Quoted 4 lines · For Miscelenious
Checked -alm directories were in place. Proceeded with creation a few large files * also worked fine. Switched the machiine off and went to bed. Next day booted to discover that few , but the most important, dies are missing.
The sfdisk output looks ok. Now don't be offended, just ruling out obvious things that could have gone wrong. You did shutdown before switching off the machine, right?
Quoted 1 line
e2fsck -f
/dev/mapper/VG_Storage-LV_00
By any chance, did fsck fix stuff? Have you looked in lost+found?
Signature · 4 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Stuart, no offence can be taken ar all - I cam see two possibilities - u did smth very stupid or its a glitch.I actually selected "shutdown" option in kde.
I cant say that fsck fixed - it reported a short read. I got completely shocked and just for the hell of it ran la just to observe that. Everything is "back". Since then I copied all files. To backup lv and ran that fack. Last reported no problem.
You mentioned something about extended partitions?
-----Original message-----
From: "Stuart D. Gathman" <[email protected]>
To: LVM general discussion and development <[email protected]>
Sent: Sun, Sep 5, 2010 19:43:49 GMT+00:00
Subject: Re: [linux-lvm] Important diretories are missing after adding space.
Quoted 4 lines · For Miscelenious
Checked -alm directories were in place. Proceeded with creation a few large files * also worked fine. Switched the machiine off and went to bed. Next day booted to discover that few , but the most important, dies are missing.
The sfdisk output looks ok. Now don't be offended, just ruling outobvious things that could have gone wrong. You did shutdown before switching off the machine, right?
Quoted 1 line
e2fsck -f
/dev/mapper/VG_Storage-LV_00
By any chance, did fsck fix stuff? Have you looked in lost+found?
Signature · 10 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. _______________________________________________ linux-lvm mailing list [email protected] https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 7 lines · For Miscelenious
Stuart, no offence can be taken ar all - I cam see two possibilities - u did smth very stupid or its a glitch.
I actually selected "shutdown" option in kde.I cant say that fsck fixed - it reported a short read. I got completely shocked and just for the hell of it ran la just to observe that. Everything is "back".
Check /var/log/messages for I/O errors on sdb.
Quoted 4 lines
Since then I copied all files. To backup lv and ran that fack. Last reported no problem.
You mentioned something about extended partitions?
If sdb1 had been the extended partition, then it overlaps both sdb5 and sdb6, so that building a PV/filesystem on sdb5 would overwrite the existing filesystem on sdb1. That would have come under the "very stupid" category. (I.e. don't try to add sdb2 as a PV! Does EL5 prevent this somehow? I don't have anything expendable attached to test on...)
-- I appologies for the terrible spelling - writing from the cell phone is not smth I do well.
Re: extended partition overlap .
Agree, that would be really stupid. Speaking of partitions. I'm looking at my other drives, they do not have an extended partition somehow. I always thought that the only way to cteate multiple partitions is to have one primary and one extended. And then further partition it. Is it a case or lm just been naive?
Re: log/messagesI actually have it (tail on /var/log/messages) defaulted to 11 terminal- old habbit. And thru the whole ordeal I didn't see anything worth mentioning. Thank you.
Andrew
-----Original message-----
From: Stuart D Gathman <[email protected]>
To: [email protected]
Sent: Sun, Sep 5, 2010 23:23:18 GMT+00:00
Subject: Re: [linux-lvm] Important diretories are missing after adding space.
Quoted 6 lines · For Miscelenious
Re: extended partition overlap .
Speaking of partitions. I'm looking at my other drives,
they do not have an extended partition somehow.
I always thought that the only way to cteate multiple partitions is to have one primary and one extended. And then further partition it. Is it a case or lm just been naive?
You can have up to four primary partitions. The previous statement
is oversimplying, though, and not quite true. Technically, the partition table always lists _exactly_ four partitions, though some may have zero size. The reason you can (and must) have four is beause there are exactly 64 bytes which tell where those partitions are and what type they are. More can not be described in the space allowed.
Of those four, one may be an extended partition. Extended
partitions contain a partition table within the partition which allows for four more partitions, one of which may be another extended partition.
All of the above is true of the DOS partition table format.
Remember in that format the whole partition table is 64 bytes - sixteen bytes per partition. The size of the partition is soted in four bytes, and it's starting position in another four bytes. Those four bytes are enough to describe a partition of up to 2 TB, and one starting up to 2TB from the beginning of the disk. Therefore, the DOS partition tabel format can only be used with drives smaller than 4TB, and loses functionallity on drives more than 2TB. To get over 2TB, one must use a newer type of partition table such as GPT.
--
Ray Morris
[email protected]
Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/
Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/
Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php
Quoted 6 lines · For Miscelenious
-- I appologies for the terrible spelling - writing from the cell phone is not smth I do well.
Re: extended partition overlap .
Agree, that would be really stupid. Speaking of partitions. I'm looking at my other drives, they do not have an extended partition somehow. I always thought that the only way to cteate multiple partitions is to have one primary and one extended. And then further partition it. Is it a case or lm just been naive?
Quoted 9 lines
Re: log/messagesI actually have it (tail on
/var/log/messages) defaulted to 11 terminal- old habbit. And thru the whole ordeal I didn't see anything worth mentioning. Thank you.
Andrew
-----Original message-----
From: Stuart D Gathman <[email protected]>
To: [email protected]
Sent: Sun, Sep 5, 2010 23:23:18 GMT+00:00
Subject: Re: [linux-lvm] Important diretories are missing after adding space.
------quoted attachment------
Quoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Thank you Ray, that explains it.
Andrew
Quoted 91 lines · Ray Morris
On 09/05/2010 09:16:09 PM, For Miscelenious wrote:
Re: extended partition overlap .
Quoted 7 lines
Speaking of partitions. I'm looking at my other drives,
they do not have an extended partition somehow.
I always thought that the only way to cteate multiple partitions is to have one primary and one extended. And then further partition it. Is it a case or lm just been naive?You can have up to four primary partitions. The previous statement
is oversimplying, though, and not quite true. Technically, the partition table always lists _exactly_ four partitions, though some may have zero size. The reason you can (and must) have four is beause there are exactly 64 bytes which tell where those partitions are and what type they are. More can not be described in the space allowed.Of those four, one may be an extended partition. Extended
partitions contain a partition table within the partition which allows for four more partitions, one of which may be another extended partition.All of the above is true of the DOS partition table format.
Remember in that format the whole partition table is 64 bytes - sixteen bytes per partition. The size of the partition is soted in four bytes, and it's starting position in another four bytes. Those four bytes are enough to describe a partition of up to 2 TB, and one starting up to 2TB from the beginning of the disk. Therefore, the DOS partition tabel format can only be used with drives smaller than 4TB, and loses functionallity on drives more than 2TB. To get over 2TB, one must use a newer type of partition table such as GPT.
--
Ray Morris
[email protected]Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.phpQuoted 14 lines · For Miscelenious
-- I appologies for the terrible spelling - writing from the cell phone is not smth I do well.
Re: extended partition overlap .
Agree, that would be really stupid. Speaking of partitions. I'm looking at my other drives, they do not have an extended partition somehow. I always thought that the only way to cteate multiple partitions is to have one primary and one extended. And then further partition it. Is it a case or lm just been naive?Re: log/messagesI actually have it (tail on
/var/log/messages) defaulted to 11 terminal- old habbit. And thru the whole ordeal I didn't see anything worth mentioning.Quoted 10 lines
Thank you.
Andrew
-----Original message-----
From: Stuart D Gathman <[email protected]>
To: [email protected]
Sent: Sun, Sep 5, 2010 23:23:18 GMT+00:00
Subject: Re: [linux-lvm] Important diretories are missing after adding space.------quoted attachment------
Quoted 6 lines
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/