Unable to mount ufs drive after changing drive order

Ryan Crumley crumley at gmail.com
Thu Oct 28 12:34:57 PDT 2004


SOLVED.

I removed all entries in fstab except my root and swap. Then removed
the entries for the swapped drives from /dev... and rebooted. Once the
machine came back up I was able to run fsck on the drives with their
new numbers and mount them without issue (using the same commands as I
had tried earlier).

Not sure why this worked but I am happy to get my data back. Hope this
helps someone.


On Tue, 26 Oct 2004 10:18:59 -0500, Ryan Crumley <crumley at gmail.com> wrote:
> I have a FreeBSD 4.9 machine (i386) with 3 hard drives in it. I
> installed a 4th hard drive and booted the system however this changed
> the drive numbers (expected since I rearranged their connection order)
> and fstab refered to the wrong drives so the only drive that was able
> to be mounted was the root drive. [see the end of the message for
> dmesg output, fdisk output, and fstab info]
> 
> I looked at my dmesg output and figured out the mapping between the
> old drive numbers and the new numbers and tried issueing the command:
> 
> mount -t ufs /dev/ad5s1c /mnt
> 
> (this drive used to be ad6 but is now ad5, fstab reads /dev/ad6s1c)
> 
> and instead of mounting the hard drive on /mnt I get the following error:
> 
> mount: /dev/ad5s1c: Device not configured
> 
> So I thought maybe I am confused and this drive is not ad5, maybe its
> ad6 or ad7... So I tried the same mount command and got:
> 
> mount: /dev/ad6s1c: Operation not permitted
> mount: /dev/ad7s1c: Operation not permitted
> 
> (Either ad5 or ad6 is blank, it is hard for me to tell for sure since
> they are both the same model of hard drive however I am pretty sure
> its ad6 that is blank. ad5 and ad7 were both mountable before
> installing the new hard drive).
> 
> Next I tried:
> 
> cd /dev
> rm ad5* ad6* ad7*
> sh MAKEDEV ad5 ad6 ad7
> 
> and then tried mounting the drives as described above with the same results.
> 
> At this point I am not sure what to do. Can someone point me in the
> right direction?
> 
> Here is my hardware configuration:
> Computer:
> k6-3 400mghz
> 296mb of ram
> HighPoint HPT370 Raid Controller (motherboard doesn't support ata100
> drives so I have a pci card that all the drives plug into)
> 
> ide connection:
> all drives are set to cable select and connected to the raid
> controller card via two cables (so on each channel there is a master
> and a slave).
> 
> here is some output from dmesg:
> 
> atapci1: <HighPoint HPT370 ATA100 controller> port 0xb800-0xb8ff,0xb400-0xb403,0
> xb000-0xb007,0xac00-0xac03,0xa800-0xa807 irq 10 at device 9.0 on pci0
> ata2: at 0xa800 on atapci1
> ata3: at 0xb000 on atapci1
> [...]
> ad4: 156334MB <Maxtor 6Y160P0> [317632/16/63] at ata2-master UDMA100
> ad5: 190782MB <ST3200822A> [387621/16/63] at ata2-slave UDMA100
> ad6: 190782MB <ST3200822A> [387621/16/63] at ata3-master UDMA100
> ad7: 76319MB <WDC WD800JB-00CRA1> [155061/16/63] at ata3-slave UDMA100
> Mounting root from ufs:/dev/ad4s2a
> 
> ad4 = root hard drive
> ad5 = old ad6
> ad6 = blank hard drive
> ad7 = old ad5
> 
> It is possible that I have ad5 and ad6 confused since they are the
> same model of drive however I am pretty sure ad6 is the blank one.
> 
> Now for some fdisk output:
> ~$ fdisk /dev/ad5
> ******* Working on device /dev/ad5 *******
> parameters extracted from in-core disklabel are:
> cylinders=387621 heads=16 sectors/track=63 (1008 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=387621 heads=16 sectors/track=63 (1008 blks/cyl)
> 
> fdisk: invalid fdisk partition table found
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> <UNUSED>
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>    start 63, size 390721905 (190782 Meg), flag 80 (active)
>        beg: cyl 0/ head 1/ sector 1;
>        end: cyl 548/ head 15/ sector 63
> 
> ~$ fdisk /dev/ad6
> ******* Working on device /dev/ad6 *******
> parameters extracted from in-core disklabel are:
> cylinders=387621 heads=16 sectors/track=63 (1008 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=387621 heads=16 sectors/track=63 (1008 blks/cyl)
> 
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>    start 63, size 390721905 (190782 Meg), flag 80 (active)
>        beg: cyl 0/ head 1/ sector 1;
>        end: cyl 548/ head 15/ sector 63
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>
> 
> ~$ fdisk /dev/ad7
> ******* Working on device /dev/ad7 *******
> parameters extracted from in-core disklabel are:
> cylinders=165398 heads=15 sectors/track=63 (945 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=165398 heads=15 sectors/track=63 (945 blks/cyl)
> 
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>    start 63, size 156301047 (76318 Meg), flag 80 (active)
>        beg: cyl 0/ head 1/ sector 1;
>        end: cyl 533/ head 14/ sector 63
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>
> 
> ~$ cat /etc/fstab
> # See the fstab(5) manual page for important information on automatic mounts
> # of network filesystems before modifying this file.
> #
> # Device                Mountpoint      FStype  Options         Dump    Pass#
> /dev/ad4s1b             none            swap    sw              0       0
> /dev/ad4s2a             /               ufs     rw              1       1
> #/dev/ad6s1c    /1 ufs   rw 1  1
> #/dev/ad5s1c    /2 ufs   rw 1  1
> 
> (I have commented out the drive drives that are not mounting due to
> their drive numbers changing, this worked before rearranging the disks
> and installing a new disk).
> 
> Thanks!
> 
> ryan
>


More information about the freebsd-questions mailing list