Unexpected changes of names of media – at least, ZFS pools and ext2


#1

tl;dr

Mount point debris?

Incident one: ext2

2016-12-28 from @mystified1234:

Internal storage drive (ext2) I/O error permission denied. All of a sudden stopped allowing my to write to it after TrueOs, crashed a couple of days ago. Using Linux I had to run /fsck so it could mount. There has been a change in the address of the drive from /media/ST3500418AS-1 to /media/ST3500418AS-1-3. This issue only occurs on Trueos. Not Linux.

BTW it mounts without issue. I’m able to access & open files without issues.

I asked:

is there mount point debris? At
/media/

mystified1234 replied:

drwxrwxrwx 14 xxx operator 4096 7 Dec 00:19 ST3500418AS-1-3

… and parts of the subsequent chat might be way off-mark (relatively lazy guesswork by me).

Incident two: ZFS

Today:

At some point whilst TrueOS ran, a change of name occurred.

I suspect that the rename occurred when mount tray was used to (import the pool and) mount a file system.

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> zpool status
  pool: ZEVO
 state: ONLINE
status: The pool is formatted using a legacy on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on software that does not support feature
        flags.
  scan: scrub repaired 0 in 0h0m with 0 errors on Sat Jan  7 16:34:26 2017
config:

        NAME                  STATE     READ WRITE CKSUM
        ZEVO                  ONLINE       0     0     0
          gpt/%25noformat%25  ONLINE       0     0     0

errors: No known data errors

  pool: hpelitebook850g2
 state: ONLINE
  scan: scrub repaired 0 in 3h37m with 0 errors on Sat Jan  7 05:37:20 2017
config:

        NAME        STATE     READ WRITE CKSUM
        hpelitebook850g2  ONLINE       0     0     0
          ada0p2    ONLINE       0     0     0

errors: No known data errors
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> date ; uptime
Sat  7 Jan 2017 18:28:31 GMT
 6:28p.m.  up  3:28, 3 users, load averages: 0.85, 0.72, 0.76
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zpool import
Password:
Sorry, try again.
Password:
   pool: ZEVO-2
     id: 11769239498434559729
  state: ONLINE
 status: The pool is formatted using a legacy on-disk version.
 action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
 config:

        ZEVO-2      ONLINE
          da0p2     ONLINE
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> gpart show /dev/da0
=>      34  15642557  da0  GPT  (7.5G)
        34         6       - free -  (3.0K)
        40    409600    1  efi  (200M)
    409640  14970800    2  !6a898cc3-1dd2-11b2-99a6-080020736631  (7.1G)
  15380440    262151       - free -  (128M)

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zpool import ZEVO-2
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> zpool status ZEVO-2
  pool: ZEVO-2
 state: ONLINE
status: The pool is formatted using a legacy on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on software that does not support feature
        flags.
  scan: scrub repaired 0 in 0h0m with 0 errors on Sat Jan  7 17:25:09 2017
config:

        NAME        STATE     READ WRITE CKSUM
        ZEVO-2      ONLINE       0     0     0
          da0p2     ONLINE       0     0     0

errors: No known data errors

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zdb -AAA -cc -vvv ZEVO-2

Traversing all blocks to verify checksums and verify nothing leaked ...

loading space map for vdev 0 of 1, metaslab 44 of 114 ...
 746K completed (   0MB/s) estimated time remaining: 0hr 01min 11sec        
        No leaks (block sum matches space maps exactly)

        bp count:             250
        ganged count:           0
        bp logical:       7969792      avg:  31879
        bp physical:      7342080      avg:  29368     compression:   1.09
        bp allocated:     7503360      avg:  30013     compression:   1.06
        bp deduped:             0    ref>1:      0   deduplication:   1.00
        SPA allocated:    7503360     used:  0.10%
        Dittoed blocks on same vdev: 84

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zpool export ZEVO-2
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> date ; sudo zpool import -R /media ZEVO-2 ZEVO
Sat  7 Jan 2017 18:36:29 GMT
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zdb -AAA -cc -vvv ZEVO
zdb: can't open 'ZEVO': No such file or directory
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> zfs mount | grep -i zevo
ZEVO                            /media/ZEVO
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> zpool list
NAME               SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
ZEVO              7.12G  7.16M  7.12G         -      -     0%  1.00x  ONLINE  /media
hpelitebook850g2   920G   311G   609G         -    21%    33%  1.00x  ONLINE  -
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zdb -AAA -cc -vvv ZEVO-2
zdb: can't open 'ZEVO-2': No such file or directory
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zdb -AAA -cc -vvv ZEVO
zdb: can't open 'ZEVO': No such file or directory
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> sudo zpool export ZEVO
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos /u/l/bin> cd
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos ~> gpart show /dev/da0
=>      34  15642557  da0  GPT  (7.5G)
        34         6       - free -  (3.0K)
        40    409600    1  efi  (200M)
    409640  14970800    2  !6a898cc3-1dd2-11b2-99a6-080020736631  (7.1G)
  15380440    262151       - free -  (128M)

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos ~>

Peculiarity with zdb(8)

sudo zdb -AAA -cc -vvv ZEVO-2
worked with the pool after it had been renamed (not renamed by me).

Why, then, did
sudo zdb -AAA -cc -vvv ZEVO
not work with the pool named ZEVO?


#2

Focus on incident 2

From the history of the pool:

2017-01-02.16:33:27 zpool create ZEVO /dev/disk2
2017-01-02.16:34:53 zpool export ZEVO
2017-01-02.17:06:42 zpool import -R /media ZEVO ZEVO
2017-01-07.16:29:29 zpool import -f ZEVO
2017-01-07.16:29:50 zpool scrub ZEVO
2017-01-07.16:30:12 zpool export ZEVO
2017-01-07.16:31:23 zpool import ZEVO
2017-01-07.16:32:45 zpool export ZEVO
2017-01-07.16:34:03 zpool import ZEVO
2017-01-07.16:34:31 zpool scrub ZEVO
2017-01-07.17:25:14 zpool scrub ZEVO
2017-01-07.17:27:59 zpool export ZEVO
2017-01-07.17:31:25 zpool import -R /media ZEVO ZEVO-2
2017-01-07.17:35:32 zpool export ZEVO-2
2017-01-07.18:30:48 zpool import ZEVO-2

https://www.freebsd.org/cgi/man.cgi?query=zpool&sektion=8&manpath=FreeBSD

This 16:31 screenshot shows the pool properly named whilst at a MacBookPro11,2 with OpenZFS on OS X:

The first I knew of the change of name was the 18:28:31 run of sudo zpool import at TrueOS Desktop.

If not mount point debris with TrueOS

What else, with TrueOS, might cause a rename without the user requesting that name?


#3

Sounds a lot like what I meant when I wrote:

It turns out that the “folder” that is created in /media/ isn’t deleted after unmounting via mount tray. So, the next time the drive is mounted by mount tray there is a new folder created with “-2” added to the name.

http://discourse.trueos.org/t/mounting-of-usb-stick-using-mount-tray-still-not-working/428/8


#4

@to-user thanks :thumbsup: and would you like to report the issue? https://github.com/trueos/trueos-core/issues

I’m aware that @jmaloney is currently reviewing things around the tray.


#5

Sorry, I don’t have a github account. And for now I don’t want to create one.

But I always wondered why the official bug report section/site of pcbsd/trueos isn’t on the same platform as the official forum.


#6

Discourse has strengths that GitHub does not, and vice versa.


#7

Choosing to rename

ext2

Today in chat:

Generally I use gparted graphic.

change the label

gdisk(8) is reasonably user-friendly.

If you prefer a GUI:

I don’t know whether Disk Manager can change a label.