SCIENTIFIC-LINUX-USERS Archives

July 2012

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Todd And Margo Chester <[log in to unmask]>
Reply To:
Todd And Margo Chester <[log in to unmask]>
Date:
Mon, 30 Jul 2012 19:55:57 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
> On 07/30/2012 06:26 PM, Tam Nguyen wrote:
>> Todd,
>> let's keep it simple, get it right and work, then you can take off from
>> there.  So do this:
>> vi /etc/fstab:
>> /dev/mapper/lin-bak   /mnt  ext4   defaults  0  0
>
> Hi Tam,
>
>    I have tried this.  With and without the first
> parameter set to allow dump, which I do need.
>
>>
>> vi /etc/crypttab:
>> lin-bak    /dev/sdb1
>
> I have tried this.  At boot I get "mount: special device
> /dev/mapper/lin-bak does not exist"
>
>
>> mount -a
>
> without /dev/mapper/lin-bak, it won't mount.
>
>> reboot
>
> /dev/mapper/lin-bak disappears
>
>>
>> Then we'll go from there.
>> -Tam
>
> You know what I have not tried, removing the
> dash from lin-bak in crypttab

Makes no difference.
>
> -T

I am mounting now by using rc.local:

# if I can not get /etc/crypttab to work, this will populate
# /dev/mapper with lin-bak and mount /lin-bak
if [ ! -L /dev/mapper/lin-bak ]; then
    cryptsetup luksOpen /dev/sdb1 lin-bak < /etc/crypttab.lin-bak.key
    if [ -L /dev/mapper/lin-bak ] && [ -n $(mount -l | grep -i lin-bak) 
]; then
       mount /lin-bak
    fi
fi


I suppose I don't need the
    [ -n $(mount -l | grep -i lin-bak) ]
But, I was pleased with my coding, so I left it in.

-T

ATOM RSS1 RSS2