/dev/chat

General discussion for unix.stackexchange.com. If you have a q...
May 14, 2017 16:28
@terdon Thanks for the reminder. I was in fact keeping in mind the "we don't migrate crap" rule when I voted to close that. I was thinking that the "learning materials" reason made some small amount of sense since it was kind of a "how does programming work, generally" type of question. I admit I could have chosen a better reason (but definitely not migrate!)
Mar 4, 2017 18:37
@JeffSchaller I see you are on an ernest editing mission? Nearly the whole front page is filled with questions you've edited just now! :)
Mar 27, 2016 13:03
@terdon oh no, you are propagating the horror of the $PAGER abuse even further :-)
Jan 19, 2016 00:20
@Gilles ah, that makes sense to me now. thanks.
Jan 18, 2016 22:13
I apologize for this edit which you ended up reverting, @Gilles. I thought for sure it was a typo on your part that inverted the meaning. I still don't understand though, actually. You'd list security.debian.org if you don't want security updates and omit it if you do?
Dec 18, 2015 11:42
Sounds like your users are in a sweet environment though...... pool house....... browsing Facebook........
Dec 18, 2015 11:37
@derobert good points. I guess I don't think about that much because I don't have to do that kind of thing very often.
Dec 18, 2015 11:20
@derobert Sure, such bugs in grub should be fixed and the fixes deployed, but I consider that if someone has console access to a server (even serial console access), they already have control.
Dec 18, 2015 11:13
@FaheemMitha ...and that's why we can't run modern operating systems on computers with 128KiB of RAM which used to run contemporary OSes just fine thank you very much.
Dec 18, 2015 03:03
I'll leave it at that. It's a rich topic with lots of twists but hardly related to Unix & Linux.
Dec 18, 2015 03:01
Actually, once a binary (= either male or female, not genderqueer) transgender person has finished transitioning, it becomes really quite simple. For most purposes you (and they!!!) can even just forget about the fact that they're trans.
Dec 18, 2015 02:56
But the vast majority of transgender people (and cisgender people for that matter) aren't so complicated as to get into the realm of genderqueerness. They're just regular male or female.
Dec 18, 2015 02:54
And that's where it gets complicated.
Dec 18, 2015 02:54
To express that you do not identify with any gender, you have to say agender, also known as gender neutral, or neutrois. Which is a subcategory of genderqueer.
Dec 18, 2015 02:53
So it isn't a gender identity and has no bearing on what pronouns would be used to refer to you.
Dec 18, 2015 02:52
You can fit "homo", "hetero", "bi", and "a" in a 2×2 matrix in the obvious way.
Dec 18, 2015 02:52
@Fabby Terminology: "asexual" has two meanings. In biology it means what you think it means: something which does not posess a sex. For example, bacteria reproduce asexually. But when applied to humans [sentient beings] it is a sexual orientation, like heterosexual and homosexual. It means neither homosexual nor heterosexual.
Dec 17, 2015 02:09
Since English is your fourth language, please allow me to tell you in the spirit of genuine advice that it's basically never okay to use "it" for people.
Dec 17, 2015 02:08
@Fabby, I wholeheartedly agree with what @JennyD said. There are a minority of people who don't fit the gender binary and it's hard enough already for those people to integrate without having pronoun trouble on top of it. Francophone non-binary people are in even more trouble as the language actively works against them. I'm told the same applies to Spanish.
Dec 16, 2015 09:38
@FaheemMitha No, it isn't "your". It's a third person singular gender-neutral pronoun. Personally I use singular they in cases like this so I would have said "their", but it's a matter of preference.
Dec 16, 2015 08:39
@JdeBP I've seen "xe" before but this comment is the first place I've ever seen "xyr". Learn a new pronoun every day? Thank for that.
Jul 9, 2015 03:32
@TRiG I guess omiting full stops in prose is like automatic semicolon insertion in JavaScript. You can get away with it, but only at your peril.
Jul 7, 2015 13:52
@JennyD Lucky you. Too often I try to do security work and my colleagues/boss don't value it as useful.
Jul 7, 2015 13:12
@JennyD Super, I added from="..." and no-pty and all that to my answer. I should use that more often myself!
Jul 7, 2015 02:49
@mikeserv, I want to be very careful when giving security advice after I was less than completely vigilant over here. Thus, your review of this answer would be appreciated, if you like.
Jun 15, 2015 07:25
@Erik did you check your mail? cron emails error output from jobs. Empty files feels like a symptom of an error: the file gets created because output is redirected there, but then some error occurs and the command aborts, and the file is empty.
Jun 15, 2015 06:00
I think it's funny that the latest round of spam questions (example: unix.stackexchange.com/questions/209711 ) were tagged . It somehow seems to fit just right :-)
Apr 25, 2015 22:45
Thanks @Gilles for the link. I actually did come across that site a couple of weeks ago and I noticed you were active over there.
Apr 25, 2015 22:41
@FaheemMitha OK. I'm not planning to make a habit of it.
Apr 25, 2015 22:36
the opportunity to use it on the Internet doesn't come across that often (except that oddly, on this site, several of the top users are francophone!). The "standardization" on English is easy to justify pragmatically, but monolingual does lead to monocultural to some extent, which is too bad. I figure... once in a while... it doesn't matter as much here as it does on the main site. I've done the same with Japanese in the past. I'd love to do even more, but that's all I speak.
Apr 25, 2015 22:23
@StéphaneChazelas, est ce que tu pourrais jeter un coup d'oeil sur unix.stackexchange.com/questions/198639/avoid-loops-in-shells ? Moi aussi je suis curieuse.
 
Mar 11, 2015 02:03
FINAL CONCLUSION: there's lots and lots to be careful about as evidenced by the number of works I just finished writing about it (whew!) but it certainly can be done. Be very, very careful and you have to understand what's going on at each and every step. I have experience with this kind of thing and still I would be reluctant to attempt it without good backups.
Mar 11, 2015 01:59
But I just read the btrfs manpage and it seems it's pretty clear how to do that: you specify the ID of the individual member device which you would like to resize when using the btrfs filesystem resize command. You'd definitely want to double check with btrfs fi show to see that the device had indeed been shrunk before proceeding.
Mar 11, 2015 01:57
Btrfs supports multi-device filesystems (that's one of its greatest features: filesystem-aware CoW replication or parity storage has many advantages over traditional RAID with a filesystem on top) and I was wondering how the btrfs fi resize command for resizing Btrfs filesystems deals with that: does it resize the whole filesystem? One member device only? How to make sure it was done correctly, etc...?
Mar 11, 2015 01:54
Finally, there's another concern that I had regarding this whole thing, and it's with regards to how to make sure that the Btrfs filesystem is indeed shrunk to occupy no more than half the device BEFORE beginning any of this procedure.
Mar 11, 2015 01:53
By the way, when you recreate a new filesystem in the first half (replacing the Btrfs filesystem), that's when you can choose to upgrade to LVM by creating an LVM PV and LVM LV to hold the ext4 filesystem instead of just creating the ext4 filesystem directly. So there's that...
Mar 11, 2015 01:49
So unfortunately lots of steps and plenty of opportunity to make a mistake. Nothing replaces god backups!
Mar 11, 2015 01:48
Then get rid of the temporary device-mapper mappings and go back to using the full /dev/md/5 only now it's got what you want in its first half. So grow that thing (which currently occupies only half the device because it was constrained by the device-mapper mapping to occupy the first half only) so that it now occupies the full /dev/md/5 device.
Mar 11, 2015 01:47
It would be possible to convert the whole thing to LVM using the same trick I propose: split the MD device in 2 using manually created device-mapper mappings, then create a temporary filesystem on the second half, then copy everything from the first half to the second half, then destroy the Btrfs filesystem in the first half and replace it with the new configuration you want. Then copy data back from the second half to the first half.
Mar 11, 2015 01:42
Each LVM physical volume begins with the LVM metadata header which contains the aforementioned mapping details (as well as a volume UUID and header for autodetecting the LVM format, etc..) and there is no room at the beginning of /dev/md/5 to create that metadata because the Btrfs filesystem is already occupying that space
Mar 11, 2015 01:42
Only, it automates it and it manages the various offsets and lengths of the mappings itself in a manner you cannot control and it saves them in the volume group's metadata header so that it can reconstruct the mappings automatically and consistently. Even if you could specify the offset and size of an LV manually upon creation there is another problem.
Mar 11, 2015 01:42
You cannot convert /dev/md/5 to LVM after the fact. In many ways LVM is similar to what I am suggesting to achieve manually here with dmsetup. It even uses the same device-mapper technology. It lets you create many logical volumes (LV) on one physical volume (PV) (I'm leaving out the middle layer, volume group (VG), for simplicity) where each LV occupies a portion of the underlying storage.
Mar 11, 2015 01:35
Yes, I was assuming even number of sectors to simplify things. Otherwise, you got it, you have to figure out the ±1 and where it goes.
Mar 10, 2015 22:37
Something like dmsetup create second-half --table '0 <n> linear /dev/md/5 <n>', where <n> is half the number of sectors in /dev/md/5 assuming the number of sectors in /dev/md/5 is even?
Mar 10, 2015 22:37
No, dmsetup will be able to create a new virtual device that represents the first half of /dev/md/5 and another new virtual device that represents the second half. If the Btrfs filesystem fits completely in the first half of /dev/md/5 (which it MUST DO before you begin this procedure) then you can create an ext4 in the virtual device that represents the second half without clobbering the Btrfs. It's like creating 2 LVM LVs under /dev/md/5 but without the automation and safety of LVM.
Mar 10, 2015 22:37
Incidentally, it's totally normal to create filesystems directly on MD devices, so I don't think I would call it a "bad idea", even though it may have bitten you in this special case. The alternative is of course to make the MD device an LVM PV and create LVs on that to contain your filesystems. That's common too. On the other hand you seem to have the idea of creating a partition table on the MD device. That's awkward and I wouldn't recommend it (you may even need kpartx to get it to work... which just winds up using device-mapper anyway!). Use LVM instead if it comes to that.
Mar 10, 2015 22:37
It would be possible to do what you want by manually creating device-mapper linear mappings using dmsetup to cover each half of /dev/md/5 but it's living a little dangerously and you really need to deeply understand what you're doing and I'm not comfortable writing up an answer based on this.
 
Mar 10, 2015 00:10
Yes, it does seem to work.
Mar 9, 2015 12:56
Hi @3kstc, it looks like we're having trouble syncing up in the chat room at the same time. It might be that we are offset by timezones. I am in +0900. I'm afraid I might be asleep when you come online :-(
Mar 9, 2015 02:47
By the way, naming that executable with a .sh at the end of the name breaks convention. .sh at the end of a filename is usually an indicator that a file is specially meant to be sourced by another shell script because it may make changes to the environment, etc... If it is a normal script that one just executes in a straightforward way, one would expect it to be called /home/ed/start_up_job/executor_start_up_job, not /home/ed/start_up_job/executor_start_up_job.sh.