graeme vetterlein <graeme.lvm@xxxxxxxxxxxxxx> writes: > I was able to "replace" 1 broken 2TB 1 working 2TB drive with a new > 4TB drive > without any filesystem creation, copying etc, just using LVM commands: > umount /dev/mapper/SAMSUNG_2TB-data > umount /dev/mapper/SAMSUNG_2TB-vimage > lvchange -an SAMSUNG_2TB/data > lvchange -an SAMSUNG_2TB/vimage > vgmerge BARRACUDA_4TB SAMSUNG_2TB -- I believe this puts > everything into BARRACUDA_4TB (oddly right to left) > pvmove /dev/sdc1 -- Moves everything off sdc1 > vgreduce BARRACUDA_4TB /dev/sdc1 -- Nothing should be in sdc1, > so drop it from the group If they were in the same vg, you wouldn't even have to umount the filesystem. > 19,000 hours, I get a popup warnings almost every day now. Smart shows > it has NO > reallocated sectors. What "pop up warning?? What does smartctl -H say about the drive? I don't see anything below that indcicates there is anything wrong with the drive at all. > SMART Attributes Data Structure revision number: 16 > Vendor Specific SMART Attributes with Thresholds: > ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED > WHEN_FAILED RAW_VALUE > 1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail > Always - 0 > 2 Throughput_Performance 0x0005 140 140 054 Pre-fail > Offline - 69 > 3 Spin_Up_Time 0x0007 127 127 024 Pre-fail > Always - 296 (Average 299) > 4 Start_Stop_Count 0x0012 100 100 000 Old_age > Always - 3554 > 5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail > Always - 0 > 7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail > Always - 0 > 8 Seek_Time_Performance 0x0005 124 124 020 Pre-fail > Offline - 33 > 9 Power_On_Hours 0x0012 098 098 000 Old_age > Always - 19080 > 10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail > Always - 0 > 12 Power_Cycle_Count 0x0032 100 100 000 Old_age > Always - 2959 > 192 Power-Off_Retract_Count 0x0032 097 097 000 Old_age > Always - 3616 > 193 Load_Cycle_Count 0x0012 097 097 000 Old_age > Always - 3616 > 194 Temperature_Celsius 0x0002 250 250 000 Old_age > Always - 24 (Min/Max 13/45) > 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age > Always - 0 > 197 Current_Pending_Sector 0x0022 100 100 000 Old_age > Always - 0 > 198 Offline_Uncorrectable 0x0008 100 100 000 Old_age > Offline - 0 > 199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age > Always - 57 > > > Now, I know it's possible that these CRC errors are e.g. 'cable related' but > I've swapped the cable and moved SATA ports to no effect. In the end I > decided > 10 years was enough and bought a new drive. Yes, those are just errors going over the SATA link. They would have been retried and you never noticed. The question is whether you see any errors in dmesg or your kernel logs, or reported from badblocks. Or you might ask smartctl to have the drive run its own internal test with smartctl -t long. The advantage of this over badblocks is that it doesn't have to waste resources actually sending the data to the CPU just to test if it can read the disk. You can then check the drive's log with smartctl -l selftest to see if it found any errors. > Any hints? lvm2 commands? I can RTFM but a pointing finger would help. You can bypass LVM and directly manipulate the device mapper with the dmsetup command. Doing this, you can do various other things such as insert a fake "bad sector" for testing purposes, but you will have to set up a script in your initramfs to configure the table on every boot. > Debian. I'm thinking I'll probably use LVM2 and raid striping (so I > will have VG > with many PV in them :-) ) That's one way to go, but if you are currently keeping them as separate filesystems, you might be interested in looking up snapraid. It lets you create parity to be able to recover from file or disk loss like raid5/6, but not in real time. It's handy for several disks that contain files that are rarely written to such as media files. You can keep your media disks in standby mode except for the one disk that contains the file you want to play right now, rather than having to wake all of the disks up as with raid5/6. You can also keep your parity disk(s) offline and drop them in an eSATA dock just to update the parity when you do modify the files on the data disks. _______________________________________________ linux-lvm mailing list linux-lvm@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/