Mailing List Archive

1 2 3  View All
Re: Hard drive error from SMART [ In reply to ]
Howdy,

I got the drive and pvmove is doing its thing.  I would like to unplug
one of the drives and physically move them around without shutting down
my system.  Is there a way to tell LVM to disable the drives while I'm
doing this and restart them when done?  I found the command vgchange -a
n<name> but I'm not sure if that is correct.  Honestly, I want to be
really sure before I unplug things.  I assume the "n" changes to "y" to
restart them? 

Thanks.

Dale

:-)  :-) 

P. S.  BTW, the drive has passed two new tests with no error.  The tests
are slower than usual tho.  I'm not sure why tho. 
Re: Hard drive error from SMART [ In reply to ]
On Fri, 15 Apr 2022 11:49:21 -0400,
Dale wrote:
>
> Howdy,
>
> I got the drive and pvmove is doing its thing.? I would like to unplug
> one of the drives and physically move them around without shutting down
> my system.? Is there a way to tell LVM to disable the drives while I'm
> doing this and restart them when done?? I found the command vgchange -a
> n<name> but I'm not sure if that is correct.? Honestly, I want to be
> really sure before I unplug things.? I assume the "n" changes to "y" to
> restart them??
>
> Thanks.
>
> Dale
>
> :-)? :-)?
>
> P. S.? BTW, the drive has passed two new tests with no error.? The tests
> are slower than usual tho.? I'm not sure why tho.?
>

No, you can't do that till the pmove is over.

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici wb2una
covici@ccs.covici.com
Re: Hard drive error from SMART [ In reply to ]
John Covici wrote:
> On Fri, 15 Apr 2022 11:49:21 -0400,
> Dale wrote:
>> Howdy,
>>
>> I got the drive and pvmove is doing its thing.  I would like to unplug
>> one of the drives and physically move them around without shutting down
>> my system.  Is there a way to tell LVM to disable the drives while I'm
>> doing this and restart them when done?  I found the command vgchange -a
>> n<name> but I'm not sure if that is correct.  Honestly, I want to be
>> really sure before I unplug things.  I assume the "n" changes to "y" to
>> restart them? 
>>
>> Thanks.
>>
>> Dale
>>
>> :-)  :-) 
>>
>> P. S.  BTW, the drive has passed two new tests with no error.  The tests
>> are slower than usual tho.  I'm not sure why tho. 
>>
> No, you can't do that till the pmove is over.
>


Yea.  I was planning to wait until pvmove was done.  It actually
finished not to long after I sent the message.  It was what prompted me
to see if this is possible.  I found a page that talks about it but the
info didn't explain it much.  I'm pretty sure that is the right command
but given the limited info, I wasn't sure.  Reading the man page helped
a little but still wasn't 100% sure then either.  Thing is, I only have
to unplug and move one of the two drives on that group. 

Sounds like the right command tho.  If not, someone speak up. 

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
Dale wrote:
> John Covici wrote:
>> On Fri, 15 Apr 2022 11:49:21 -0400,
>> Dale wrote:
>>> Howdy,
>>>
>>> I got the drive and pvmove is doing its thing.  I would like to unplug
>>> one of the drives and physically move them around without shutting down
>>> my system.  Is there a way to tell LVM to disable the drives while I'm
>>> doing this and restart them when done?  I found the command vgchange -a
>>> n<name> but I'm not sure if that is correct.  Honestly, I want to be
>>> really sure before I unplug things.  I assume the "n" changes to "y" to
>>> restart them? 
>>>
>>> Thanks.
>>>
>>> Dale
>>>
>>> :-)  :-) 
>>>
>>> P. S.  BTW, the drive has passed two new tests with no error.  The tests
>>> are slower than usual tho.  I'm not sure why tho. 
>>>
>> No, you can't do that till the pmove is over.
>>
>
> Yea.  I was planning to wait until pvmove was done.  It actually
> finished not to long after I sent the message.  It was what prompted me
> to see if this is possible.  I found a page that talks about it but the
> info didn't explain it much.  I'm pretty sure that is the right command
> but given the limited info, I wasn't sure.  Reading the man page helped
> a little but still wasn't 100% sure then either.  Thing is, I only have
> to unplug and move one of the two drives on that group. 
>
> Sounds like the right command tho.  If not, someone speak up. 
>
> Dale
>
> :-)  :-) 
>


For anyone searching and running up on this thread.  That command did
work to disable the drive.  I'm not sure if I should have used pvchange
to disable /dev/sdk1 or not.  The problem I did run into was getting it
back.  I ran the command to enable it but it didn't work as expected.  I
had files missing.  So, I unmounted it, ran pvscan, vgscan and lvscan in
that order.  I then ran the command above again to be sure and remounted
the LV group.  It worked that time. All files were there.  So, either
one has to rescan them or I should have also ran pvchange to disable as
well.  Maybe someone else can expand on this.

While I'm at it.  Is there a way to reset the sdk part?  The old was sdd
and I was hoping when I moved the drive, it would change with it.  The
reason is, usually when I hook up my external drives, they use sdk.  I'm
sort of set up for that.  A couple other things use sdk as well.  I'm
not sure if there is a easy way to do that or not.  Wonder if it will
reset when I reboot???

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
Am Fri, Apr 15, 2022 at 10:49:21AM -0500 schrieb Dale:
> Howdy,
>
> I got the drive and pvmove is doing its thing.  I would like to unplug
> one of the drives and physically move them around without shutting down
> my system.  Is there a way to tell LVM to disable the drives while I'm
> doing this and restart them when done?

Be aware that SATA hot-plugging must be enabled in the BIOS for each
individual SATA port (at least that’s the case on my board). I’m not sure
what a difference it actually makes, though.

--
Grüße | Greetings | Salut | Qapla’
Please do not share anything from, with or about me on any social network.

Be regular. Eat cron flakes.
Re: Hard drive error from SMART [ In reply to ]
Frank Steinmetzger wrote:
> Am Fri, Apr 15, 2022 at 10:49:21AM -0500 schrieb Dale:
>> Howdy,
>>
>> I got the drive and pvmove is doing its thing.  I would like to unplug
>> one of the drives and physically move them around without shutting down
>> my system.  Is there a way to tell LVM to disable the drives while I'm
>> doing this and restart them when done?
> Be aware that SATA hot-plugging must be enabled in the BIOS for each
> individual SATA port (at least that’s the case on my board). I’m not sure
> what a difference it actually makes, though.
>


I enabled that the first time I cut the system on after building it.  I
couldn't think of any reason not to have it enabled really.  It would be
like making USB require rebooting before plugging/unplugging something. 
Certainly better than the old IDE days. 

I have googled and can not find a way to reset udev and it naming
drives.  I may have to rework some things since the drive kept the sdk
instead of switching to sdd when I made the physical change.  Thing is,
I suspect it will when I reboot the next time.  It also triggered
messages from SMART too.  It got upset that it couldn't find sdd anymore. 

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sat, Apr 16, 2022 at 10:59 AM Dale <rdalek1967@gmail.com> wrote:
>
> I have googled and can not find a way to reset udev and it naming
> drives. I may have to rework some things since the drive kept the sdk
> instead of switching to sdd when I made the physical change. Thing is,
> I suspect it will when I reboot the next time.

IMO it is best to make that not matter. If you're referencing drives
by letter in configuration files, you're just asking for some change
to re-order things and cause problems.

You're using LVM, so all the drives should be assembled based on their
embedded metadata. It is fine to reference whatever temporary device
name you're using when running pvmove/pvcreate since that doesn't
really get stored anywhere. If you are directly mounting anything
without using LVM then it is best to use labels/uuids/etc to identify
partitions.

> It also triggered
> messages from SMART too. It got upset that it couldn't find sdd anymore.

That is typical when hotswapping. I believe smartd only scans drives
at startup, and of course if a drive does go offline it isn't a bad
thing that it is noisy about it. From a quick read of the manpage
SIGHUP might or might not get it to rescan the drives, and if not you
can just restart it. The daemon works by polling so if there are any
pending issues they should still get picked up after restarting the
daemon.

--
Rich
Re: Hard drive error from SMART [ In reply to ]
On Saturday, 16 April 2022 15:59:25 BST Dale wrote:
> Frank Steinmetzger wrote:
> > Am Fri, Apr 15, 2022 at 10:49:21AM -0500 schrieb Dale:
> >> Howdy,
> >>
> >> I got the drive and pvmove is doing its thing. I would like to unplug
> >> one of the drives and physically move them around without shutting down
> >> my system. Is there a way to tell LVM to disable the drives while I'm
> >> doing this and restart them when done?
> >
> > Be aware that SATA hot-plugging must be enabled in the BIOS for each
> > individual SATA port (at least that’s the case on my board). I’m not sure
> > what a difference it actually makes, though.
>
> I enabled that the first time I cut the system on after building it. I
> couldn't think of any reason not to have it enabled really. It would be
> like making USB require rebooting before plugging/unplugging something.
> Certainly better than the old IDE days.
>
> I have googled and can not find a way to reset udev and it naming
> drives. I may have to rework some things since the drive kept the sdk
> instead of switching to sdd when I made the physical change. Thing is,
> I suspect it will when I reboot the next time. It also triggered
> messages from SMART too. It got upset that it couldn't find sdd anymore.
>
> Dale
>
> :-) :-)

Have a look at this post. It explains why you could end up with a race
condition if you set up udev rules to name disks in different order than what
the kernel assigns:

https://www.linuxquestions.org/questions/linux-hardware-18/udev-persistent-disk-name-4175450519/#post4893847
Re: Hard drive error from SMART [ In reply to ]
Rich Freeman wrote:
> On Sat, Apr 16, 2022 at 10:59 AM Dale <rdalek1967@gmail.com> wrote:
>> I have googled and can not find a way to reset udev and it naming
>> drives. I may have to rework some things since the drive kept the sdk
>> instead of switching to sdd when I made the physical change. Thing is,
>> I suspect it will when I reboot the next time.
> IMO it is best to make that not matter. If you're referencing drives
> by letter in configuration files, you're just asking for some change
> to re-order things and cause problems.
>
> You're using LVM, so all the drives should be assembled based on their
> embedded metadata. It is fine to reference whatever temporary device
> name you're using when running pvmove/pvcreate since that doesn't
> really get stored anywhere. If you are directly mounting anything
> without using LVM then it is best to use labels/uuids/etc to identify
> partitions.

I have to use sd** when using cryptsetup to decrypt the drive.  I
haven't found a way around that that is easier yet.  My command was
something like cryptsetup open /dev/sdk1 <name> and then it asks for the
password.  After that, I use UUID and a entry in fstab to mount.  If
there is a easier way, I'm open to it.  I have three external drives and
as long as I only power them up one at a time, they all used sdk.  Now
they use sdd and I keep trying to type in sdk, from habit.  :/

My next project, find a good external drive enclosure like the three I
got now.  They no longer available tho.  I like them because they have a
fan, a eSATA port and a nifty display to let me know things are
working.  Really a good price for the features.  I don't like USB
connected drives.  Long story.


>> It also triggered
>> messages from SMART too. It got upset that it couldn't find sdd anymore.
> That is typical when hotswapping. I believe smartd only scans drives
> at startup, and of course if a drive does go offline it isn't a bad
> thing that it is noisy about it. From a quick read of the manpage
> SIGHUP might or might not get it to rescan the drives, and if not you
> can just restart it. The daemon works by polling so if there are any
> pending issues they should still get picked up after restarting the
> daemon.
>


Yea, it is a good thing.  I just disabled it for sdd, enabled for the
new sdk and restarted the service.  It was happy then but getting a
email from SMART always makes my heart beat a few extra beats and
sometimes causes me to swallow big too.  It's rarely good news.  Maybe
the next reboot will sort things out.  Then I get to switch everything
back to the old way again.  :/

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
Michael wrote:
> On Saturday, 16 April 2022 15:59:25 BST Dale wrote:
>> Frank Steinmetzger wrote:
>>> Am Fri, Apr 15, 2022 at 10:49:21AM -0500 schrieb Dale:
>>>> Howdy,
>>>>
>>>> I got the drive and pvmove is doing its thing. I would like to unplug
>>>> one of the drives and physically move them around without shutting down
>>>> my system. Is there a way to tell LVM to disable the drives while I'm
>>>> doing this and restart them when done?
>>> Be aware that SATA hot-plugging must be enabled in the BIOS for each
>>> individual SATA port (at least that’s the case on my board). I’m not sure
>>> what a difference it actually makes, though.
>> I enabled that the first time I cut the system on after building it. I
>> couldn't think of any reason not to have it enabled really. It would be
>> like making USB require rebooting before plugging/unplugging something.
>> Certainly better than the old IDE days.
>>
>> I have googled and can not find a way to reset udev and it naming
>> drives. I may have to rework some things since the drive kept the sdk
>> instead of switching to sdd when I made the physical change. Thing is,
>> I suspect it will when I reboot the next time. It also triggered
>> messages from SMART too. It got upset that it couldn't find sdd anymore.
>>
>> Dale
>>
>> :-) :-)
> Have a look at this post. It explains why you could end up with a race
> condition if you set up udev rules to name disks in different order than what
> the kernel assigns:
>
> https://www.linuxquestions.org/questions/linux-hardware-18/udev-persistent-disk-name-4175450519/#post4893847

I think I've read about that before.  Gonna read it in a minute.  What
I'd like is a way to reset it back to like it would be with a fresh
install for example.  I figure there is a config file somewhere that
stores this sort of thing but no clue where it is tho. 

Oh well.  Maybe one day.  ;-)

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sat, 16 Apr 2022 12:45:20 -0500, Dale wrote:

> > You're using LVM, so all the drives should be assembled based on their
> > embedded metadata. It is fine to reference whatever temporary device
> > name you're using when running pvmove/pvcreate since that doesn't
> > really get stored anywhere. If you are directly mounting anything
> > without using LVM then it is best to use labels/uuids/etc to identify
> > partitions.
>
> I have to use sd** when using cryptsetup to decrypt the drive.  I
> haven't found a way around that that is easier yet.  My command was
> something like cryptsetup open /dev/sdk1 <name> and then it asks for the
> password.

Use /dev/disks/by/partlabel/foo or /dev/disks/by-partuuid/bar.


--
Neil Bothwick

If Yoda so strong in force is, why words in right order he cannot put?
Re: Hard drive error from SMART [ In reply to ]
Am Sat, Apr 16, 2022 at 12:45:20PM -0500 schrieb Dale:

> My next project, find a good external drive enclosure like the three I
> got now.  They no longer available tho.  I like them because they have a
> fan, a eSATA port and a nifty display to let me know things are
> working.  Really a good price for the features.  I don't like USB
> connected drives.  Long story.

How about a table-top dock?
- no cable salad, caused by each enclosure having its own power supply and
data cable
- disks are used “naked”, so no heat buildup and you are more flexible

Here are some models with eSATA:
https://skinflint.co.uk/?cat=hddocks&xf=4426_eSATA
And one of them even has four slots ? even fewer cables.

That’s of course if you use the disks intermittently and store them away
inbetween. If you plan on running them for longer durations at a time, it
may be better to use a proper enclosure, in order to protect the disks from
physical influences (impacts, short-circuits). Also, those SATA connectors
are not designed to be connected often. I think I read about 50 cycles
somewhere.

--
Grüße | Greetings | Salut | Qapla’
Please do not share anything from, with or about me on any social network.

The knowing don’t talk much, the talking don’t know much.
Re: Hard drive error from SMART [ In reply to ]
On Sat, Apr 16, 2022 at 19:58:22 +0100, Neil Bothwick wrote:

> --
> Neil Bothwick

> If Yoda so strong in force is, why words in right order he cannot put?

Vielleicht, weil seine Muttersprache Deutsch ist. :-)

--
Alan Mackenzie (Nuremberg, Germany).
Re: Hard drive error from SMART [ In reply to ]
On Sat, 16 Apr 2022 20:09:23 +0000, Alan Mackenzie wrote:

> > If Yoda so strong in force is, why words in right order he cannot
> > put?
>
> Vielleicht, weil seine Muttersprache Deutsch ist. :-)

RLFO


--
Neil Bothwick

SITCOM: Single Income, Two Children, Oppressive Mortgage
Re: Hard drive error from SMART [ In reply to ]
Neil Bothwick wrote:
> On Sat, 16 Apr 2022 12:45:20 -0500, Dale wrote:
>
>>> You're using LVM, so all the drives should be assembled based on their
>>> embedded metadata. It is fine to reference whatever temporary device
>>> name you're using when running pvmove/pvcreate since that doesn't
>>> really get stored anywhere. If you are directly mounting anything
>>> without using LVM then it is best to use labels/uuids/etc to identify
>>> partitions.
>> I have to use sd** when using cryptsetup to decrypt the drive.  I
>> haven't found a way around that that is easier yet.  My command was
>> something like cryptsetup open /dev/sdk1 <name> and then it asks for the
>> password.
> Use /dev/disks/by/partlabel/foo or /dev/disks/by-partuuid/bar.
>
>

That's even more typing than /dev/sdk.  Some things I do easily by using
tab completion and all.  When mounting, I let fstab remember the UUID
for it.  Very little typing and don't have to remember things.  ;-) 
It's not like UUIDs are made to remember either.  :-[  I think I put a
label on the drive but things are a bit different when using
cryptsetup.  At least I think they are.  The easiest thing, just having
the replacement drive as sdd again and me having sdk as my external
drive.  I still think a reboot is going to correct this.  I can't
imagine it not given how the drives are plugged in.  I just wish there
was a easy solution in the meantime.  To be honest, I've had several
times where this would come in handy.  This is just yet another one.

Your way would be consistent tho.  If I could script this, it would be
the best way to do it.  Script it once, done.  Of course, we know my
scripting skills are minimal at best.  If you could say I even have
scripting skills.  lol

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
Frank Steinmetzger wrote:
> Am Sat, Apr 16, 2022 at 12:45:20PM -0500 schrieb Dale:
>
>> My next project, find a good external drive enclosure like the three I
>> got now.  They no longer available tho.  I like them because they have a
>> fan, a eSATA port and a nifty display to let me know things are
>> working.  Really a good price for the features.  I don't like USB
>> connected drives.  Long story.
> How about a table-top dock?
> - no cable salad, caused by each enclosure having its own power supply and
> data cable
> - disks are used “naked”, so no heat buildup and you are more flexible
>
> Here are some models with eSATA:
> https://skinflint.co.uk/?cat=hddocks&xf=4426_eSATA
> And one of them even has four slots ? even fewer cables.
>
> That’s of course if you use the disks intermittently and store them away
> inbetween. If you plan on running them for longer durations at a time, it
> may be better to use a proper enclosure, in order to protect the disks from
> physical influences (impacts, short-circuits). Also, those SATA connectors
> are not designed to be connected often. I think I read about 50 cycles
> somewhere.
>

I've looked into those.  They do have advantages for sure.  One, the
bare drives take up less room in my fire safe.  Lots smaller than the
enclosures I have now.  My concern has always been the
plugging/unplugging a lot and dust when not in use.  I didn't know how
long those connectors are supposed to last but the bad thing is, when it
goes, the drive is gone to, plus the data.   I do like that it is in
open air which takes care of cooling pretty well.  I do my backups once
a week so it isn't as often as some situations but it isn't rare either. 

I've found a enclosure since my post but got to wait until next income
boost to get one.  May buy a few of them if I can.  I think the ones I
found have fans but no display but that's OK.  I really like having the
fan more than the display.  It likely doesn't help with huge airflow but
it gives it some airflow. 

I'm running pretty short on space in my case.  I have a Cooler Master
HAF-932 case.  I'm out of 3.5" spots.  I need to get some 5 1/4" to 3.5"
adapters.  I got some plastic thingys but they don't work in my case. 
It has that push button thingy and the plastic adapter is to loose for
my comfort.  Plus, it has little cooling too.  The 3.5" bays have that
big fan blowing on them. Working on a plan.  Maybe this is a good excuse
to start working on a NAS.  :/

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sat, Apr 16, 2022 at 3:53 PM Dale <rdalek1967@gmail.com> wrote:
<SNIP>
Maybe this is a good excuse
> to start working on a NAS. :/

That's my vote. (For the second time)

I'm using a FreeBSD Nas (TrueNAS) but they recently came out with a
Linux version which you might be more comfortable with. If you use a
1Gb/S or higher network connection it's quite fast.

You can also go the Synology route via Amazon. You can get a 2-disk
NAS chassis which does RAID for around $250 last time I looked.

Good luck whatever you do.

Mark
Re: Hard drive error from SMART [ In reply to ]
Mark Knecht wrote:
> On Sat, Apr 16, 2022 at 3:53 PM Dale <rdalek1967@gmail.com> wrote:
> <SNIP>
> Maybe this is a good excuse
>> to start working on a NAS. :/
> That's my vote. (For the second time)
>
> I'm using a FreeBSD Nas (TrueNAS) but they recently came out with a
> Linux version which you might be more comfortable with. If you use a
> 1Gb/S or higher network connection it's quite fast.
>
> You can also go the Synology route via Amazon. You can get a 2-disk
> NAS chassis which does RAID for around $250 last time I looked.
>
> Good luck whatever you do.
>
> Mark

Other than being another piece of equipment running up a light bill, it
is the best way to deal with this.  The way I'm doing now is a bit of a
struggle at times.  I just need to get other things done first, from a
money perspective which inflation isn't helping on.  A trip to the
grocery story is no fun anymore. 

One of these days tho.  I just gotta do it.

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sat, Apr 16, 2022 at 6:39 PM Dale <rdalek1967@gmail.com> wrote:
>
> Neil Bothwick wrote:
> > Use /dev/disks/by/partlabel/foo or /dev/disks/by-partuuid/bar.
> >
>
> That's even more typing than /dev/sdk. Some things I do easily by using
> tab completion and all. When mounting, I let fstab remember the UUID
> for it.

That's what copy/paste is for. How often are you editing your
crypttab anyway? This way when you move drives around they still
work.

> It's not like UUIDs are made to remember either.

blkid is your friend.

This is for config files, not random mounting/unmounting. I use the
dynamic device nodes all the time if I'm just plugging a drive in and
looking at it. However, if I'm going to put it in a config file I use
a persistent ID so that I'm not running into breakage anytime things
change.

When I'm setting it up it is just a few extra seconds to look up the
UUID and copy/paste it. When the system randomly breaks I have to go
digging through logs and config files to figure out what went wrong.
It pays for me to spend a little more time on getting my config right
when everything is fresh in my head, because when I'm troubleshooting
it will take a little while just to figure out what I did when I set
it up.

Here is an example of one of my cryptsetup files:
cd1 UUID="1cbd5860-3469-41f7-8658-acd83d1957a0" /cd1.key

(This is using a random key stored in a file, which works for this
particular situation. Obviously the drive is only as secure as that
file.)

The corresponding drive blkid output is:
/dev/sdb1: UUID="1cbd5860-3469-41f7-8658-acd83d1957a0"
TYPE="crypto_LUKS" PARTUUID="a4a383a8-24c2-f74b-94d8-ca4ffc366327"

Oh, and look at that - the first drive I set up on this system is
actually the second drive that got assigned a device name. It was
probably /dev/sda1 when I first set it up, and I added another drive
since then.

The contained drive shows up as:
/dev/mapper/cd1: UUID="a2721813-4d10-4f69-ab2a-4beb0d6e95d7" TYPE="ext4"

(No LVM here - this is storage for a distributed filesystem so the
volume management is effectively above the filesystem level. I can
add other drives to the cluster and they're in the pool, and if I want
to move data off this drive I can just edit a config file and the data
will be moved while online. The encryption is mainly so that if a
drive fails I don't have to worry about anybody recovering data from
it.)

--
Rich
Re: Hard drive error from SMART [ In reply to ]
Rich Freeman wrote:
> On Sat, Apr 16, 2022 at 6:39 PM Dale <rdalek1967@gmail.com> wrote:
>> Neil Bothwick wrote:
>>> Use /dev/disks/by/partlabel/foo or /dev/disks/by-partuuid/bar.
>>>
>> That's even more typing than /dev/sdk. Some things I do easily by using
>> tab completion and all. When mounting, I let fstab remember the UUID
>> for it.
> That's what copy/paste is for. How often are you editing your
> crypttab anyway? This way when you move drives around they still
> work.

What is crypttab?  I type in the command manually.  It's what the howtos
showed.  I can't find a crypttab file.  This may make things easier.  My
usual names are 8tb, 6tb and pri, short for private.  Ran out of other
names. ROFL 


>
>> It's not like UUIDs are made to remember either.
> blkid is your friend.
>
> This is for config files, not random mounting/unmounting. I use the
> dynamic device nodes all the time if I'm just plugging a drive in and
> looking at it. However, if I'm going to put it in a config file I use
> a persistent ID so that I'm not running into breakage anytime things
> change.
>
> When I'm setting it up it is just a few extra seconds to look up the
> UUID and copy/paste it. When the system randomly breaks I have to go
> digging through logs and config files to figure out what went wrong.
> It pays for me to spend a little more time on getting my config right
> when everything is fresh in my head, because when I'm troubleshooting
> it will take a little while just to figure out what I did when I set
> it up.
>
> Here is an example of one of my cryptsetup files:
> cd1 UUID="1cbd5860-3469-41f7-8658-acd83d1957a0" /cd1.key
>
> (This is using a random key stored in a file, which works for this
> particular situation. Obviously the drive is only as secure as that
> file.)
>
> The corresponding drive blkid output is:
> /dev/sdb1: UUID="1cbd5860-3469-41f7-8658-acd83d1957a0"
> TYPE="crypto_LUKS" PARTUUID="a4a383a8-24c2-f74b-94d8-ca4ffc366327"
>
> Oh, and look at that - the first drive I set up on this system is
> actually the second drive that got assigned a device name. It was
> probably /dev/sda1 when I first set it up, and I added another drive
> since then.
>
> The contained drive shows up as:
> /dev/mapper/cd1: UUID="a2721813-4d10-4f69-ab2a-4beb0d6e95d7" TYPE="ext4"
>
> (No LVM here - this is storage for a distributed filesystem so the
> volume management is effectively above the filesystem level. I can
> add other drives to the cluster and they're in the pool, and if I want
> to move data off this drive I can just edit a config file and the data
> will be moved while online. The encryption is mainly so that if a
> drive fails I don't have to worry about anybody recovering data from
> it.)
>


I use passwords here.  I just type in sdk1 and it worked before this
drive move.  I never tried to go any further than the howtos I found
about using cryptsetup.  No clue on the file.  I don't see one here and
don't recall reading about it either.  Gonna google on that a bit. 

Interesting. 

Dale

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sat, 16 Apr 2022 23:44:58 -0500, Dale wrote:

> >> That's even more typing than /dev/sdk. Some things I do easily by
> >> using tab completion and all. When mounting, I let fstab remember
> >> the UUID for it.
> > That's what copy/paste is for. How often are you editing your
> > crypttab anyway? This way when you move drives around they still
> > work.
>
> What is crypttab?  I type in the command manually.

Then use a shell alias, even less typing.


--
Neil Bothwick

Ninety-Ninety Rule Of Project Schedules - The first ninety percent of
the task takes ninety percent of the time, and the last ten percent
takes the other ninety percent of the time.
Re: Hard drive error from SMART [ In reply to ]
On Sat, Apr 16, 2022 at 6:06 PM Dale <rdalek1967@gmail.com> wrote:
>
> Mark Knecht wrote:
> > On Sat, Apr 16, 2022 at 3:53 PM Dale <rdalek1967@gmail.com> wrote:
> > <SNIP>
> > Maybe this is a good excuse
> >> to start working on a NAS. :/
> > That's my vote. (For the second time)
> >
> > I'm using a FreeBSD Nas (TrueNAS) but they recently came out with a
> > Linux version which you might be more comfortable with. If you use a
> > 1Gb/S or higher network connection it's quite fast.
> >
> > You can also go the Synology route via Amazon. You can get a 2-disk
> > NAS chassis which does RAID for around $250 last time I looked.
> >
> > Good luck whatever you do.
> >
> > Mark
>
> Other than being another piece of equipment running up a light bill, it
> is the best way to deal with this. The way I'm doing now is a bit of a
> struggle at times. I just need to get other things done first, from a
> money perspective which inflation isn't helping on. A trip to the
> grocery story is no fun anymore.
>
> One of these days tho. I just gotta do it.
>
> Dale

I hear you about groceries and inflation. Wol pushed me to build my
first one just using an old computer. I had an old machine - case,
power supply with a bad motherboard so I purchased an i3-2120 CPU @
3.30GHz motherboard with 8GB memory used at a computer store for $40.
Surprisingly that's more than enough CPU & memory for basic backups.
No matter what you're going to have to pay for the drives whether they
go in your box, in external cases or in a backup machine.

I only turn it on to do backups or to retrieve data so not much electricity.
Re: Hard drive error from SMART [ In reply to ]
Mark Knecht wrote:
> On Sat, Apr 16, 2022 at 6:06 PM Dale <rdalek1967@gmail.com> wrote:
>> Mark Knecht wrote:
>>> On Sat, Apr 16, 2022 at 3:53 PM Dale <rdalek1967@gmail.com> wrote:
>>> <SNIP>
>>> Maybe this is a good excuse
>>>> to start working on a NAS. :/
>>> That's my vote. (For the second time)
>>>
>>> I'm using a FreeBSD Nas (TrueNAS) but they recently came out with a
>>> Linux version which you might be more comfortable with. If you use a
>>> 1Gb/S or higher network connection it's quite fast.
>>>
>>> You can also go the Synology route via Amazon. You can get a 2-disk
>>> NAS chassis which does RAID for around $250 last time I looked.
>>>
>>> Good luck whatever you do.
>>>
>>> Mark
>> Other than being another piece of equipment running up a light bill, it
>> is the best way to deal with this. The way I'm doing now is a bit of a
>> struggle at times. I just need to get other things done first, from a
>> money perspective which inflation isn't helping on. A trip to the
>> grocery story is no fun anymore.
>>
>> One of these days tho. I just gotta do it.
>>
>> Dale
> I hear you about groceries and inflation. Wol pushed me to build my
> first one just using an old computer. I had an old machine - case,
> power supply with a bad motherboard so I purchased an i3-2120 CPU @
> 3.30GHz motherboard with 8GB memory used at a computer store for $40.
> Surprisingly that's more than enough CPU & memory for basic backups.
> No matter what you're going to have to pay for the drives whether they
> go in your box, in external cases or in a backup machine.
>
> I only turn it on to do backups or to retrieve data so not much electricity.
>
>


I was wanting to have a NAS that also puts video on my TV.  That way I
can turn off my puter and still watch TV.  It would be as much a media
system as a NAS.  I have a mobo, ram and I think I have a extra video
card somewhere.  I'd need a case, power supply and such.  I'd also need
a place to put all this which is going to be interesting.  I'd want
plenty of hard drive bays tho.  I found a fractal 804 case that caught
my eye.  Can't recall all the details tho. 

Still, needs money and right now, I got to many other coals in the
fire.  Plus, I'm trying to figure out this crypttab thing.  From what
I've read, it is for opening encrypted drives during boot up which is
not really what I want.  I can boot and login into my KDE without
anything encrypted being mounted.  Kinda like this new setup really. 

I'll be so glad when fiber internet gets here.  I think I'm going with
the 500Mb/sec plan.  Costs about the same as my current 1.5Mb/sec plan. 
lol 

Dale 

:-)  :-) 
Re: Hard drive error from SMART [ In reply to ]
On Sun, Apr 17, 2022 at 10:22 AM Dale <rdalek1967@gmail.com> wrote:
<SNIP>
>
> I was wanting to have a NAS that also puts video on my TV. That way I
> can turn off my puter and still watch TV. It would be as much a media
> system as a NAS. I have a mobo, ram and I think I have a extra video
> card somewhere. I'd need a case, power supply and such. I'd also need
> a place to put all this which is going to be interesting. I'd want
> plenty of hard drive bays tho. I found a fractal 804 case that caught
> my eye. Can't recall all the details tho.
>
> Still, needs money and right now, I got to many other coals in the
> fire. Plus, I'm trying to figure out this crypttab thing. From what
> I've read, it is for opening encrypted drives during boot up which is
> not really what I want. I can boot and login into my KDE without
> anything encrypted being mounted. Kinda like this new setup really.
>
> I'll be so glad when fiber internet gets here. I think I'm going with
> the 500Mb/sec plan. Costs about the same as my current 1.5Mb/sec plan.
> lol
>
> Dale

I believe all of that can be done on TrueNAS, and most likely with
any of the prepackaged boxes like Synology, but I've not do it myself.

Most modern flatscreens can access NAS servers and play video
and or music over the network so the NAS server itself
need not have a GPU. I did put a VGA in both of mine as building
them is easier, but it wasn't strictly necessary. TrueNAS can be
built on a headless machine if you know the IP address.

As for FreeBSD, they have 'jails' which I think are more or less
chroot environments, so you can put whatever MythTV is called
these days in a jail and run it from there. People do that with
DNS, network monitors and all sorts of things. (Assuming
you have enough compute power.)

No need to do any of this now. It's good that you're thinking
about solutions so that when the money comes along you'll
be ready.

Cheers,
Mark
Re: Hard drive error from SMART [ In reply to ]
Mark Knecht wrote:
> On Sun, Apr 17, 2022 at 10:22 AM Dale <rdalek1967@gmail.com> wrote:
> <SNIP>
>> I was wanting to have a NAS that also puts video on my TV. That way I
>> can turn off my puter and still watch TV. It would be as much a media
>> system as a NAS. I have a mobo, ram and I think I have a extra video
>> card somewhere. I'd need a case, power supply and such. I'd also need
>> a place to put all this which is going to be interesting. I'd want
>> plenty of hard drive bays tho. I found a fractal 804 case that caught
>> my eye. Can't recall all the details tho.
>>
>> Still, needs money and right now, I got to many other coals in the
>> fire. Plus, I'm trying to figure out this crypttab thing. From what
>> I've read, it is for opening encrypted drives during boot up which is
>> not really what I want. I can boot and login into my KDE without
>> anything encrypted being mounted. Kinda like this new setup really.
>>
>> I'll be so glad when fiber internet gets here. I think I'm going with
>> the 500Mb/sec plan. Costs about the same as my current 1.5Mb/sec plan.
>> lol
>>
>> Dale
> I believe all of that can be done on TrueNAS, and most likely with
> any of the prepackaged boxes like Synology, but I've not do it myself.
>
> Most modern flatscreens can access NAS servers and play video
> and or music over the network so the NAS server itself
> need not have a GPU. I did put a VGA in both of mine as building
> them is easier, but it wasn't strictly necessary. TrueNAS can be
> built on a headless machine if you know the IP address.
>
> As for FreeBSD, they have 'jails' which I think are more or less
> chroot environments, so you can put whatever MythTV is called
> these days in a jail and run it from there. People do that with
> DNS, network monitors and all sorts of things. (Assuming
> you have enough compute power.)
>
> No need to do any of this now. It's good that you're thinking
> about solutions so that when the money comes along you'll
> be ready.
>
> Cheers,
> Mark
>
>


When I bought my current TV, I avoided the smart ones.  At the time, it
was new technology and people were talking about how buggy it was so I
bought a regular TV.  If I had to buy one today, I'd buy a smart one. 
They seem to work pretty well now.  Nice and stable at least.  Still, I
check to make sure whatever I buy is based on Linux as its OS.  One can
usually check the manual and see the copyright notice in the last few
pages.  It mentions the kernel.  If it mentions windoze, I move on.  LQ
is almost always Linux based.

I'm at the point where I know I need to do this.  It's just getting
there.  I even thought about putting the OS on a USB stick.  After all,
once booted, it won't access the stick very often.  I could even load it
into memory at boot up and it not even need the stick at all once
booted.  Like is done with some Gentoo install media. 

One of these days.

Dale

:-)  :-) 

P. S.  New drive seems to be working fine.  Now to figure out what to do
with old one.  :-D

1 2 3  View All