Earlier quoted context omitted.
> I thought you'd still need to reboot on Windows? Not if all you're doing is shrinking from the end. When was the last time you tried? I'm guessing the XP days?
> I'm guessing the XP days? To be fair, it might have been. I'm not a heavy Windows user but the fact I can't recall the last time I resized the system volume probably says more about how long ago it was.
Wipe and reinstall a running Linux system via SSH (2017)
21–30 of 81 posts
Re: Wipe and reinstall a running Linux system via SSH (2017)
#22Earlier quoted context omitted.
This is mostly filesystem-dependent. If you have a LVM or ZFS volume for instance resizing is (usually) trivial. When you think about it resizing and in particular shrinking a filesystem is very much a non-trivial operation behind the curtains, it's not surprising that some filesystems don't support it out of the box especially since it's not a super common operation in the wild in my experience.
It's not trivial and also it's likely to be very poorly tested scenario. I would recreate FS even if it supports resize.
Of course if you want to shrink the rootfs without rebooting you'll have to do it while mounted and I'm not sure if that's supported by any Linux FS out there (outside of NFS I suppose). That being said I think that's understandable, implementing resizing of a live FS seems very tricky to get right and not extremely useful IMO.
Can Windows really let you shrink NTFS while mounted? That's a pretty impressive feat if that's true, I wonder what motivated that.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#23Earlier quoted context omitted.
Yeah, but the Linux method is so much more generic; so can be used for more than just downsizing the partition.
It's far more generic but also practically useless for an end-user. Really, its only use seems to be for someone who is a remote sysadmin of some sort. You have to stop pretty much everything on the computer, and still go through a reboot. The only difference thing it buys you is being able to stay SSH'd at the cost of wasting so much more time and going through so much more risk and inconvenience. On Windows you'd j…
Do end-users really mess with partitioning usually (outside of formatting brand new disks I suppose)? I'm not asking rhetorically, I suppose there must be a use case if MS implemented this (tricky) feature but I can't really imagine any of my non-techies friends and relative decide to shrink a partition (actually most of them probably aren't aware of the concept of partition in the first place).
Re: Wipe and reinstall a running Linux system via SSH (2017)
#24Earlier quoted context omitted.
I think by straightforward they mean you can follow it properly, that's because it's a full step by step that explains each step in enough details to be used, and even includes details for "what to do if you're not in the state expected". A lot of such guides have a fair amount of "then use tool X to do important part Y" without explaining any of it, making it horrible if you don't know X or the details of Y. Source:…
So you are saying the Synology guys stepped you through it? That would be amazing support. (My Synology just works so I don't know what the support is like.)
Was as a personnal customer and no paid support (beside having bought the product of course), within the second year of my purchase. Overall I've had a fair amount of support requests with them for my personnal NASes and the couple dozen I manage for professionnal purpose, and I'm very happy with that relationship.
PS: my original support request was very detailled though, I did not just go and ask "doesn't work, fix it !"
Re: Wipe and reinstall a running Linux system via SSH (2017)
#25Earlier quoted context omitted.
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
I love that this line sounds like an old sea shanty: for i in dev proc sys run; do mount --move /oldroot/$i /$i; done
Re: Wipe and reinstall a running Linux system via SSH (2017)
#26Earlier quoted context omitted.
It's far more generic but also practically useless for an end-user. Really, its only use seems to be for someone who is a remote sysadmin of some sort. You have to stop pretty much everything on the computer, and still go through a reboot. The only difference thing it buys you is being able to stay SSH'd at the cost of wasting so much more time and going through so much more risk and inconvenience. On Windows you'd j…
>It's far more generic but also practically useless for an end-user. Do end-users really mess with partitioning usually (outside of formatting brand new disks I suppose)? I'm not asking rhetorically, I suppose there must be a use case if MS implemented this (tricky) feature but I can't really imagine any of my non-techies friends and relative decide to shrink a partition (actually most of them probably aren't aware o…
Now personnaly I find it weird, I would rather use the excuse to wipe and start clean if root, and for non root just making the partition you want and copy the content instead feels cleaner, but is it fairly common nonetheless.
They indeed don't know the concept of partitions, but they google "replace my hard drive by a larger one" and follow a guide usually (and such guide contains link to a specific duplicate took they can buy, of course).
Re: Wipe and reinstall a running Linux system via SSH (2017)
#27Earlier quoted context omitted.
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
Yeah, admittedly if you don't know what's going on there it might feel pretty convoluted and "wtf am I doing here". OTOH, on Linux you could do this since forever, it's not been that long ago that Windows finally shipped tools to do so. Now actually, Windows seems even more convenient since you can easily shrink a FS that is online. On Linux I'm not even sure that is possible; maybe with btrfs but I never really need…
I beg to differ, Computer management > Disk management has allowed you to do that in a visual and safe way since at least windows seven in 2009. God knows since how long the underlying cli commands have been available.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#28Re: Wipe and reinstall a running Linux system via SSH (2017)
#29Earlier quoted context omitted.
You can also resize partitions online in Linux. The point of the article was how to migrate the running system into memory and then wipe and reinstall the system. Try doing that from Windows :)
He is not talking about the article but the stack overflow question and answer of parent; and the point of that is to resize the root partition without booting into another OS, not to wipe or migrate to memory (ergo the question being asked: "How to shrink root filesystem without booting a livecd"). You can do that just fine on Windows, hell you can even do it with a nice GUI using computer management.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#30The Stack Overflow answer linked is horrifyingly delightful: https://unix.stackexchange.com/questions/226872/how-to-shrin...
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
btrfs filesystem resize 4g /
It's just not supported for ext4. You can grow an ext4 file system, even when it is your currently mounted root, just not shrink it. While it's great that NTFS does (now) support it few other file systems do because it's a relatively uncommon and quite risky.I certainly wouldn't shrink mounted filesystems even on those that support it because storage systems are quite fickle and the threat of silent corruption is real.
For most filesystems what you normally do is a full dump and restore. Closing all file handles and live migrating to a moved root filesystem is someone's idea of a showing off, it is absolutely not something anyone would do in production.