I'd like to keep /var on a USB disk, 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:
$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2008-08-06 16:32
b443310d-5a1a-43df-9731-038cbf61a2ea -> ../../sdb1
Now, if I plug in a new drive in the USB bus, /dev/sdb becomes /dev/sdc:
$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2008-08-06 17:14
b443310d-5a1a-43df-9731-038cbf61a2ea -> ../../sdc1
and the system is hosed:
$ ls /var/
ls: reading directory /var/: Input/output error
Is there a way to mount the drive based on the uuid only?
Cheers,
Teemu
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
08-07-2008, 04:41 PM
Florian Diesch
/var on a USB disk
Teemu Nikkilä <teemu.nikkila@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
Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
08-08-2008, 01:50 PM
Derek Broughton
/var on a USB disk
Florian Diesch wrote:
> Teemu Nikkilä <teemu.nikkila@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: