[SFS] mounting linux filesystem from local drives

Aaron Brown aayore@gmail.com
Thu, 12 Jan 2017 19:02:41 -0700


This is a multi-part message in MIME format.
--------------050307070604020508070207
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

It's definitely fine to edit the fstab while the drive is online. It 
*should* be fine to provide a label with the drive online, but if you've 
got stuff you can't lose I'd advise testing somewhere else or unmounting 
the drive first. I'm really not sure if FS labels show up under 
/dev/mapper/. I think the label applies to the base block device, so I 
don't think device mapper will pick it up and put it in /dev/mapper/. 
Let me know what you find out. :)

Also - There's really no downside to LVM. It doesn't impact storage 
performace 
(http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance) 
and it gives you a bunch of options that you might want in the future. 
If you ever start to run out of space, you could add a second RAID 
volume and use LVM to concatenate them together. If space isn't an 
issue, then you've got room for snapshots.

Jed Walker wrote:
>
> Thank you Aaron. It is being use now, so can I run that while it is
> being used to give it a label, and then change the fstab and remount
> later? Also, when you say a “label” does that mean it will show as
> something like /dev/mapper/<label> ?
>
> *From:*Aaron Brown [mailto:aayore@gmail.com]
> *Sent:* Thursday, January 12, 2017 6:36 PM
> *To:* Jed Walker
> *Cc:* sfs
> *Subject:* Re: [SFS] mounting linux filesystem from local drives
>
> The local drives won't move around on you. They're not subjected to
> the same dynamic mapping that's incurred when you use remote disks.
> But if you're worried about it, you could mount by label. Just use
> `xfs_admin -L my_data_disk /dev/sdb1` to label the partition and use
> LABEL=my_data_disk in place of /dev/sdb1 your fstab.
>
> -Aaron
>
>
> *Jed Walker* <mailto:jedwa@comcast.net>
>
> January 12, 2017 at 6:29 PM
>
> I have a local disk (raid10) I mounted for storage in CentOS 7. From
> reading I believe there is no reason to put LVM on top and I can just
> partition and mount. So I figured I mount the filesystem directly on
> the partition.
>
> /etc/fstab, like:
>
> /dev/sdb1 /mydata xfs defaults,noatime 0 0
>
> This all worked fine and seems fine after reboot, but I got worried.
> This is not something I’ve done before since my experience is with big
> databases, thus I have only worked with mounting external LUNs from
> storage devices. On those I always use multipath and udev to associate
> them to the disks because the /dev/<dev> names can change on reboot.
>
>
> Is this not true with local drives? i.e. will the local drives always
> mount with the same name, thus my /etc/fstab above is valid?
>
> Thank you for your help,
>
> Jed

--------------050307070604020508070207
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<HTML><HEAD><META content="text/html; charset=UTF-8" http-equiv="Content-Type"></HEAD><BODY>It's definitely fine to edit the fstab while the drive is online.&nbsp; It *should* be fine to provide a label with the drive online, but if you've got stuff you can't lose I'd advise testing somewhere else or unmounting the drive first.&nbsp; I'm really not sure if FS labels show up under /dev/mapper/.&nbsp; I think the label applies to the base block device, so I don't think device mapper will pick it up and put it in /dev/mapper/.&nbsp; Let me know what you find out.&nbsp; :)<BR>
<BR>
Also - There's really no downside to LVM.&nbsp; It doesn't impact storage performace (http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance) and it gives you a bunch of options that you might want in the future.&nbsp; If you ever start to run out of space, you could add a second RAID volume and use LVM to concatenate them together.&nbsp; If space isn't an issue, then you've got room for snapshots.&nbsp; <BR>
<BR>
Jed Walker wrote:<BR>
<blockquote type="cite"><BR>
Thank you Aaron. It is being use now, so can I run that while it is <BR>
being used to give it a label, and then change the fstab and remount <BR>
later? Also, when you say a “label” does that mean it will show as <BR>
something like /dev/mapper/&lt;label&gt; ?<BR>
<BR>
*From:*Aaron Brown [mailto:aayore@gmail.com]<BR>
*Sent:* Thursday, January 12, 2017 6:36 PM<BR>
*To:* Jed Walker<BR>
*Cc:* sfs<BR>
*Subject:* Re: [SFS] mounting linux filesystem from local drives<BR>
<BR>
The local drives won't move around on you. They're not subjected to <BR>
the same dynamic mapping that's incurred when you use remote disks. <BR>
But if you're worried about it, you could mount by label. Just use <BR>
`xfs_admin -L my_data_disk /dev/sdb1` to label the partition and use <BR>
LABEL=my_data_disk in place of /dev/sdb1 your fstab.<BR>
<BR>
-Aaron<BR>
<BR>
<BR>
*Jed Walker* &lt;mailto:jedwa@comcast.net&gt;<BR>
<BR>
January 12, 2017 at 6:29 PM<BR>
<BR>
I have a local disk (raid10) I mounted for storage in CentOS 7. From <BR>
reading I believe there is no reason to put LVM on top and I can just <BR>
partition and mount. So I figured I mount the filesystem directly on <BR>
the partition.<BR>
<BR>
/etc/fstab, like:<BR>
<BR>
/dev/sdb1 /mydata xfs defaults,noatime 0 0<BR>
<BR>
This all worked fine and seems fine after reboot, but I got worried. <BR>
This is not something I’ve done before since my experience is with big <BR>
databases, thus I have only worked with mounting external LUNs from <BR>
storage devices. On those I always use multipath and udev to associate <BR>
them to the disks because the /dev/&lt;dev&gt; names can change on reboot.<BR>
<BR>
<BR>
Is this not true with local drives? i.e. will the local drives always <BR>
mount with the same name, thus my /etc/fstab above is valid?<BR>
<BR>
Thank you for your help,<BR>
<BR>
Jed<BR>
</BODY></HTML>

--------------050307070604020508070207--