PDA

View Full Version : Adding sata drives causes existing drives to be renamed


Tim.Bingham
1st September 2009, 08:50 PM
1) Have shiny new Fedora 11 installation (sda) with 1 extra sata drive (sdb)
2) Fill drive sdb with data
3) Install 2 additional sata drives using free sata ports, don't touch existing ports
4) boot
5) now have sdc and sdd
6) fdisk and mkfs on sdc and sdd
7) where have the files from sdb gone ?
8) RAGE!!!

stoat
1st September 2009, 10:35 PM
There is at least a possibility that the free utility TestDisk can find your original partitions on the affected drive and recover them by reconstructing the partition table. It can work as long as nothing was done to the data in the sectors of those partitions. It shouldn't hurt to try. If Fedora is still working, testdisk is in the Fedora repos and can be yum installed (yum install testdisk). But it is also available in various other versions at the TestDisk web site. I also keep the DOS version handy on a bootable CD.

brunson
1st September 2009, 10:46 PM
This is more of an issue with the standard PC BIOS being a huge piece of crap when it comes to presenting drives to the host OS.

stoat
2nd September 2009, 04:31 AM
Hello brunson,

You will certainly know more about this than me, so I for one would like it if you or anyone else would talk a little more about how device names are assigned in Linux in general and Fedora in particular. I think everyone now knows that since Fedora 7, IDE and SATA and SCSI drives all use the same libata driver code making them all /dev/sdx. And I think I have read that the device name order is determined by how the operating system discovers them. And to me, that means how the drives are physically connected to the controllers. For example, what if the victim in this case had two drives connected to the 3rd and 4th SATA ports and wasn't using the 1st and 2nd ports until the two new drives were plugged into them. Fedora still booted by using UUIDs instead of device names in /boot/grub/grub.conf and /etc/fstab. But I guess us humans, still clinging to device names, could conceivably botch things up nicely with terminal commands in such a scenario. I guess extreme care and attention is called for when internal drives are added (or removed) until what happened to device names is understood. For external drives, I rely on partition labels to mount those reliably, and I rarely need to do anything to those by device name.

San Fernando Apure Instagram Photos - Rexburg Travel Photos on Instagram - Yerba Buena Photos