LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Server sleep issues (https://www.linuxquestions.org/questions/linux-newbie-8/server-sleep-issues-4175531586/)

Changry 01-20-2015 01:31 AM

Server sleep issues
 
Hello,

I've recently built a home server by updating my old gaming PC and adding a second drive. I used fstab to mount the second drive and everything has been working great.

I only need the server to work when I'm home and awake so I set it up to sleep and wake on lan. Now when the PC wakes up the second drive is not mounted anymore.

Does anyone know what I can do to fix this?

Thanks
BTW I'm using Xubuntu.

evo2 01-20-2015 02:00 AM

Hi,

what line did you put in your /etc/fstab for this disk?

Evo2.

Changry 01-20-2015 02:08 AM

Quote:

Originally Posted by evo2 (Post 5303821)
Hi,

what line did you put in your /etc/fstab for this disk?

Evo2.

I added the line below at the end:

/dev/sdb1 /mnt/content ext4 defaults 0 0

evo2 01-20-2015 02:40 AM

Hi,

that looks to me like it should mount automatically on boot. The only thing I would suggest to change is the last "0" to "2" (see "The sixth field" section in the fstab man page).

Does it mount if you run the following:
Code:

mount -a
as root? If not are there any error messages? And does it mount if you run:
Code:

mount /mnt/content
as root? Any error messages?

Also, did you check the logs in /var/log/ for clues?

Evo2.

veerain 01-20-2015 05:28 AM

Code:

/dev/sdb1 /mnt/content ext4 defaults,auto 0 0
You have to set auto option to fstab so that mount -a automatically mounts it.

evo2 01-20-2015 07:12 PM

Hi,
Quote:

Originally Posted by veerain (Post 5303869)
You have to set auto option to fstab so that mount -a automatically mounts it.

From the fstab man page
Code:

            defaults
                    use  default  options: rw, suid, dev, exec, auto, nouser,
                    and async.

So auto does not need need to be explicitly listed.

I wonder now if I've missunderstood the OP: is the machine actually being shut down? Or suspended to ram or disk?

Evo2.

michaelk 01-20-2015 07:34 PM

What distribution / version are you running? Are you running a desktop?

Also is the drive internal or external i.e PATA, SATA, or USB?


All times are GMT -5. The time now is 09:29 PM.