external ssd/hdd, fstab, drive-manager

Hi, i’d like to use dietpi as a home server (sickrage, samba, transmission-remote etc…), i’m currently running raspbian headless on a rpi b using the sd for boot and anything else on an external hdd, everything works fine.

I recently got an rpi3 and at the moment i’m trying to prepare my next home server with dietpi using:

  • SD (for boot, i tried using https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md to avoid using SD at all, but although successfully achieved $ vcgencmd otp_dump | grep 17: 17:3020000a, it still requires SD, maybe a further topic for the future)

  • SSD for:
    — / (sda2)
    — /usr (sda3)
    (sda1 was prepared to be used as /boot when/if this feature will be possible)

  • HDD for:
    — /home (sdb1)
    — /tmp (sdb2)
    — swap (sdb3)
    — /var (sdb4)

I installed dietpi successfully, I used the drive-manager to move rootfs to sda2 and it works, i can see the sda2 entry on fstab.
I then edited fstab in order to mount sda3 on /usr but although mount -a mounts it, at boot time it is NOT mounted.

Before trying mounting the hdd partitions I wanted to know/work out what happens with fstab and drive-manager, do they conflict?

I’d love to just use drive-manager to select what partition gets mounted where (ubuntu installation style) but I can’t seem to find such option on the drive-manager.
I also noticed that if i run drive-manager, sda3 gets mounted (following what’s on fstab) which makes me think drive-manager executes mount -a when launched.

I’m really liking the scripts and optimisations of dietpi so i’d really like to sort this issue before giving up and trying with raspbian the old style way.

What am I missing?
Any help will be appreciated

tx
cpp

Hi cpp,

Many thanks for the feedback, really appreciate it.

Before trying mounting the hdd partitions I wanted to know/work out what happens with fstab and drive-manager, do they conflict?

DietPi-Drive_Manager scrapes drive mounts and applys drive mounts directly to /etc/fstab. Its basically a lightweight front-end for /etc/fstab :slight_smile:

DietPi-Drive_Manager will only detect and modify drive entries in /etc/fstab with the following physical paths:

/dev/mmcblk*
/dev/sd*



I’d love to just use drive-manager to select what partition gets mounted where (ubuntu installation style) but I can’t seem to find such option on the drive-manager.
I also noticed that if i run drive-manager, sda3 gets mounted (following what’s on fstab) which makes me think drive-manager executes mount -a when launched.

This is a great suggestion, we may look into this.
However, DietPi has a system called “User data”, which hopefully reduces the need for specific rootfs+ mounts. User data can also be moved on the fly: https://dietpi.com/forum/t/dietpi-software-user-data/400/1

Yep, great spot, DietPi-Drive_Manager mounts all drives during run (mount -a). It then finds any new drives, without /mnt entries and generates UUID based mounts and /etc/fstab entries automatically.

/tmp (sdb2)

This is currently a tmpfs RAMdisk by default in DietPi. I wouldn’t recommend changing this as it will reduce system performance.

— swap (sdb3)

Another option, is to change the swapfile location with the following command (+ size 128MB):

/DietPi/dietpi/func/dietpi-set_dphys-swapfile 128 /mnt/sdb3_mount_location/swapfile



I then edited fstab in order to mount sda3 on /usr but although mount -a mounts it, at boot time it is NOT mounted.

Its possible the drive is not ready, during the early boot phase this occurs. Lets check the status of the mount process for issues:

dmesg | grep sda
systemctl status *.mount