Saturday, September 18, 2010

Using 2TB Mybook with ubuntu and ML110 Proliant

I am hooking my 2TB Mybook to my ML110 running ubuntu server 10.04.1.
I read in the /etc/fstab that I would do this ...

wee@ubuntu:~$ sudo blkid -o full -s UUID
/dev/sda1: UUID="82d18b5c-0049-4ff6-9ab7-6a87cd5906db"
/dev/sda2: UUID="d97daca7-8046-49d7-93bd-24a6ee6ad33d"
/dev/sda3: UUID="bf565e06-0ddd-44b5-b58f-bc9771c55b21"
/dev/sda5: UUID="685a4f87-57c2-4aca-8bf4-54f112e19cbd"
/dev/sda6: UUID="21fa44e0-651c-4e22-8e88-240c2546e39b"
/dev/sda7: UUID="d7121d7e-0969-4b30-86e4-987d530702d9"
/dev/sda8: UUID="9c0f5186-c475-4d5f-a1ef-5a46fe5ddb9e"
/dev/sdb1: UUID="68066cd7-6446-42b7-9386-892a2d540691"

So this is my /etc/fstab ...

wee@ubuntu:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=82d18b5c-0049-4ff6-9ab7-6a87cd5906db / ext4 errors=remount-ro 0 1
# /coop was on /dev/sda8 during installation
UUID=9c0f5186-c475-4d5f-a1ef-5a46fe5ddb9e /coop ext4 defaults 0 2
# /home was on /dev/sda5 during installation
UUID=685a4f87-57c2-4aca-8bf4-54f112e19cbd /home ext4 defaults 0 2
# /tmp was on /dev/sda6 during installation
UUID=21fa44e0-651c-4e22-8e88-240c2546e39b /tmp ext4 defaults 0 2
# /usr was on /dev/sda3 during installation
UUID=bf565e06-0ddd-44b5-b58f-bc9771c55b21 /usr ext4 defaults 0 2
# /var was on /dev/sda2 during installation
UUID=d97daca7-8046-49d7-93bd-24a6ee6ad33d /var ext4 defaults 0 2
# swap was on /dev/sda7 during installation
UUID=d7121d7e-0969-4b30-86e4-987d530702d9 none swap sw 0 0
#
# Mybooks
# got UUID from executing sudo blkid -o full -s UUID
UUID=68066cd7-6446-42b7-9386-892a2d540691 /media/coop-disk-01 ext3 defaults 0 0


I did have to also do fdisk & mkfs ... no surprise there.

But no joy ...


wee@ubuntu:~$ sudo mount /media/coop-disk-01
[sudo] password for wee:
mount: special device UUID=68066cd7-6446-42b7-9386-892a2d540691 does not exist
wee@ubuntu:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 7690408 345136 6954616 5% /
none 502920 228 502692 1% /dev
none 507352 32 507320 1% /dev/shm
none 507352 96 507256 1% /var/run
none 507352 0 507352 0% /var/lock
none 507352 0 507352 0% /lib/init/rw
/dev/sda5 24382868 247916 22896376 2% /home
/dev/sda8 93687744 188104 88740500 1% /coop
/dev/sda6 1921036 36344 1787108 2% /tmp
/dev/sda2 14614904 978032 12894472 8% /var
/dev/sda3 9612516 3050876 6073348 34% /usr


Looks like that UUID number that is not suppose to change changed ???

So change line in fstab to ...


#
# Mybooks
# got UUID from executing sudo blkid -o full -s UUID
#UUID=68066cd7-6446-42b7-9386-892a2d540691 /media/coop-disk-01 ext3 defaults 0 0
UUID=d4b57836-3897-4264-a5d3-ba0d8d21ce8c /media/coop-disk-01 auto defaults 0 0


Now mount works ...


wee@ubuntu:~$ sudo mount /media/coop-disk-01
wee@ubuntu:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 7690408 345136 6954616 5% /
none 502920 228 502692 1% /dev
none 507352 28 507324 1% /dev/shm
none 507352 96 507256 1% /var/run
none 507352 0 507352 0% /var/lock
none 507352 0 507352 0% /lib/init/rw
/dev/sda5 24382868 248028 22896264 2% /home
/dev/sda8 93687744 188104 88740500 1% /coop
/dev/sda6 1921036 36352 1787100 2% /tmp
/dev/sda2 14614904 978032 12894472 8% /var
/dev/sda3 9612516 3050876 6073348 34% /usr
/dev/sdb1 1922858352 68956 1825113796 1% /media/coop-disk-01


I rebooted the system just for fun. The system didn't come back up! I had to connect a monitor and saw the system was trying to PXE boot!!! Oh crap !!! What did I do? Did I just format my boot disk? Well turns out that Phoniex Setup software on the HP ML110 defautls to using the USB device as the boot disk. I had to hit F10 and get into the setup and monkey with the boot order and everything was fine. Kinda of scary !!!

2 comments:

  1. I took the mybook entries out of the fstab. If a drive was unresponsive for some reason it would cause boot problems. (grub on ubuntu kinda sucks ... no good option for single user mode) Also just allowing for hald to mount the disk for me only works someone logs on graphically (ie. the mybook usb drives will not mount automatically if some ssh's into the server). So I cam up with a script that simply issues the appropriate mount commands. I will try putting this in the /etc/init.d/ but for now I simply login and run the script. (which I will post later)

    ReplyDelete
  2. Oh and UUID do change on you when you least expect them too! Watch out!

    ReplyDelete