[SFS] mounting linux filesystem from local drives

Aaron Brown aayore@gmail.com
Fri, 13 Jan 2017 09:09:39 -0700


This is a multi-part message in MIME format.
--------------050309070607050602000101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

The UUID is a good suggestion.  (Although this is all a bit silly since 
the local /dev/sdb1 won't change on you.)  You can run into a problem 
with multipathed volumes when mounting by label, because it'll see 
several volumes with the same label.  There's a way around that, but I 
don't remember what it is.  You have to set a priority order somewhere.

> David L. Willson <mailto:dlwillson@sofree.us>
> January 13, 2017 at 8:49 AM
> Some thoughts:
> - I like UUID=... better than LABEL=... for specifying what to mount. 
> It's even less likely to change or collide. You can discover the 
> current label, UUID, and some other interesting things by running 
> `blkid` against the device.
> - Editing fstab while the system is running is fine, iif you reboot or 
> at least run `mount -av` to verify that you did what you meant. Doing 
> it optimistically is a bad habit to get into.
> - Starting with LVM and the smallest reasonable logical volumes is a 
> really good idea for machines that may be in service a long time.
> - Labeled filesystems should appear by label in /dev/disk/by-label/ 
> and not in /dev/mapper/.
>
> ```
> [dlwillson@intecrowd-vboxws ~]$ ls -l /dev/disk/by-label/
> total 0
> lrwxrwxrwx. 1 root root 9 Jan 13 08:20 VBOXADDITIONS_5.1.10_112026 -> 
> ../../sr0
> [dlwillson@intecrowd-vboxws ~]$ ll /dev/mapper/
> total 0
> lrwxrwxrwx. 1 root root       7 Jan 13 08:19 centos-root -> ../dm-0
> lrwxrwxrwx. 1 root root       7 Jan 13 08:19 centos-swap -> ../dm-1
> crw-------. 1 root root 10, 236 Jan 13 08:19 control
> [dlwillson@intecrowd-vboxws ~]$ blkid /dev/dm-0
> /dev/dm-0: UUID="6e274ff6-a3a5-4d02-9ace-1f99c11158ed" TYPE="xfs"
> [dlwillson@intecrowd-vboxws ~]$
> ```
>
> --
> David L. Willson
> Teacher, Engineer, Evangelist
> RHCE+Satellite CCAH Linux+ LPIC-1 SUSE_CLP LFCS
> Mobile 720-333-LANS(5267)
> http://sofree.us
>
> This is a good time for a r3VOLution.
>
> ------------------------------------------------------------------------
> *From: *"Jed Walker" <jedwa@comcast.net>
> *To: *"Aaron Brown" <aayore@gmail.com>
> *Cc: *"sfs" <sfs@thegeek.nu>
> *Sent: *Thursday, January 12, 2017 9:04:11 PM
> *Subject: *RE: [SFS] mounting linux filesystem from local drives
>
> Yes, editing fstab while the system is running is fine, I've done that 
> a ton. I was wondering about the xfs_admin command. If I have the time 
> I'll that command and see what happens (and reply). I just can't 
> afford to waste time fixing it since I have to get it to the DC Monday.
>
>
>
> Yes, I like LVM for adding more space but the drive bays are full so I 
> figured it wouldn't be happening and we'll hopefully move off to a 
> storage device for more space later.
>
> I appreciate all the help, and thanks for the article on LVM and 
> performance.
>
> *From:*Aaron Brown [mailto:aayore@gmail.com]
> *Sent:* Thursday, January 12, 2017 7:03 PM
> *To:* Jed Walker
> *Cc:* 'sfs'
> *Subject:* Re: [SFS] mounting linux filesystem from local drives
>
> 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
>
>
> Jed Walker <mailto:jedwa@comcast.net>
> January 12, 2017 at 9:04 PM
>
> Yes, editing fstab while the system is running is fine, I've done that 
> a ton. I was wondering about the xfs_admin command. If I have the time 
> I'll that command and see what happens (and reply). I just can't 
> afford to waste time fixing it since I have to get it to the DC Monday.
>
>
>
> Yes, I like LVM for adding more space but the drive bays are full so I 
> figured it wouldn't be happening and we'll hopefully move off to a 
> storage device for more space later.
>
> I appreciate all the help, and thanks for the article on LVM and 
> performance.
>
> *From:*Aaron Brown [mailto:aayore@gmail.com]
> *Sent:* Thursday, January 12, 2017 7:03 PM
> *To:* Jed Walker
> *Cc:* 'sfs'
> *Subject:* Re: [SFS] mounting linux filesystem from local drives
>
> 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
>
> Aaron Brown <mailto:aayore@gmail.com>
> January 12, 2017 at 7:02 PM
> 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:
> Jed Walker <mailto:jedwa@comcast.net>
> January 12, 2017 at 6:51 PM
>
> 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
>
> Aaron Brown <mailto:aayore@gmail.com>
> January 12, 2017 at 6:36 PM
> 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
>
>


--------------050309070607050602000101
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">The UUID is a good 
suggestion.&nbsp; (Although this is all a bit silly since the local /dev/sdb1
 won't change on you.)&nbsp; You can run into a problem with multipathed 
volumes when mounting by label, because it'll see several volumes with 
the same label.&nbsp; There's a way around that, but I don't remember what it
 is.&nbsp; You have to set a priority order somewhere.<br>
<span>

</span><br>
<blockquote style="border: 0px none;" 
cite="mid:1429324249.5878.1484322560549.JavaMail.zimbra@sofree.us" 
type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
   	<a moz-do-not-send="true" href="mailto:dlwillson@sofree.us" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">David L. Willson</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">January
 13, 2017 at 8:49 AM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><div style="font-family: times 
new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Some
 thoughts:<br></div><div>- I like UUID=... better than LABEL=... for 
specifying what to mount. It's even less likely to change or collide. 
You can discover the current label, UUID, and some other interesting 
things by running `blkid` against the device.<br></div><div>- Editing 
fstab while the system is running is fine, iif you reboot or at least 
run `mount -av` to verify that you did what you meant. Doing it 
optimistically is a bad habit to get into.<br></div><div>- Starting with
 LVM and the smallest reasonable logical volumes is a really good idea 
for machines that may be in service a long time.</div><div>- Labeled 
filesystems should appear by label in /dev/disk/by-label/ and not in 
/dev/mapper/.<br></div><div><br></div><div>```<br></div><div><span 
style="font-family: courier new,courier,monaco,monospace,sans-serif;">[dlwillson@intecrowd-vboxws
 ~]$ ls -l /dev/disk/by-label/</span><br><span style="font-family: 
courier new,courier,monaco,monospace,sans-serif;">total 0</span><br><span
 style="font-family: courier new,courier,monaco,monospace,sans-serif;">lrwxrwxrwx.
 1 root root 9 Jan 13 08:20 VBOXADDITIONS_5.1.10_112026 -&gt; ../../sr0</span><br><span
 style="font-family: courier new,courier,monaco,monospace,sans-serif;">[dlwillson@intecrowd-vboxws
 ~]$ ll /dev/mapper/</span><br><span style="font-family: courier 
new,courier,monaco,monospace,sans-serif;">total 0</span><br><span 
style="font-family: courier new,courier,monaco,monospace,sans-serif;">lrwxrwxrwx.
 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7 Jan 13 08:19 centos-root -&gt; ../dm-0</span><br><span
 style="font-family: courier new,courier,monaco,monospace,sans-serif;">lrwxrwxrwx.
 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7 Jan 13 08:19 centos-swap -&gt; ../dm-1</span><br><span
 style="font-family: courier new,courier,monaco,monospace,sans-serif;">crw-------.
 1 root root 10, 236 Jan 13 08:19 control</span><br><span 
style="font-family: courier new,courier,monaco,monospace,sans-serif;">[dlwillson@intecrowd-vboxws
 ~]$ blkid /dev/dm-0</span><br><span style="font-family: courier 
new,courier,monaco,monospace,sans-serif;">/dev/dm-0: 
UUID="6e274ff6-a3a5-4d02-9ace-1f99c11158ed" TYPE="xfs" </span><br><span 
style="font-family: courier new,courier,monaco,monospace,sans-serif;">[dlwillson@intecrowd-vboxws
 ~]$</span> <br>```<br></div><div><br></div><div><span name="x"></span>--<br>David
 L. Willson<br>Teacher, Engineer, Evangelist<br>RHCE+Satellite CCAH 
Linux+ LPIC-1 SUSE_CLP LFCS<br>Mobile 720-333-LANS(5267)<br><a class="moz-txt-link-freetext" href="http://sofree.us">http://sofree.us</a><br><div><br></div>This
 is a good time for a r3VOLution.<span name="x"></span><br></div><div><br></div><hr
 id="zwchr"><div data-mce-style="color: #000; font-weight: normal; 
font-style: normal; text-decoration: none; font-family: 
Helvetica,Arial,sans-serif; font-size: 12pt;" 
style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:
 </b>"Jed Walker" <a class="moz-txt-link-rfc2396E" href="mailto:jedwa@comcast.net">&lt;jedwa@comcast.net&gt;</a><br><b>To: </b>"Aaron Brown" 
<a class="moz-txt-link-rfc2396E" href="mailto:aayore@gmail.com">&lt;aayore@gmail.com&gt;</a><br><b>Cc: </b>"sfs" <a class="moz-txt-link-rfc2396E" href="mailto:sfs@thegeek.nu">&lt;sfs@thegeek.nu&gt;</a><br><b>Sent:
 </b>Thursday, January 12, 2017 9:04:11 PM<br><b>Subject: </b>RE: [SFS] 
mounting linux filesystem from local drives<br><div><br></div><style>&lt;!--

@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--&gt;</style><div class="WordSection1"><p class="MsoNormal"><span 
data-mce-style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; 
color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Yes,
 editing fstab while the system is running is fine, I&#8217;ve done that a 
ton. I was wondering about the xfs_admin command. If I have the time 
I&#8217;ll that command and see what happens (and reply). I just can&#8217;t afford 
to waste time fixing it since I have to get it to the DC Monday.</span></p><p
 class="MsoNormal"><span data-mce-style="font-size: 11.0pt; font-family:
 'Calibri','sans-serif'; color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><br></span></p><div><br></div><p
 class="MsoNormal"><span data-mce-style="font-size: 11.0pt; font-family:
 'Calibri','sans-serif'; color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Yes,
 I like LVM for adding more space but the drive bays are full so I 
figured it wouldn&#8217;t be happening and we&#8217;ll hopefully move off to a 
storage device for more space later.</span></p><p class="MsoNormal"><span
 data-mce-style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';
 color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p><p
 class="MsoNormal"><span data-mce-style="font-size: 11.0pt; font-family:
 'Calibri','sans-serif'; color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
 appreciate all the help, and thanks for the article on LVM and 
performance.</span></p><p class="MsoNormal"><span 
data-mce-style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; 
color: #1f497d;" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p><div><div
 data-mce-style="border: none; border-top: solid #B5C4DF 1.0pt; padding:
 3.0pt 0in 0in 0in;" style="border:none;border-top:solid #B5C4DF 
1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span 
data-mce-style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';" 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
 data-mce-style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';"
 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
 Aaron Brown [<a class="moz-txt-link-freetext" href="mailto:aayore@gmail.com">mailto:aayore@gmail.com</a>] <br><b>Sent:</b> Thursday, 
January 12, 2017 7:03 PM<br><b>To:</b> Jed Walker<br><b>Cc:</b> 'sfs'<br><b>Subject:</b>
 Re: [SFS] mounting linux filesystem from local drives</span></p></div></div><p
 class="MsoNormal">&nbsp;</p><p class="MsoNormal">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></p><div><br></div><p class="MsoNormal">Also - There's
 really no downside to LVM.&nbsp; It doesn't impact storage performace (<a 
moz-do-not-send="true" 
data-mce-href="http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance"
 target="_blank" 
href="http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance">http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance</a>)
 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></p><div><br></div><p 
class="MsoNormal">Jed Walker wrote:<br></p><div><br></div><p 
class="MsoNormal"><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 &#8220;label&#8221; does that 
mean it will show as <br>something like /dev/mapper/&lt;label&gt; ?<br></p><div><br></div><p
 class="MsoNormal">*From:*Aaron Brown [<a moz-do-not-send="true" 
data-mce-href="mailto:aayore@gmail.com" target="_blank" 
href="mailto:aayore@gmail.com">mailto:aayore@gmail.com</a>]<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></p><div><br></div><p
 class="MsoNormal">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></p><div><br></div><p class="MsoNormal">-Aaron<br></p><div><br></div><p
 class="MsoNormal"><br>*Jed Walker* &lt;<a moz-do-not-send="true" 
data-mce-href="mailto:jedwa@comcast.net" target="_blank" 
href="mailto:jedwa@comcast.net">mailto:jedwa@comcast.net</a>&gt;<br></p><div><br></div><p
 class="MsoNormal">January 12, 2017 at 6:29 PM<br></p><div><br></div><p 
class="MsoNormal">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></p><div><br></div><p 
class="MsoNormal">/etc/fstab, like:<br></p><div><br></div><p 
class="MsoNormal">/dev/sdb1 /mydata xfs defaults,noatime 0 0<br></p><div><br></div><p
 class="MsoNormal">This all worked fine and seems fine after reboot, but
 I got worried. <br>This is not something I&#8217;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></p><div><br></div><p 
class="MsoNormal"><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></p><div><br></div><p class="MsoNormal">Thank you for
 your help,<br></p><div><br></div><p class="MsoNormal">Jed</p></div></div><div><br></div></div></div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
   	<a moz-do-not-send="true" href="mailto:jedwa@comcast.net" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Jed Walker</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">January
 12, 2017 at 9:04 PM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><meta content="text/html; 
charset=ISO-8859-1" http-equiv="Content-Type"><meta content="Microsoft 
Word 14 (filtered medium)" name="Generator"><style>&lt;!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--&gt;</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p 
class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Yes,
 editing fstab while the system is running is fine, I&#8217;ve done that a 
ton. I was wondering about the xfs_admin command. If I have the time 
I&#8217;ll that command and see what happens (and reply). I just can&#8217;t afford 
to waste time fixing it since I have to get it to the DC Monday.<o:p></o:p></span></p><p
 class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><br><br>Yes,
 I like LVM for adding more space but the drive bays are full so I 
figured it wouldn&#8217;t be happening and we&#8217;ll hopefully move off to a 
storage device for more space later.<o:p></o:p></span></p><p 
class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p><p
 class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
 appreciate all the help, and thanks for the article on LVM and 
performance.<o:p></o:p></span></p><p class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p><div><div
 style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in
 0in"><p class="MsoNormal"><b><span 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
 Aaron Brown [<a class="moz-txt-link-freetext" href="mailto:aayore@gmail.com">mailto:aayore@gmail.com</a>] <br><b>Sent:</b> Thursday, 
January 12, 2017 7:03 PM<br><b>To:</b> Jed Walker<br><b>Cc:</b> 'sfs'<br><b>Subject:</b>
 Re: [SFS] mounting linux filesystem from local drives<o:p></o:p></span></p></div></div><p
 class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">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 (<a moz-do-not-send="true" 
href="http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance">http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance</a>)
 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><br><o:p></o:p></p><p
 class="MsoNormal"><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 &#8220;label&#8221; does that 
mean it will show as <br>something like /dev/mapper/&lt;label&gt; ?<br><br>*From:*Aaron
 Brown [<a moz-do-not-send="true" href="mailto:aayore@gmail.com">mailto:aayore@gmail.com</a>]<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;<a moz-do-not-send="true" href="mailto:jedwa@comcast.net">mailto:jedwa@comcast.net</a>&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&#8217;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<o:p></o:p></p></div></div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
   	<a moz-do-not-send="true" href="mailto:aayore@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Aaron Brown</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">January
 12, 2017 at 7:02 PM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">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 
(<a class="moz-txt-link-freetext" href="http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance">http://unix.stackexchange.com/questions/7122/does-lvm-impact-performance</a>)
 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>
  </div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
   	<a moz-do-not-send="true" href="mailto:jedwa@comcast.net" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Jed Walker</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">January
 12, 2017 at 6:51 PM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><meta content="text/html; 
charset=ISO-8859-1" http-equiv="Content-Type"><meta content="Microsoft 
Word 14 (filtered medium)" name="Generator"><style>&lt;!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--&gt;</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p 
class="MsoNormal"><span style="color:#1F497D">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
 &#8220;label&#8221; does that mean it will show as something like 
/dev/mapper/&lt;label&gt; ?<o:p></o:p></span></p><p class="MsoNormal"><span
 style="color:#1F497D"><o:p>&nbsp;</o:p></span></p><p class="MsoNormal"><span
 style="color:#1F497D"><o:p>&nbsp;</o:p></span></p><div><div 
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 
0in"><p class="MsoNormal"><b><span 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
 
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
 Aaron Brown [<a class="moz-txt-link-freetext" href="mailto:aayore@gmail.com">mailto:aayore@gmail.com</a>] <br><b>Sent:</b> Thursday, 
January 12, 2017 6:36 PM<br><b>To:</b> Jed Walker<br><b>Cc:</b> sfs<br><b>Subject:</b>
 Re: [SFS] mounting linux filesystem from local drives<o:p></o:p></span></p></div></div><p
 class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">The local drives
 won't move around on you.&nbsp; They're not subjected to the same dynamic 
mapping that's incurred when you use remote disks.&nbsp; But if you're 
worried about it, you could mount by label.&nbsp; 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.<br><br>-Aaron<br><br><br><o:p></o:p></p><div
 
style="margin-left:18.75pt;margin-top:22.5pt;margin-right:18.75pt;margin-bottom:7.5pt"><div
 style="border:none;border-top:solid #EDEEF0 1.0pt;padding:4.0pt 0in 0in
 0in"><div><p style="vertical-align:middle" class="MsoNormal"><a 
moz-do-not-send="true" href="mailto:jedwa@comcast.net"><b>Jed Walker</b></a><o:p></o:p></p></div><p
 style="text-align:right;vertical-align:middle" class="MsoNormal" 
align="right"><span style="color:#9FA2A5">January 12, 2017 at 6:29 PM</span><o:p></o:p></p></div></div><div
 style="margin-left:.25in;margin-right:.25in"><p class="MsoNormal">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. <o:p></o:p></p><p class="MsoNormal">&nbsp;<o:p></o:p></p><p 
class="MsoNormal">/etc/fstab, like:<o:p></o:p></p><p class="MsoNormal"><span
 style="font-size:9.0pt;font-family:&quot;Courier 
New&quot;,&quot;serif&quot;">/dev/sdb1&nbsp; /mydata&nbsp; xfs defaults,noatime 0 0</span><o:p></o:p></p><p
 class="MsoNormal"><span 
style="font-size:9.0pt;font-family:&quot;Courier 
New&quot;,&quot;serif&quot;">&nbsp;</span><o:p></o:p></p><p class="MsoNormal">This
 all worked fine and seems fine after reboot, but I got worried.&nbsp; This 
is not something I&#8217;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/&lt;dev&gt; names can change on 
reboot.<o:p></o:p></p><p class="MsoNormal"><br>Is this not true with 
local drives? &nbsp;i.e. will the local drives always mount with the same 
name, thus my /etc/fstab above is valid?<o:p></o:p></p><p 
class="MsoNormal">&nbsp;<o:p></o:p></p><p class="MsoNormal">Thank you for 
your help,<o:p></o:p></p><p class="MsoNormal">&nbsp;<o:p></o:p></p><p 
class="MsoNormal">Jed<o:p></o:p></p><p class="MsoNormal"><span 
style="font-size:9.0pt;font-family:&quot;Courier 
New&quot;,&quot;serif&quot;">&nbsp;</span><o:p></o:p></p></div><p 
class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times 
New Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p></div></div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
   	<a moz-do-not-send="true" href="mailto:aayore@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Aaron Brown</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">January
 12, 2017 at 6:36 PM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
The local drives won't 
move around on you.&nbsp; They're not subjected to the same dynamic mapping 
that's incurred when you use remote disks.&nbsp; But if you're worried about 
it, you could mount by label.&nbsp; 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.<br>
<br>
-Aaron<br>
<span>

</span><br>

<br>
  </div>
</blockquote>
<br>
</body></html>

--------------050309070607050602000101--