Saturday, 10 October 2009

Configure external disk

I bought the Patriot-Convoy-XL Raid case (eSATA&USB), equipped with two 250GB WesternDigital HDDs. The raid device shall be mounted as external USB-2.0 device. To avoid collisions with other USB storage devices, the device shall be detected via unique UUID.

The following command lists the UUID of all connected disks
> ls -lF /dev/disk/by-uuid
frehberg@freza:~$ ls -lF /dev/disk/by-uuid
total 0
... 3220f76f-0967-4fe8-ad70-b97bca895bd6 -> ../../sda5
... 4c7a980e-b3a6-4ae3-8225-53f0a448b474 -> ../../sda1
... 9cd4ffd9-40b2-4968-9d9d-dbb82255370d -> ../../sdc

I want the device being mounted at  /media/raid/, I have got to create first
> sudo mkdir /media/raid

Add the following line with text editor to /etc/fstab, so the device with UUID 9cd4ffd9-40b2-4968-9d9d-dbb82255370d will be mounted beneath /media/raid

# line added to /etc/fstab
UUID=9cd4ffd9-40b2-4968-9d9d-dbb82255370d /media/raid     ext4    relatime       0        1

Finally unmount the device /dev/sdc and mount it under the new branch
> umount /dev/sdc
> mount -a

No comments:

Post a Comment