Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   mounting multipath volumes with /etc/fstab (http://www.linux-archive.org/debian-user/508348-mounting-multipath-volumes-etc-fstab.html)

mikie mike 04-01-2011 07:52 AM

mounting multipath volumes with /etc/fstab
 
Hi,

I would like to mount multipath volumes with /etc/fstab.
I have storage attached to my Debian server with redundant paths.
There are 3 volumes and 2 possible paths to each.

Here goes the list displayed by multipath -ll:

# multipath -ll
3600c0ff00010b3e0a1e32d4d03000000 dm-2 HP,MSA2312fc
size=1.4T features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 6:0:2:3 sdd 8:48 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
*`- 6:0:3:3 sdg 8:96 active ready running
3600c0ff00010b3e0a1e32d4d01000000 dm-0 HP,MSA2312fc
size=1.4T features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 6:0:2:1 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
*`- 6:0:3:1 sde 8:64 active ready running
3600c0ff00010b3e0a1e32d4d02000000 dm-1 HP,MSA2312fc
size=1.4T features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 6:0:2:2 sdc 8:32 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
*`- 6:0:3:2 sdf 8:80 active ready running

Disks by path:

# ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root *9 Mar 24 15:04 pci-0000:00:1f.1-scsi-0:0:0:0
-> ../../sr0
lrwxrwxrwx 1 root root *9 Mar 24 15:04 pci-0000:02:0e.0-scsi-0:2:0:0
-> ../../sda
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:02:0e.0-scsi-0:2:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:02:0e.0-scsi-0:2:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:02:0e.0-scsi-0:2:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0001000000000000 -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0001000000000000-part1 ->
../../sdb1
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0002000000000000 -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0002000000000000-part1 ->
../../sdc1
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0003000000000000 -> ../../sdd
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x217000c0ff10a22c:0x0003000000000000-part1 ->
../../sdd1
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0001000000000000 -> ../../sde
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0001000000000000-part1 ->
../../sde1
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0002000000000000 -> ../../sdf
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0002000000000000-part1 ->
../../sdf1
lrwxrwxrwx 1 root root *9 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0003000000000000 -> ../../sdg
lrwxrwxrwx 1 root root 10 Mar 24 15:04
pci-0000:0c:06.0-fc-0x257000c0ff10a22c:0x0003000000000000-part1 ->
../../sdg1


Disks by UUID:
lrwxrwxrwx 1 root root 10 Mar 24 15:04
1ec887b9-6d38-4314-b472-9ca797c81715 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Mar 24 15:04
7fa1c2b9-bc1d-456a-aedd-67f00eb99bf6 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 24 15:04
f1325167-0ed8-4a5e-8719-6e2bb8e22cbd -> ../../sda1


I actually need to mount sdf1 partition through /etc/fstab.

I tried both ways:
UUID=1ec887b9-6d38-4314-b472-9ca797c81715 /backup ext4 errors=remount-ro 0 2
/dev/disk/by-id/dm-uuid-part1-mpath-3600c0ff00010b3e0a1e32d4d02000000
/backup ext4 errors=continue 0 2

but neither worked.
When booting there is following error message and the system goes into
maintenance (even though there is "errors=continue" in /etc/fstab):

device-mapper: table: multipath: error getting device done


Finally I took a work around method and I mount it by an entry in /etc/rc.local:

mount /dev/mapper/3600c0ff00010b3e0a1e32d4d02000000-part1 /backup

which actually works but I would rather do it by /etc/fstab, tho.

Could you please tell me why device-mapper can't "get device done"?


Best regards,
Mike


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi==K_KAMvLqyRMTPkFY3mbJOdTPnXzTzWpzNxYe@mail .gmail.com">http://lists.debian.org/AANLkTi==K_KAMvLqyRMTPkFY3mbJOdTPnXzTzWpzNxYe@mail .gmail.com

Ron Johnson 04-01-2011 08:10 AM

mounting multipath volumes with /etc/fstab
 
On 04/01/2011 02:52 AM, mikie mike wrote:

Hi,

I would like to mount multipath volumes with /etc/fstab.
I have storage attached to my Debian server with redundant paths.
There are 3 volumes and 2 possible paths to each.


[snip]



Finally I took a work around method and I mount it by an entry in /etc/rc.local:

mount /dev/mapper/3600c0ff00010b3e0a1e32d4d02000000-part1 /backup

which actually works but I would rather do it by /etc/fstab, tho.

Could you please tell me why device-mapper can't "get device done"?



Don't know the answer to that, but what if you add a label to the file
system with the appropriate tool and then in your fstab have an entry like:

LABEL=REALLY_BIG_FS /backup ext4 defaults blah blah

It occurs to me, though, that the problem might be that multipath isn't
completely running when the boot process reads /etc/fstab.


--
"Neither the wisest constitution nor the wisest laws will secure
the liberty and happiness of a people whose manners are universally
corrupt."
Samuel Adams, essay in The Public Advertiser, 1749


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4D958867.6040501@cox.net">http://lists.debian.org/4D958867.6040501@cox.net

mikie mike 04-01-2011 09:36 AM

mounting multipath volumes with /etc/fstab
 
On Fri, Apr 1, 2011 at 10:10 AM, Ron Johnson <ron.l.johnson@cox.net> wrote:

>> Could you please tell me why device-mapper can't "get device done"?
> Don't know the answer to that, but what if you add a label to the file
> system with the appropriate tool and then in your fstab have an entry like:
> LABEL=REALLY_BIG_FS /backup ext4 defaults blah blah

I don't remember if I already tried this one but I'm afraid it could
be mounted out of multipath then.

> It occurs to me, though, that the problem might be that multipath isn't
> completely running when the boot process reads /etc/fstab.

Seems likely.

Anyone could confirm or maybe recommend any solution to e.g. postpone
mounting until multipath gets loaded?
Or may be solution I chose ("manually" mounting via /etc/rc.local) is
just right?

Thanks Ron.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=PsB2xU=OOAthHM0CsmDa2Wnb6_CSe0_5twa3u@mail .gmail.com">http://lists.debian.org/AANLkTi=PsB2xU=OOAthHM0CsmDa2Wnb6_CSe0_5twa3u@mail .gmail.com

Gilles Mocellin 04-01-2011 09:40 PM

mounting multipath volumes with /etc/fstab
 
Le vendredi 01 avril, mikie mike écrivit :

> On Fri, Apr 1, 2011 at 10:10 AM, Ron Johnson <ron.l.johnson@cox.net> wrote:
>
> >> Could you please tell me why device-mapper can't "get device done"?
> > Don't know the answer to that, but what if you add a label to the file
> > system with the appropriate tool and then in your fstab have an entry like:
> > LABEL=REALLY_BIG_FS /backup ext4 defaults blah blah
>
> I don't remember if I already tried this one but I'm afraid it could
> be mounted out of multipath then.
>
> > It occurs to me, though, that the problem might be that multipath isn't
> > completely running when the boot process reads /etc/fstab.
>
> Seems likely.
>
> Anyone could confirm or maybe recommend any solution to e.g. postpone
> mounting until multipath gets loaded?
> Or may be solution I chose ("manually" mounting via /etc/rc.local) is
> just right?

Perhaps using the _netdev mount option in fstab ?

The other solution is by installing the multipath-tools-boot package,
which activate all multupathing stuff in initramfs (beware to regenarate
it if you modifiy your /etc/multipath.conf file).
=> I sugest you to rename your multipath devices with the alias option
in multipath.conf, and use that name in fstab, more stable name.

mikie mike 04-04-2011 01:40 PM

mounting multipath volumes with /etc/fstab
 
On Fri, Apr 1, 2011 at 11:40 PM, Gilles Mocellin
<gilles.mocellin@free.fr> wrote:

>> Anyone could confirm or maybe recommend any solution to e.g. postpone
>> mounting until multipath gets loaded?
>> Or may be solution I chose ("manually" mounting via /etc/rc.local) is
>> just right?
> The other solution is by installing the multipath-tools-boot package,
> which activate all multupathing stuff in initramfs (beware to regenarate
> it if you modifiy your /etc/multipath.conf file).

I tried this but ran into troubles at initrd level

When booting after installing multipath-tools-boot i get something like:

mount: Mounting /dev/sda1 on /root failed: Device or resource busy

I don't know if this is the issue but before this event there is:

Failure: failed to load module dm-emc

I think there might be something wrong with multipath-tools-boot
package, because it doesn't work even though I didn't mess with it at
all - just installed and rebooted.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=PHx4_=bb1d-W0UW84LJEQyRBSXA@mail.gmail.com">http://lists.debian.org/BANLkTi=PHx4_=bb1d-W0UW84LJEQyRBSXA@mail.gmail.com

Gilles Mocellin 04-04-2011 09:38 PM

mounting multipath volumes with /etc/fstab
 
Le lundi 04 avril, mikie mike écrivit :

> On Fri, Apr 1, 2011 at 11:40 PM, Gilles Mocellin
> <gilles.mocellin@free.fr> wrote:
>
> >> Anyone could confirm or maybe recommend any solution to e.g. postpone
> >> mounting until multipath gets loaded?
> >> Or may be solution I chose ("manually" mounting via /etc/rc.local) is
> >> just right?
> > The other solution is by installing the multipath-tools-boot package,
> > which activate all multupathing stuff in initramfs (beware to regenarate
> > it if you modifiy your /etc/multipath.conf file).
>
> I tried this but ran into troubles at initrd level
>
> When booting after installing multipath-tools-boot i get something like:
>
> mount: Mounting /dev/sda1 on /root failed: Device or resource busy

I think I had some problems too.
I was forced to use a label on my /boot filesystem and use that in fstab
:
/dev/disk/by-label/boot /boot ext3 defaults 0 2

You don't seem to use a separate filesystem for /boot.
If your root filesystem is on a multipath device, don't use on path to
boot, you should try root=/dev/mapper/something

Anyway, device naming is not predictable, if you add your FC connection
after installing your server, perhaps their device will be discovered
before your internal disks and /dev/sda1 is not anymore your rootfs.

Try using stable names, I use LVM, and for /boot where I can't (in
Lenny) I use label.

Don't forget to update-initramfs -u after any modifications concerning
the boot process.

> I don't know if this is the issue but before this event there is:
> Failure: failed to load module dm-emc

As you don't seem to use an EMC SAN, I think it's not a problem.


Anotherthing I remember : adding rootdelay=10 change how some steps are
done, and it has helped me.
My case is a bit more special as I boot directly on a multpiathed device
on SAN...

mikie mike 04-05-2011 10:57 AM

mounting multipath volumes with /etc/fstab
 
On Mon, Apr 4, 2011 at 11:38 PM, Gilles Mocellin
<gilles.mocellin@free.fr> wrote:

>> I tried this but ran into troubles at initrd level
>> When booting after installing multipath-tools-boot i get something like:
>> mount: Mounting /dev/sda1 on /root failed: Device or resource busy
> I think I had some problems too.
> I was forced to use a label on my /boot filesystem and use that in fstab
> /dev/disk/by-label/boot /boot * * ext3 * *defaults * * 0 * * * 2
> You don't seem to use a separate filesystem for /boot.
> If your root filesystem is on a multipath device, don't use on path to
> boot, you should try root=/dev/mapper/something
> Anyway, device naming is not predictable, if you add your FC connection
> after installing your server, perhaps their device will be discovered
> before your internal disks and /dev/sda1 is not anymore your rootfs.
> Try using stable names, I use LVM, and for /boot where I can't (in
> Lenny) I use label.

I actually mount root fs by UUID (UUID=xxxxxxx-xxxxx-xxxxxx in fstab).
May be I lied a little bit with "Mounting /dev/sda1..." message as I
just typed it as I remembered it because there was no chance to copy
and paste it. :)

> Don't forget to update-initramfs -u after any modifications concerning
> the boot process.

I did it by "dpkg-reconfigure linux-image-xxx"

> Anotherthing I remember : adding rootdelay=10 change how some steps are
> done, and it has helped me.
> My case is a bit more special as I boot directly on a multpiathed device
> on SAN...

I only use multipath device for backup storage on this backup server
so there is actually no need to mount it at the boot level. I'm gonna
stay with rc.local mounting as it is just enough for me. May be I will
face this problem once again when I need multipath device during boot.
:)

Thank you for your suggestions!


Cheers,
Mike


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=V10Dk1LPMs+p6AU4+AQrdvB8=7w@mail.gmail.com ">http://lists.debian.org/BANLkTi=V10Dk1LPMs+p6AU4+AQrdvB8=7w@mail.gmail.com


All times are GMT. The time now is 09:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.