Re: Safely remove USB drive

2023-02-23 Thread Andrew Grillet
A great bit of work. Do you know if USB DAT drives are working on Sparc64? They were not when I last tested (probably OBSD 6.2). Andrew On Mon, 13 Feb 2023 at 13:02, Crystal Kolipe wrote: > On Thu, Feb 09, 2023 at 09:20:48PM -0300, Crystal Kolipe wrote: > > There is no reason why we couldn't

Re: Safely remove USB drive

2023-02-13 Thread Crystal Kolipe
On Thu, Feb 09, 2023 at 09:20:48PM -0300, Crystal Kolipe wrote: > There is no reason why we couldn't implement support for 'eject -t' for sd > devices, (which is internally treated as a tape retension command). > > In fact, I just made a patch to do that out of curiosity and was able to > access

Re: Safely remove USB drive

2023-02-09 Thread Daniele Bonini
I want to thank you from here for the tour of the usb utils, appreciated.. -- Daniele Bonini Crystal Kolipe wrote: > On Thu, Feb 09, 2023 at 11:02:14AM -0500, Bryan Steele wrote: > > On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote: > > > Hi, > > > > > > I'm not using

Re: Safely remove USB drive

2023-02-09 Thread Crystal Kolipe
On Thu, Feb 09, 2023 at 11:02:14AM -0500, Bryan Steele wrote: > On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote: > > Hi, > > > > I'm not using my drives for anything more than copying files, dd etc. > > I just got curious because you mentioned the act of detaching a device > >

Re: Safely remove USB drive

2023-02-09 Thread Bryan Steele
On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote: > Hi, > > I'm not using my drives for anything more than copying files, dd etc. > I just got curious because you mentioned the act of detaching a device > after umounting it and I don't know how to do that on OpenBSD. On >

Re: Safely remove USB drive

2023-02-08 Thread NilsOla Nilsson
On Wed, Feb 08, 2023 at 07:15:27PM +0100, Paul de Weerd wrote: > On Wed, Feb 08, 2023 at 04:50:32PM +0100, Jan Stary wrote: > | On Feb 08 13:56:18, pe...@bsdly.net wrote: > | > 1) close any open files stored there > | > 2) make sure no process has the media as $PWD (as in, cd away from there, > |

Re: Safely remove USB drive

2023-02-08 Thread Daniele B.
Just to keep the discussion and clarificarions in the mailing list. I'm sorry for all the typos of my my previous post. Paul de Weerd wrote:   > and forcibly removing the device is very likely going to lead to  > amazing new learning opportunities.   I can confirm these statement and I invite

Re: Safely remove USB drive

2023-02-08 Thread Daniele Bonini
Paul de Weerd wrote: > and forcibly removing the device is very likely going to lead to > amazing new learning opportunities. I can confirm these statement and I invite you to double check all the "learning opportunities": taken that, by "chance", they are not great happenings brr..than

Re: Safely remove USB drive

2023-02-08 Thread Paul de Weerd
On Wed, Feb 08, 2023 at 04:50:32PM +0100, Jan Stary wrote: | On Feb 08 13:56:18, pe...@bsdly.net wrote: | > 1) close any open files stored there | > 2) make sure no process has the media as $PWD (as in, cd away from there, | >and really a variation on the first) | > 3) issue at least one sync

Re: Safely remove USB drive

2023-02-08 Thread Crystal Kolipe
On Wed, Feb 08, 2023 at 05:59:12PM +0100, Peter N. M. Hansteen wrote: > On Wed, Feb 08, 2023 at 04:50:32PM +0100, Jan Stary wrote: > > On Feb 08 13:56:18, pe...@bsdly.net wrote: > > > 1) close any open files stored there > > > 2) make sure no process has the media as $PWD (as in, cd away from

Re: Safely remove USB drive

2023-02-08 Thread Peter N. M. Hansteen
On Wed, Feb 08, 2023 at 04:50:32PM +0100, Jan Stary wrote: > On Feb 08 13:56:18, pe...@bsdly.net wrote: > > 1) close any open files stored there > > 2) make sure no process has the media as $PWD (as in, cd away from there, > >and really a variation on the first) > > 3) issue at least one sync

Re: Safely remove USB drive

2023-02-08 Thread Jan Stary
On Feb 08 13:56:18, pe...@bsdly.net wrote: > 1) close any open files stored there > 2) make sure no process has the media as $PWD (as in, cd away from there, >and really a variation on the first) > 3) issue at least one sync command (some folklore will insist on three) > 4) umount the media

Re: Safely remove USB drive

2023-02-08 Thread Peter N. M. Hansteen
On Wed, Feb 08, 2023 at 10:44:20AM -0300, Crystal Kolipe wrote: > If you are just copying files, and/or using dd to, for example, overwrite > a device with zeros or random data, then you don't need to do anything > special to use usb storage devices on OpenBSD. In the case of dd-ing to a usb

Re: Safely remove USB drive

2023-02-08 Thread vitmau...@gmail.com
Hi, thank you Crystal for the explanation. Best, Vito Em qua., 8 de fev. de 2023 às 10:44, Crystal Kolipe escreveu: > > On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote: > > I'm not using my drives for anything more than copying files, dd etc. > > I just got curious because

Re: Safely remove USB drive

2023-02-08 Thread Crystal Kolipe
On Wed, Feb 08, 2023 at 10:34:07AM -0300, vitmau...@gmail.com wrote: > I'm not using my drives for anything more than copying files, dd etc. > I just got curious because you mentioned the act of detaching a device > after umounting it and I don't know how to do that on OpenBSD. If and only if you

Re: Safely remove USB drive

2023-02-08 Thread vitmau...@gmail.com
Hi, I'm not using my drives for anything more than copying files, dd etc. I just got curious because you mentioned the act of detaching a device after umounting it and I don't know how to do that on OpenBSD. On Fedora I would issue "udisks --detach /dev/sdX" (older versions) or "udisksctl

Re: Safely remove USB drive

2023-02-08 Thread Crystal Kolipe
Hi, On Wed, Feb 08, 2023 at 10:13:59AM -0300, vitmau...@gmail.com wrote: > thank you all for the replies. Crystal, what command would I use to > detach a USB drive? I tried eject, but it doesn't seem to work with > the kind of devices I have. Can you explain exactly what you are trying to do,

Re: Safely remove USB drive

2023-02-08 Thread Daniele B.
In facts, there are people around who play very "nasty" with these sticks like booting from them, etc... I suggest to reach one of them and ask for a "safe unmounting" Indeed, sorry for this joke too! (time for "safe break")

Re: Safely remove USB drive

2023-02-08 Thread vitmau...@gmail.com
Hi, thank you all for the replies. Crystal, what command would I use to detach a USB drive? I tried eject, but it doesn't seem to work with the kind of devices I have. Best, Vitor Em qua., 8 de fev. de 2023 às 09:55, Crystal Kolipe escreveu: > > On Wed, Feb 08, 2023 at 09:27:08AM -0300,

Re: Safely remove USB drive

2023-02-08 Thread Peter N. M. Hansteen
On Wed, Feb 08, 2023 at 09:27:08AM -0300, vitmau...@gmail.com wrote: > quick and very basic question: is syncing and umounting a USB drive > enough to safely remove it or should I execute other commands before > unplugging these devices? My personal check list for safely removing removable media

Re: Safely remove USB drive

2023-02-08 Thread Crystal Kolipe
On Wed, Feb 08, 2023 at 09:27:08AM -0300, vitmau...@gmail.com wrote: > quick and very basic question: is syncing and umounting a USB drive > enough to safely remove it or should I execute other commands before > unplugging these devices? Unless you are doing something 'unusual' (*), then just