Score:0

Snapd does not mount snap block devices

nl flag

Distro: Ubuntu 21.04 (Hirsute Hippo)

I removed snapd (which obviously removed snapd) many times and then after install snapd all the snaps were OK. This time I reinstalled AppArmor and install snapd, enable and running but this time did not mount snaps.

The following packages will be REMOVED:
  apparmor* apparmor-easyprof* apparmor-notify* apparmor-profiles* apparmor-profiles-extra* apparmor-utils* snapd*

root@zika:/etc# systemctl status snapd
● snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-08-30 19:49:42 EDT; 50min ago
TriggeredBy: ● snapd.socket
   Main PID: 1147 (snapd)
      Tasks: 10 (limit: 4450)
     Memory: 24.3M
     CGroup: /system.slice/snapd.service
             └─1147 /usr/lib/snapd/snapd

Aug 30 19:49:29 zika systemd[1]: Starting Snap Daemon...
Aug 30 19:49:39 zika snapd[1147]: AppArmor status: apparmor is enabled and all features are available
Aug 30 19:49:40 zika snapd[1147]: daemon.go:347: started snapd/2.49.2+21.04ubuntu1 (series 16; classic) ubuntu/21.04 (amd64) linux/5.11>
Aug 30 19:49:41 zika snapd[1147]: daemon.go:440: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Aug 30 19:49:42 zika systemd[1]: Started Snap Daemon.
lines 1-15/15 (END)




root@zika:/etc# systemctl status snapd.socket
● snapd.socket - Socket activation for snappy daemon
     Loaded: loaded (/lib/systemd/system/snapd.socket; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-08-30 19:49:28 EDT; 47min ago
   Triggers: ● snapd.service
     Listen: /run/snapd.socket (Stream)
             /run/snapd-snap.socket (Stream)
      Tasks: 0 (limit: 4450)
     Memory: 0B
     CGroup: /system.slice/snapd.socket

Aug 30 19:49:28 zika systemd[1]: Starting Socket activation for snappy daemon.
Aug 30 19:49:28 zika systemd[1]: Listening on Socket activation for snappy daemon.


root@zika:/etc# systemctl --state=running|g snap
  snapd.service                     loaded active running Snap Daemon
  snapd.socket                      loaded active running Socket activation for snappy daemon

snap list
no snaps installed

and lsblk:

root@zika:/etc# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda       8:0    0 698.6G  0 disk 
├─sda1    8:1    0 279.5G  0 part /
├─sda2    8:2    0   450M  0 part 
├─sda3    8:3    0   100M  0 part 
├─sda4    8:4    0    16M  0 part 
├─sda5    8:5    0  98.4G  0 part 
├─sda6    8:6    0   666M  0 part 
├─sda7    8:7    0 217.8G  0 part /mnt/a38b81ea-8929-4863-a582-c5b65ed6738f
├─sda8    8:8    0   5.4G  0 part [SWAP]
├─sda9    8:9    0   243M  0 part 
└─sda10   8:10   0  96.1G  0 part 
sr0      11:0    1  1024M  0 rom  

I still have a /home/user/snap but /var/lib/snapd/snaps is empty. Is it a way to restore the snaps or are simply lost? What is the /home/user/snap for? I assume installing lost snaps again will preserve conf from /home/user/snap. I am really lost in this, can somebody explain, please. Thanks!

David avatar
cn flag
I removed snapd (which obviously removed snapd) many times ... Why did you do this and many times?
Score:1
cn flag

Removing snapd will also remove any installed snaps and any files installed in the system directories (at least, that is how it currently works). Thus, it is expected that you need to reinstall any snap after you reinstalled snap.

User configuration data is never removed automatically. All user configuration data in the "snap" directory in your home will be preserved - and available to the corresponding snap if you install it again.

Brad Thompson avatar
nl flag
thanks for the confirmation
vanadium avatar
cn flag
Please "accept" the answer if it helped.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.