[SFS] mounting linux filesystem from local drives

Jed Walker jedwa@comcast.net
Thu, 12 Jan 2017 21:04:11 -0700


This is a multipart message in MIME format.

------=_NextPart_000_006F_01D26D17.6E014CA0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Yes, editing fstab while the system is running is fine, I=E2=80=99ve =
done that a ton. I was wondering about the xfs_admin command. If I have =
the time I=E2=80=99ll that command and see what happens (and reply). I =
just can=E2=80=99t 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=E2=80=99t be happening and we=E2=80=99ll hopefully =
move off to a storage device for more space later.

=20

I appreciate all the help, and thanks for the article on LVM and =
performance.

=20

From: Aaron Brown [mailto:aayore@gmail.com]=20
Sent: Thursday, January 12, 2017 7:03 PM
To: Jed Walker
Cc: 'sfs'
Subject: Re: [SFS] mounting linux filesystem from local drives

=20

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. =20

Jed Walker wrote:




Thank you Aaron. It is being use now, so can I run that while it is=20
being used to give it a label, and then change the fstab and remount=20
later? Also, when you say a =E2=80=9Clabel=E2=80=9D does that mean it =
will show as=20
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=20
the same dynamic mapping that's incurred when you use remote disks.=20
But if you're worried about it, you could mount by label. Just use=20
`xfs_admin -L my_data_disk /dev/sdb1` to label the partition and use=20
LABEL=3Dmy_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=20
reading I believe there is no reason to put LVM on top and I can just=20
partition and mount. So I figured I mount the filesystem directly on=20
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.=20
This is not something I=E2=80=99ve done before since my experience is =
with big=20
databases, thus I have only worked with mounting external LUNs from=20
storage devices. On those I always use multipath and udev to associate=20
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=20
mount with the same name, thus my /etc/fstab above is valid?

Thank you for your help,

Jed


------=_NextPart_000_006F_01D26D17.6E014CA0
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 14 (filtered =
medium)"><style><!--
/* 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;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Yes, editing fstab while the system is running is fine, I=E2=80=99ve =
done that a ton. I was wondering about the xfs_admin command. If I have =
the time I=E2=80=99ll that command and see what happens (and reply). I =
just can=E2=80=99t afford to waste time fixing it since I have to get it =
to the DC Monday.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><br><br>Yes, I like LVM for adding more space but the drive bays are =
full so I figured it wouldn=E2=80=99t be happening and we=E2=80=99ll =
hopefully move off to a storage device for more space =
later.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>I appreciate all the help, and thanks for the article on LVM and =
performance.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><div><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
Aaron Brown [mailto:aayore@gmail.com] <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=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>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 =
href=3D"http://unix.stackexchange.com/questions/7122/does-lvm-impact-perf=
ormance">http://unix.stackexchange.com/questions/7122/does-lvm-impact-per=
formance</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=3DMsoNormal><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 =
=E2=80=9Clabel=E2=80=9D does that mean it will show as <br>something =
like /dev/mapper/&lt;label&gt; ?<br><br>*From:*Aaron Brown [<a =
href=3D"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=3Dmy_data_disk in place of /dev/sdb1 your =
fstab.<br><br>-Aaron<br><br><br>*Jed Walker* &lt;<a =
href=3D"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=E2=80=99ve 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></body></html>
------=_NextPart_000_006F_01D26D17.6E014CA0--