I don't want to lose any data, so I'm asking if the solution Novell offers is safe to try. If not, are there safe alternatives?
Step-by-tedious-step:
- I have two volume groups: main and Rand; Rand is what I boot from while main is an older group.
- main/home stopped mounting due to a possible bad superblock. (this error)
- I found this Novell link suggesting
vgcfgrestoreyesterday, so I tried it. No bueno. - I then ran
fsck.jfson/dev/main/home, which allowed it to mount. Success! - This morning, I see errors.
df -hshows/dev/mapper/Rand-roothas 0 bytes free. Deleting a debian .iso--and more-- fails to change that. (20+ gigs were free yesterday.) vgscan,pvscan--a lot of utilities fail to work due to a "disk full" error.- I reboot.
df -hstill reports 0 bytes free, butvgscanandpvscanwork now. - Something one of those utilities returned led me to try
vgcfgrestore Rand. No change indf -hand now main/home (mounted at/mnt/10.10/) starts spewing I/O errors. - Reboot. A BIOS/SMART error on a disk along with a
pvscanerror saying can't find device with uuid="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82", whichblkididentifies as/dev/sdb5. fdisk -lshows:Disk /dev/sdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00039f8a Device Boot Start End Blocks Id System /dev/sdb1 * 1 32 248832 83 Linux Partition 1 does not end on cylinder boundary. /dev/sdb2 32 14594 116969473 5 Extended /dev/sdb5 32 14594 116969472 8e Linux LVM Note: sector size is 4096 (not 512)The Novell link says my problem fits Symptom 2 and provides a solution, but says nothing about
fdiskreporting a partition error. (Which may be causing the SMART error.)
The Novell solution says to first identify the device, then run pvcreate with the UUID and device as parameters, then vgcfgrestore, vgscan, vgchange -ay, and fsck.
If I try this, is there a chance pvcreate will damage anything?
Also, for the pvcreate command, should I use /dev/sdb or /dev/sdb5 as the device?
Output:
~ » sudo vgscan steven@Rand
[sudo] password for steven:
Reading all physical volumes. This may take a while...
Found volume group "Rand" using metadata type lvm2
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
Found volume group "main" using metadata type lvm2
------------------------------------------------------------
~ » sudo pvscan steven@Rand
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
PV /dev/sdb5 VG Rand lvm2 [111.55 GiB / 0 free]
PV unknown device VG main lvm2 [1.36 TiB / 0 free]
PV /dev/sda1 VG main lvm2 [465.76 GiB / 461.76 GiB free]
Total: 3 [1.93 TiB] / in use: 3 [1.93 TiB] / in no VG: 0 [0 ]
------------------------------------------------------------
~ » blkid steven@Rand
/dev/sdb1: UUID="ba9a3955-0b9c-4660-9852-0f9f405d2f8e" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb5: UUID="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82" TYPE="LVM2_member"
/dev/sde1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"
/dev/sdf1: UUID="5F8C6ED4773C3763" TYPE="ntfs"
------------------------------------------------------------
~ » sudo lvs
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
root Rand -wi-ao 106.98g
swap_1 Rand -wi-ao 4.56g
home main -wi--- 1.35t
root main -wi--- 2.00g
swap main -wi--- 4.00g
tmp main -wi--- 512.00m
usr main -wi--- 6.00g
var main -wi--- 2.00g
------------------------------------------------------------
~ » sudo lvscan
ACTIVE '/dev/Rand/root' [106.98 GiB] inherit
ACTIVE '/dev/Rand/swap_1' [4.56 GiB] inherit
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
inactive '/dev/main/swap' [4.00 GiB] inherit
inactive '/dev/main/root' [2.00 GiB] inherit
inactive '/dev/main/usr' [6.00 GiB] inherit
inactive '/dev/main/var' [2.00 GiB] inherit
inactive '/dev/main/tmp' [512.00 MiB] inherit
inactive '/dev/main/home' [1.35 TiB] inherit
------------------------------------------------------------
~ » sudo pvs
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
PV VG Fmt Attr PSize PFree
/dev/sda1 main lvm2 a- 465.76g 461.76g
/dev/sdb5 Rand lvm2 a- 111.55g 0
unknown device main lvm2 a- 1.36t 0
------------------------------------------------------------
~ » blkid
/dev/sdb1: UUID="ba9a3955-0b9c-4660-9852-0f9f405d2f8e" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb5: UUID="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82" TYPE="LVM2_member"
/dev/sde1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"
/dev/sdf1: UUID="5F8C6ED4773C3763" TYPE="ntfs"
------------------------------------------------------------
~ » sudo vgs
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
VG #PV #LV #SN Attr VSize VFree
Rand 1 2 0 wz--n- 111.55g 0
main 2 6 0 wz-pn- 1.82t 461.76g
------------------------------------------------------------
~ » sudo vgscan
Reading all physical volumes. This may take a while...
Found volume group "Rand" using metadata type lvm2
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
Found volume group "main" using metadata type lvm2
------------------------------------------------------------
~ » sudo pvscan
Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.
PV /dev/sdb5 VG Rand lvm2 [111.55 GiB / 0 free]
PV unknown device VG main lvm2 [1.36 TiB / 0 free]
PV /dev/sda1 VG main lvm2 [465.76 GiB / 461.76 GiB free]
Total: 3 [1.93 TiB] / in use: 3 [1.93 TiB] / in no VG: 0 [0 ]
------------------------------------------------------------