/var on a USB disk
Derek Broughton
news at pointerstop.ca
Fri Aug 8 13:50:52 UTC 2008
Florian Diesch wrote:
> Teemu Nikkilä <teemu.nikkila at innovativeideasoy.com> wrote:
>
>> I'd like to keep /var on a USB disk,
>
> Why do you want that?
>
>
>> but there are serious problems since
>> the /dev/sdX entries are dynamically changed as I plug in an another
>> drive.
>>
>> The fstab entry is based on the disk uuid:
>> # /dev/sdc1
>> UUID=b443310d-5a1a-43df-9731-038cbf61a2ea /var ext3 relatime 0 2
>>
>> Here /dev/sdc1 is wrong:
>
> /dev/sdc1 is just a comment, it isn't used by the system.
>
> [...]
>> Is there a way to mount the drive based on the uuid only?
>
> It's the default since AFAIR Ubuntu 7.04
>
I started to write this same post the other day :-) (Right to the point
of "why would you want to do that?")
But there really _is_ something wrong here. There's no way that adding
another USB drive while you have one mounted should move the first
from /dev/sdb to /dev/sdc. There's even less reason why it should make a
difference to any currently mounted device. While I agree with you that
the /dev/sdc1 in /etc/fstab is just a comment, look at the output from
mount: mount clearly _maps_ the UUID to the current /dev device where that
UUID is found, and _then_ mounts it, so no it's not a "pure" uuid-only
mount. In my case:
$ grep -B 1 -i uuid /etc/fstab
# /dev/sda6
UUID=9ed67955-1660-41cc-bae1-be8277b3c626 / jfs ...
and:
$ mount | grep sda6
/dev/sda6 on / type jfs (rw,noatime,errors=remount-ro)
--
derek
More information about the ubuntu-users
mailing list